Page 1 of 1

Handling of normal maps

Posted: Fri Apr 03, 2015 12:11 pm
by gmenzel
At the moment, Maxwell seems to handle normal maps just as a normal texture map, disregarding that the vector information contained in these maps relies on a specific spatial context. This can cause incorrect shading to be calculated.

There are at least two ways in which this problem manifests:

1. When a textured object is mirrored, i.e. the x/y/z scale of the object is negative. In this case the rendered result appears as though incorrect u/v flip parameters had been used. As a quick fix, Maxwell could simple toggle the FlipX parameter whenever the object is mirrored in 1 or 3 dimensions (with 2 dimensions, the effect cancels out).

2. When the rotation parameter of the map is used. Here, Maxwell should rotate the normal vector appropriately to achieve correct results.

While it is possible to work arround this issue, I'd like to see a fix in a future version.

Re: Handling of normal maps

Posted: Tue Apr 07, 2015 4:43 pm
by eric nixon
2. When the rotation parameter of the map is used. Here, Maxwell should rotate the normal vector appropriately to achieve correct results.
Really? I only see the issue if the mapping is mirrored, which is to be expected and it seems quite logical to flip the normals to compensate for that, rotation works fine.

Re: Handling of normal maps

Posted: Tue Apr 07, 2015 5:08 pm
by gmenzel
eric nixon wrote:Really? I only see the issue if the mapping is mirrored, which is to be expected and it seems quite logical to flip the normals to compensate for that, rotation works fine.
No, I just checked it again in case I remembered wrongly. Maxwell simply rotates the normal map, while leaving the normal vectors unchanged.

As for point 1, there is no reason Maxwell couldn't adjust the setting automatically - and on a per-face basis. I often get my hands on 3d models that are symetrical (like, for instance, furniture models), where UVs are mirrored on one side. Another scenario would be scattering, where being able to randomize mirroring could add more variance.

It's not a burning issue. Just another thing I'd like to see added.

Re: Handling of normal maps

Posted: Wed Apr 08, 2015 12:56 pm
by eric nixon
Yes, your right, I tested the rotation again (with a more pronounced map) I can see the problem now. Thanks for heads up. They're should be a warning note next to rotation in mxed, ideally.