General Category > Ongoing Anim8or Development

Normal Maps

<< < (5/7) > >>

Steve:
Raxx: I'm making progress.  There was a bug in the way that I computed binormals but when I averaged and normalized them for rendering it worked mostly OK. Here's some images of the normals, and the binormals before and after.

But there's still a problem: The texture map coordinates aren't continuous - there are huge differences in the ST values for the same point in adjacent triangles. You can see the transition from reddish to greenish in the new binormals. This causes the remaining hard edges. I think I can fix it by comparing adjacent faces' binormals and if they are going in opposite directions flip one of them, sort of like I do for normals in the "Fix Normals" command.

Raxx:
No wonder it was a mess! From the little I researched about it, it seems one way people resolve this is by splitting/detaching the vertices where the UV seams are located. This way both sides will have their own correct set of values to read from.

Steve:
Further investigation shows that the normal map texture, after mapping to the model, has discontinuities where these seams appear.  See the first two images below.  I've also posted an image with the specular weight exaggerated to highlight Anim8or'x curent results.

I'm at a loss to know how it eliminates the edges.

Raxx:
Looks like you've nearly fixed it! Are you making sure to load it in linear space and not srgb/gamma space?

The texture itself does have discontinuities, as you've said. You can see the seams in the other programs if you look close enough. I can't say if it's the same level as what you've currently got though, just looking at the image. Having matcap turned on in Sketchfab shows not as much seam issue as in your bottom picture. Perhaps it's related to the texture filtering or UV handling? Are mipmaps getting in the way?

Raxx:
It is a bit weird. I created a plane, split it into various divisions and unwrapped it so that there would be UV seams all over it, then baked random details onto it. It's a fairly perfect texture with no visible seams on the texture itself. However, with the normal map applied, the seams are there blended and so it iterates flipping the normals around. In the attachments, you can see what I'm talking about. Is there no way to internally split the vertices at the seams so that the binormals are calculated correctly per-vertex rather than blended?

Also, a bug I keep forgetting to report: When adding a normal map to an existing material, the entire material gets shades darker until it's saved and reloaded. Also, if you click in Anim8or while it's loading a texture or the file itself in the beginning, it crashes (win 10). Would be nice if this was prevented.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version