🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Texture mapping problem.

Started by
0 comments, last by simon_brown75 24 years, 9 months ago
I'm just starting the process of learning 3D graphics. I've got flat shaded, and gourard shaded rotating cubes working and I'm currently struggling with texture mapping. I'm trying to do prespective corrected texture mapping, using the u/z, v/z, 1/z method, which seems to work pretty good, apart from the problem I've been having working out new texture (u, v) co-ordinates when I split my triangles in half horizontally. When you work out the new x value at this point you can do it in 2D, but if you do it in 2D for texture co-ordinates you get distorted textures, as you might guess. Does anyone have the answer or maybe know either a good online tutorial, or a good book which can help me. I already own several 3D programming books but they all texture map in screen 2D space, which gives dissapointing results.
Any help would be much appreciated.
Advertisement
are you splitting your u and v after or before you devide by z. cause you have to do it before you devide by z.

I think this is your problem.

This topic is closed to new replies.

Advertisement