Cannot understand exported UV coordinates format
-
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.
-
Can you post a sample of how you get these values?
-
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 -
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"?
-
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. -
How do you Import/Export? With a plugin or with the C++ SDK? The have different UV values.
-
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.
Advertisement