UVs exported from Milkshape
by Shane McLeod · in Torque Game Engine · 02/03/2003 (7:02 am) · 4 replies
I'm working on the trueSpace scnToDts exporter and I've run into a hitch.
The UVs I'm exporting aren't mapping up correctly. I'm not doing any manipulation of the UVs, just exporting them as truespace has them stored. When the resulting .dts object is imported into the engine, the texture is off.
To verify that I'm exporting the correct UVs with the correct verts, I compared my export data with the source object in .obj format and they are exactly the same.
So, I exported the model using Milkshape to .obj format and checked the UVs with the original .obj file AND the truespace data output. Once again, exactly the same.
Then I tossed in a few lines of debug code into the milkshape exporter to see the actual UVs exported to .dts and the U's are exactly the same, but the V's are off. I can't tell from the msToDts exporter code what Milkshape is doing to the UVs.
So, do any of you have any ideas of what I'm missing?
[Edit]
Simply put, the UVs Milkshape exports for .obj are different than the UVs Milkshape exports for .dts, actually, the U's are the same, the V's are different.
The UVs I'm exporting aren't mapping up correctly. I'm not doing any manipulation of the UVs, just exporting them as truespace has them stored. When the resulting .dts object is imported into the engine, the texture is off.
To verify that I'm exporting the correct UVs with the correct verts, I compared my export data with the source object in .obj format and they are exactly the same.
So, I exported the model using Milkshape to .obj format and checked the UVs with the original .obj file AND the truespace data output. Once again, exactly the same.
Then I tossed in a few lines of debug code into the milkshape exporter to see the actual UVs exported to .dts and the U's are exactly the same, but the V's are off. I can't tell from the msToDts exporter code what Milkshape is doing to the UVs.
So, do any of you have any ideas of what I'm missing?
[Edit]
Simply put, the UVs Milkshape exports for .obj are different than the UVs Milkshape exports for .dts, actually, the U's are the same, the V's are different.
About the author
#2
02/04/2003 (7:31 am)
Is the V exported from MS3D just (1.0 - V)? That's something you'll often see.
#3
The best method of checking this that I know of is to export a single square (a two-triangle plane). Have an imaged mapped to it such that the entire image just covers the surface. Then export the plane as a DTS file.
If the image on the DTS object is flipped on any axis (u or v), then you'll need to apply the 1.0-u or 1.0-v formula Simon mentioned above.
I know that I had to perform a (1.0-v) calculation for the LightWave DTS exporter.
- LightWave Dave
02/04/2003 (7:55 am)
Greetings!The best method of checking this that I know of is to export a single square (a two-triangle plane). Have an imaged mapped to it such that the entire image just covers the surface. Then export the plane as a DTS file.
If the image on the DTS object is flipped on any axis (u or v), then you'll need to apply the 1.0-u or 1.0-v formula Simon mentioned above.
I know that I had to perform a (1.0-v) calculation for the LightWave DTS exporter.
- LightWave Dave
#4
02/04/2003 (3:25 pm)
Yup, that did it. Thanks alot!
Torque Owner Kirby Webber
Just a thought.
[edit]
Just saw you're profile and realized that you're coding a *.scn to *.dts exporter which would make my suggestion *completely* invalid.
Sorry. =/
[/edit]