Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Coordinate Flipping... Effect on TexCoords?

This topic is 5456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I have a question concerning displaying my world geometry. If I have X number of triangles w/ (x,y,z) coordinates and textures coordinates (u,v), if I switch the coordinates like so: (x, z, y), so pretty much y = z and z = y, for every coordinate, the texture coordinates then don't work anymore, naturally. What can I do to my texture coordinates to make them remain correct for these faces with the coordinate switch? The reason I ask is I'm trying to use the geometry from Stan Melax's BSP example for my engine b/c I suck at 3d modelling, so for developing the engine I'm just using his file format, but all his world geometry is aligned normal to the x-y plane rather than x-z, so I'm just switching the y and z coordinates to set it upright. I've tried rotating the geometry, but its SO much easier to just flip those when I'm loading the file. Since this is a theory question, I don't think specifics are too essential, but heres my setup if it helps: DirectXGraphics9, UVN Camera, vertex format (x,y,z,normal,diffuse,tU,tV). The geometry renders fine, flipped or not, and the textures look correct without the flip, but not with it. EDIT: Umm, the solution smacked me in the face right after I posted, when I flipped the coordinate indexes for the triangles, (so the normals would still point inward after i did the y=z) I wasn't flipping the tex coords for each point along with them, DOH! Sorry for wasting space in the forums hehe Thanks a lot, rj [edited by - rjwr10 on November 8, 2003 12:36:14 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!