sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Any SU render engines that renders distorted textures?

    Scheduled Pinned Locked Moved Developers' Forum
    97 Posts 17 Posters 16.6k Views 17 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeff hammondJ Offline
      jeff hammond
      last edited by

      @chris_at_twilight said:

      Huh. The .3ds format only supports triangles (I think), so there is a way to represent the texture interpolation used by SU using only 3 UV coordinates (and the .3ds export knows it! )

      not sure if this will trigger any thoughts with you guys (and really, i don't understand much of what you're talking about) but..

      if everything is triangles in SU prior to messing with the UV mapping then it will render correctly..

      Sphere after using triangulatefaces.rb

      After importing a texture and applying it to the sphere

      use UVtools spherical option on the texture

      resulting render in indigo.. no exporting or unique textures

      dotdotdot

      1 Reply Last reply Reply Quote 0
      • R Offline
        richcat
        last edited by

        IRendernxt straight render in sketchup, you'll have to ask Al how?


        uv test.jpg

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris_at_Twilight
          last edited by

          @Jeff: Maybe because everything is already triangles, the UV coordinates that SU generates are 'compatible' with the traditional triangular UV techniques employed by other applications. So what you see in SU, is what you get in the render. Of course, it could just be how UVTools does the sphere mapping that makes it more compatible?

          @richcat said:

          IRendernxt straight render in sketchup, you'll have to ask Al how?

          You are more than welcome to ask. I won't be surprised if they use the same "pre-distorted" image technique that the SU exporters use.

          http://www.TwilightRender.com

          1 Reply Last reply Reply Quote 0
          • soloS Offline
            solo
            last edited by

            Yup, can confirm Irender aim and renders it correctly.


            testnxt.jpg

            http://www.solos-art.com

            If you see a toilet in your dreams do not use it.

            1 Reply Last reply Reply Quote 0
            • D Offline
              dedmin
              last edited by

              I tried the last version of the IrendernXT, but had a lot of problems - slow response of the interface, sometimes when adjusting textures all goes white, when tried to load a plant from the library SketchUP crashes and etc.

              1 Reply Last reply Reply Quote 0
              • Al HartA Offline
                Al Hart
                last edited by

                The Distorted texture is a nice feature of SketchUp - the ability to take a photo of a house for instance, from an angle, and then distort it onto the actual house so that it looks correct. SketchUp provides tools to get these distorted textures and UV coordinates properly, but it did take a lot of time and effort to figure it out and get it to work properly.

                SketchUp made this distortion even easier to use (without knowing that you are doing it) with their Photo Match techniques.

                Here is a 3D Warehouse model where the house image was placed using Photo Match. Some renderers process it correctly and some renderers do not recognize and process the distorted texture.

                http://sketchup.google.com/3dwarehouse/download?mid=9e0b93c387cad06c93a794ea4e64d35b&rtyp=lt&ctyp=other&ts=1251394213000

                3D Warehouse model

                Al Hart

                http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                IRender nXt from Render Plus

                1 Reply Last reply Reply Quote 0
                • jeff hammondJ Offline
                  jeff hammond
                  last edited by

                  it looks ok, right? 😄

                  house.jpg

                  so what's irender doing so differently than the other renderers? or does it export a bunch of textures prior to rendering?

                  dotdotdot

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    notareal
                    last edited by

                    @unknownuser said:

                    so what's irender doing so differently than the other renderers? or does it export a bunch of textures prior to rendering?

                    My quess is that it does export predistorted textures (like kmz export). So for Thomas' scene you will get two different textures when rendered. Sorry, have no irender, so cannot test. Wonder if it saves temp textures on disk before rendering...

                    Welcome to try [Thea Render](http://www.thearender.com/), Thea support | [kerkythea.net](http://www.kerkythea.net/) -team member

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Chris_at_Twilight
                      last edited by

                      I didn't see an actual answer in Al's post. Maybe I just didn't understand it?

                      http://www.TwilightRender.com

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        @chris_at_twilight said:

                        @Jeff: Maybe because everything is already triangles, the UV coordinates that SU generates are 'compatible' with the traditional triangular UV techniques employed by other applications. So what you see in SU, is what you get in the render. Of course, it could just be how UVTools does the sphere mapping that makes it more compatible?

                        @richcat said:

                        IRendernxt straight render in sketchup, you'll have to ask Al how?

                        You are more than welcome to ask. I won't be surprised if they use the same "pre-distorted" image technique that the SU exporters use.

                        VfSU for instance, I snooped in the .rb files, uses the PolygonMesh of each face to sample the UV data. And the PolygonMesh consists on only triangular polygons - but it does not render correctly. Even if you make a triangle and apply a distorted textures, it'll render incorrectly.

                        So it doesn't seem to be the case. Though, it is weird what Jeff describes - seems to do the trick for him in Indigo. ...maybe Whaat knows something on this...

                        Thomas Thomassen — SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @al hart said:

                          Here is a 3D Warehouse model where the house image was placed using Photo Match. Some renderers process it correctly and some renderers do not recognize and process the distorted texture.

                          Any insight on how to process distorted textures correctly?

                          Thomas Thomassen — SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 Reply Last reply Reply Quote 0
                          • thomthomT Offline
                            thomthom
                            last edited by

                            @chris_at_twilight said:

                            An export to Collada for the entire scene produces 1 undistorted texture and 1 distorted texture.

                            How are the unique texture created? No API methods AFIK that dose that.
                            Something they generate themselves in some external C code? Outside the reach for us mere mortal that only uses Ruby?

                            Thomas Thomassen — SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • W Offline
                              Whaat
                              last edited by

                              @thomthom said:

                              How are the unique texture created? No API methods AFIK that dose that.
                              Something they generate themselves in some external C code? Outside the reach for us mere mortal that only uses Ruby?

                              The texturewriter class will write pre-distorted textures. It is a lot of work to implement this in a rendering engine because you have to first determine which faces are distorted and create a unique material for each of them. As we have seen, this can result in LOTS of materials. I will probably add support to SkIndigo some day but I have not considered it a high priority. Very few users even mention it as a serious problem.

                              It comes up most often when a user downloads a model from the 3DW that has been photomatched and then they try to render it.

                              SkIndigo has had a workaround option for over a year (well before SketchUp added it as a standard feature). You can right-click on a face and go to 'Explode Distorted Texture'. It does the same thing as 'Make Unique Texture'

                              SketchUp Plugins for Professionals

                              1 Reply Last reply Reply Quote 0
                              • W Offline
                                Whaat
                                last edited by

                                @thomthom said:

                                So it doesn't seem to be the case. Though, it is weird what Jeff describes - seems to do the trick for him in Indigo. ...maybe Whaat knows something on this...

                                Very interesting thread. Thanks Thomthom for starting this discussion. So far, it has confirmed most of my theories.

                                Unless the rendering engine can interpolate UV mapping using four anchor points, it can't be done without exporting a pre-distorted texture.

                                The method of triangulating the mesh for the spherical mapping probably has something to do with how UVTools works. I believe that for faces with greater than three vertices, I call the position_material method with four points (which probably results in a very slightly distorted texture, but enough to mess up the rendering engines). For faces with three vertices, I call the position_material method with only three points so the texture is not distorted (at least not enough to notice).

                                It is strange. Someone should test to see if the textures are distorted even for triangles after applying the spherical mapping. Maybe I'm wrong...

                                SketchUp Plugins for Professionals

                                1 Reply Last reply Reply Quote 0
                                • thomthomT Offline
                                  thomthom
                                  last edited by

                                  @whaat said:

                                  Unless the rendering engine can interpolate UV mapping using four anchor points, it can't be done without exporting a pre-distorted texture.

                                  Is that possible? Is a distorted texture at all possible to define with three points?

                                  @whaat said:

                                  The texturewriter class will write pre-distorted textures. It is a lot of work to implement this in a rendering engine because you have to first determine which faces are distorted and create a unique material for each of them.

                                  And work out new UV data for the material you create.
                                  But this method won't make new materials in the SU file, right?

                                  @whaat said:

                                  Very few users even mention it as a serious problem.

                                  It comes up most often when a user downloads a model from the 3DW that has been photomatched and then they try to render it.

                                  Could that not be because people are avoiding them due to this problem?
                                  Also - recently there's been more stir about UV mapping here on the forum. As you saw with your UVTools 0.2 thread.
                                  I've got some UV plugins I'd like to make - I've been looking into it - but since I render in V-Ray I try to avoid distorting textures.

                                  Thomas Thomassen — SketchUp Monkey & Coding addict
                                  List of my plugins and link to the CookieWare fund

                                  1 Reply Last reply Reply Quote 0
                                  • thomthomT Offline
                                    thomthom
                                    last edited by

                                    @whaat said:

                                    SkIndigo has had a workaround option for over a year (well before SketchUp added it as a standard feature). You can right-click on a face and go to 'Explode Distorted Texture'. It does the same thing as 'Make Unique Texture'

                                    I've never been a fan of such workaround - makes the organisation of the model difficult.

                                    Thomas Thomassen — SketchUp Monkey & Coding addict
                                    List of my plugins and link to the CookieWare fund

                                    1 Reply Last reply Reply Quote 0
                                    • Al HartA Offline
                                      Al Hart
                                      last edited by

                                      @thomthom said:

                                      Any insight on how to process distorted textures correctly?

                                      As I recall, we originally tried to figure out that the image was distorted, but in the end we would up having SketchUp save an image for everything, and having SketchUp give us the UVQ coordinates and it finally just worked.

                                      I just looked through the code and couldn't find anything special that we are doing. (Except to let SketchUp save a texture for all textured materials, and to let SketchUp give us the UVQs)

                                      Al Hart

                                      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                      IRender nXt from Render Plus

                                      1 Reply Last reply Reply Quote 0
                                      • thomthomT Offline
                                        thomthom
                                        last edited by

                                        @al hart said:

                                        As I recall, we originally tried to figure out that the image was distorted, but in the end we would up having SketchUp save an image for everything, and having SketchUp give us the UVQ coordinates and it finally just worked.

                                        From observation it seems that a texture is distorted when the Q value isn't 1.0. The manual says that the UVHelper ignores the Q value - but that isn't the case in reality. Had an conversation with Jeff ("jeff99") about this: http://forums.sketchucation.com/viewtopic.php?f=180&t=21700&start=30#p191715

                                        Which resulted in this summary which I wrote.

                                        @al hart said:

                                        I just looked through the code and couldn't find anything special that we are doing. (Except to let SketchUp save a texture for all textured materials, and to let SketchUp give us the UVQs)

                                        http://forums.sketchucation.com/viewtopic.php?f=180&t=22719
                                        If you write out unique textures for every face, then don't you have to discard the UV data from SU? Because the unique texture would come out regular, but the one SU refers to with its UV data is distorted. Or am I misunderstanding something.

                                        Thomas Thomassen — SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

                                        1 Reply Last reply Reply Quote 0
                                        • Al HartA Offline
                                          Al Hart
                                          last edited by

                                          @thomthom said:

                                          If you write out unique textures for every face, then don't you have to discard the UV data from SU? Because the unique texture would come out regular, but the one SU refers to with its UV data is distorted. Or am I misunderstanding something.

                                          I am pretty sure that SketchUp gives us the full image, and normal UV values for normal, rotated and skewed images, but gives us UV values of (0,0), (1,0), (1,1), and (0,1) (or something like that) for the distorted image, so that the full distorted image is placed on the face. (It may be because we are (or because we aren't - it is hard to remember just what we did to make it work) using UVhelper to get the UVQ values.

                                          Al Hart

                                          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                          IRender nXt from Render Plus

                                          1 Reply Last reply Reply Quote 0
                                          • thomthomT Offline
                                            thomthom
                                            last edited by

                                            I got a plugin that let you inspect the UVQ values of the UVHelper: http://forums.sketchucation.com/viewtopic.php?f=180&t=21472

                                            Using that, for all Normal, Scaled, Squashed and Skewed textures the Q values remains 1.0. But for distorted textures the Q values is not 1.0 - it has to be normalized to get flat UV values. The U and V values are also not 1 and 0's - but I'd think that you would have to override the UV values with 1 and 0's in order to fit the new unique texture over the face. That seem to make sense.

                                            I'm still wondering if this is the only way though. Or maybe the SU way simply isn't compatible with the UV co-ordinates of most other apps. How does other 3D applications map textures? Generally.

                                            Thomas Thomassen — SketchUp Monkey & Coding addict
                                            List of my plugins and link to the CookieWare fund

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 2 / 5
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement