Sign in to follow this  
MARS_999

Normal calculations are these the same for CCW?

Recommended Posts

//u = v2-v3; //v = v2-v1; u = v2-v1; v = v3-v1; I am using OpenGL, and CCW order. I looked at some code for loading .3ds models and they supply the commented out u,v I seen on the net that it should be the last two. I am now confused as to what they should be... Thanks

Share this post


Link to post
Share on other sites
The generated u and v are different, of course, but both sets produce a right-handed coordinate frame with the normal pointing outwards from the surface.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Things that rely on a particular tangent space (like parallax mapping) will not work right.


Thanks, I am thinking this could be my problem. So how do I know which way I should use?

u = v2-v3;
v = v2-v1;
or
u = v2-v1;
v = v3-v1;

I am doing bumpmapping with a TBN matrix. I am assuming this will be affected also. Since it's a stepping stone for parallax mapping.

Share this post


Link to post
Share on other sites
It doesn't matter which one you use. The only thing that matters is that the thing that generates parallax maps uses the same tangent space as the thing that displays them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this