Skip to main content
gamedev.net
🔒 Locked

Texture mapping problems

Started by Kamikaze 0 replies 200+ views
Original Post
Kamikaze
Kamikaze
Hi, making a 3D-engine and have some problems with the texture mapping. So far there is no perspective correction. Okey, to the problem: If I draw 2 polygons side by side forming a square, it's correct like this. (Sorry for the ugly texture ) But if I put the upper corners a little together the whole texture gets a wierd result like this. The vertical lines "turns" where the two polygons meet. Why? (Not the little line at the top) Please help! Edited by - Kamikaze on 11/21/00 1:58:16 PM
errand
errand
It seems to me that what you do is you have the same z-value for all 4 corners and just adjust the x value for the top. This make the texture get weird. If you look at the top triangle you will see that the texture follows the left-side of the triangle (parallell) and the bottom triangle will have the texture following the rightside.

The x-x distance and y-y distance can''t be changed if you want to get a "perfect" texture mapping. You have to change the z-value (z+ for top, or z- for bottom coords if you use a left-handed system like DirectX or vice verse if you use OpenGL which is a righthanded system).

Hope this helps.
Other wise send me a mail and I will try to explain it in Swedish =).
Death is lifes way saying your fired.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.