sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Cannot understand exported UV coordinates format

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 668 Views 3 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.
    • J Offline
      Jrudd
      last edited by

      I'm exporting OBJ and XSI files from Sketchup for display in my 3d app.
      I understand how UV mapping works since I've developed a 3D engine that displays the model data.

      I'm just having trouble correctly interpreting the UV mapping coordinates.

      So what I've got is some faces displaying the texture perfectly and some faces horribly wrong since the UV mapping coordinates are too small to make sense of.

      I'm just in the process of debugging this but I could use some help from the expert SU community if this is an ordinary issue that SU exports model data with incorrect/wierd UV coordinates although it displays correctly in SU itself.


      I've got many UV coordinates of a 3D model clearly in the range 0-1 and many coords in seemingly pixel values in the range 100-300.

      How do I know which one to interpret the coordinates as?

      Is there a standard or system for this?

      I notice that each 3d meshes in the exported file may use either system. Is this normal procedure, and if so, how do I interpret the UV texture mapping coordinates to display them correctly in my 3d engine?

      Examples of coordinates in the 0-1 system:

      vt 1.04017 2.60853

      vt -0.984585 -0.0106576

      Examples of coordinates measured by the pixel:

      vt -208.397 776.637

      vt -208.397 32.6369

      You can download my 3D building model and OBJ.

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

        Can you post a sample of how you get these values?

        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

          Have a look at this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=22719

          These might be of interest as well:
          http://forums.sketchucation.com/viewtopic.php?f=180&t=23947
          http://forums.sketchucation.com/viewtopic.php?f=180&t=21700

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

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jrudd
            last edited by

            Hey thomthom,

            Just download the model I've given and export it using SU.

            You should get the same results.

            Maybe the model data is "bad"?

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

              Not sure what I'd be looking for..
              But one way to check if the data is valid is to import the models into the 3d applications and see if they import it correctly.

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

              1 Reply Last reply Reply Quote 0
              • M Offline
                mhd
                last edited by

                How do you Import/Export? With a plugin or with the C++ SDK? The have different UV values.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jrudd
                  last edited by

                  I have the standard DLL that exports to XSI.

                  So I just File > Export > 3D Model.. and choose XSI and press Export.

                  I read this XSI file into my app. The coords I've given you are from OBJ so its easier to understand (more readable)

                  Would this be the reason for me getting bad data.

                  Does someone have a simple C++/Ruby script that exports all models, their textures and vertices/UV coordinates? .. I can use this alternatively.

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

                  Advertisement