Sign in to follow this  
noVum

Tangent space calculation and different texture coordinates

Recommended Posts

Say for example I have two faces which share 2 vertices and belong to the same "smoothing group" (that means the shared vertices have an interpolated normal) - so far so good. But now the textures on them are aligned totaly different and the texcoords in the shared vertices are therefore totally different as well. I think that means that I can't interpolate the binormal and tangent like the normal. Now there are 3 different ways you could handle that case a) Don't interpolate anything b) Only interpolate the normal c) Interpolate all three What's the "right" way? I could try it out, but the design of my exporter depends very much on this point so I would like to clear it out before I begin coding.

Share this post


Link to post
Share on other sites
There are no smoothing groups for uvs, so you have to infer whether to smooth or not based on the relative tangent and binormal angles.

NVMeshMender takes a dot product threshold for normals, tangents and binormals to determine whether to smooth or not. It basically ends up creating smoothing groups for normals, binormals and tangents separately before performing the smoothing operations.

You might try using meshmender, as it is the best method I could come up with...

Share this post


Link to post
Share on other sites
If your willing to read for a bit and forgive the now-dead image links, I had a very similar issue a while back. The short answer, though, is that you create smoothing groups for each vector type (normal, tangent, bitangent) seperately, with no regaurd to other vectors.

Oh, and I'll put in another vote for looking through the NVMeshMender code. It's relatively straightforward, and an absolutely invaluable learning tool!

Hope that helps!

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