Hi,
I don't have a definitive answer to this, but I seem to remember from when I
wrote the 3DS loader for PLIB that 3D Studio seems to have weird conventions for
handling texture coordinate. Textures from *some* image formats were flipped
upside down, while others were not. For example, you can find this kludge in the
ssgLoad3ds.cxx:
/* flip textures y-coord if texture is a BMP */
char *texture_extension =
material->tex_name + strlen(material->tex_name) - 3;
flip_texture_y = ulStrEqual( texture_extension, "BMP" );
...so it seems 3D Studio does *something* weird to texture coordinates. (In the
case of BMP, it might have to do with the fact that the image data is actually
stored "bottom row first" in the file as a default... dunno if the people who
wrote 3D Studio just missed that fact, causing all models using BMP textures to
be flipped?). I seem to recall that someone reported nasty stuff such as *some*
BMP-textured 3DS objects STILL turned up with the textures upside down, meaning
3D Studio doesn't always store the coordinates the same way. Ugh. I don't want
to think about that... ;-)
Anyway, I don't know what the correct solution to this is, but perhaps this is
yet another special case that should be handled in the ASE-loader, since 3D
Studio does weird stuff?
Regards,
Per Liedman
----- Original Message -----
From: "Luca Masera" <luc...@li...>
To: "plib-users" <pli...@li...>
Sent: Wednesday, January 14, 2004 9:51 AM
Subject: [Plib-users] Texture coords
> Rotated 180 degrees or mirrored?
Excuse me, they are vertically mirrored (not rotated). However, after putting
them on the airplane in 3DS and exporting the object in the .ASE format, before
launching FlightGear I open all the texture files and I mirror them. In this way
they look ok in the program. Could be the cause the fact that 3DS opens the
files and "reads from left to right", instead the library "reads from right to
left" (It's only a personal congetture...)?
Bye,
Luca
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
plib-users mailing list
pli...@li...
https://lists.sourceforge.net/lists/listinfo/plib-users
|