Jump to content
  • Advertisement
Sign in to follow this  
Phillemann2

Switching y and z in a model - textures broken

This topic is 3027 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

Hi

For use in my application, I'm exporting md3 models from blender. Blender defines the z Axis as "up". In my application, I have the y axis as "up". To correct this, I thought I could just swap the y and z coordinates of the exported model when importing it, as in:

vertex = vec3(vertex.x,vertex.z,vertex.y)

Then, however, my textures are somehow "flipped". I suppose I have to transform the texture coordinates as well, but I'm not sure.

Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Try using -y and/or -z instead. You might also need to change the cull-mode, as switching these things can make back-facing polygons become front-facing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!