Thursday, May 30, 2013

Mirrored Normals

I've ran into a problem recently and I've been thinking it over and over until I'm starting to call the solution either super simple or completely unreachable at this point.

With the last tutorial I made I created the uvs for the model as per usual. Nothing special, no mirrored geometry or anything of the sorts. The bake came out brilliantly, though as stated above i've ran into a problem pertaining to mirrored normals. I used the same mesh to generate the issue I was having.

Original UV
Standard UV set which gave me perfect results when baking.



Mirrored UV Set
Mirrored uvs, saves space but doesn't allow for unique details. Probably better use for objects far away from the camera and for objects that don't require normals.  


For the mirrored uv set you see above I offset the duplicate uvs over to match in the 0-1 uv space on the left. I found this to greatly reduce the seam artifacts but i'm not sure if this is exactly the best or most efficient method for mirrored uvs.


It's hardly noticeable, though it's dependant on view leading me to think it's either just the normal doing this or the lighting highlighting the seam. Either way it pretty much rids the seam, but it's there and thus is why these sort of uvs are best utilized when geometry is further away from the camera or can be hidden by geo.

So i tried object space normals. Which are inherently different to tangent space normals as osn totally overrides the normals of the low poly. The seam has however, completely disappeared but the specular does mirror.


If you're curious as to how I started things out, I just deleted half of the low poly, unwrapped it then mirrored  it. The uvs followed onto the other half then I just moved them over.

Things I've tried...

Painting in perfect (or near perfect) grey; 128,128,128 on the green channel and also tested on the red channel depending on either vertical and horizontal alignment. Still no satisfactory results and really, it made it worse.

I've tried painting in a flat normal colour; 128,128,255. Still not good enough, it's a curved surface; painting in a flat normal causes obvious lighting issues.

A friend suggested, with the uvs overlayed, to move the top verts down a bit so it doesn't hit the seam. Unfortunately, it made things worse, I'm guessing it's because the normal colour has changed slightly causing issues.

Messing around with the edit normals modifier to see whether that solves the issue, but no play.

Flipping the green channel had no positive effects.

I don't think there is an end all and be all solution to mirroring normals. Unless there is and you may know of a solution? Please let me know!

Update!

So I asked around and EarthQuake from the Polycount forums confirmed what I already suspected.

"Offsetting the uvs is the only thing you can really do, I would suggest going ahead and texturing your asset to see if any seams or noticeable though.

Generally I would avoid placing seams in an area that is going to be really visible, something like the little knob here I would generally not mirror.

You may get improved results when using a synced up normal map workflow(synced tangents), Toolbag 2.0 will have options for syncing with Maya, Max and Xnormal bakes, so that will probably help."

So I guess it's just that. Don't mirror unless it's completely necessary or more efficient to and to work with a synced normal workflow, which will come soon to the toolbag in 2.0.



No comments:

Post a Comment