Normal hard weird edges
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Normal hard weird edges
My wild guess is that normal map doesn't respect Phong normals. So, Phong normal should be calculated first, then normal from map added. But it seems (I didn't read the actual code) that normal map added to surface normal, ignoring Phong interpolation.
Here's my example scene
Here's my example scene
CPU Bidir + Metropolis | Core i5-4570
Re: Normal hard weird edges
Use Normal Height value below 3 cm = 0.03.
eg. h = 3cm / without Subdivision, as you can observe artifact starts appearing
eg. h = 3cm / without Subdivision, as you can observe artifact starts appearing
Re: Normal hard weird edges
1.) As far as I know normal "Height" is not in meters, it's 0-100%. At 0 it's no change to initial normal; at 1 it's 100% added map value.
2.) My guess must be wrong, because at 0 Height the surface is smoothed.
No normal map, flat ~
No normal map, smoothed ~
Yes normal map, Height = 0 ~
Yes normal map, Height = 1 ~
3.) My another observation: it's the same faces that experience terminator problem are affected by the "normal map problem". Faces affected by terminator problem has sharp edges, but smoothed at the middle. With normal map they look flat.
Normal map Terminator File with cylinder 4.) My another wild guess is that the problem lies somewhere in clipping combined normals.
CPU Bidir + Metropolis | Core i5-4570
Re: Normal hard weird edges
Normal map Height = 2.45
No bump ~
Normal map Height = 0.3 ~
https://github.com/LuxCoreRender/LuxCor ... malmap.cpp
If normal is pointing wrong way it is reversed?
~No bump ~
Normal map Height = 0.3 ~
https://github.com/LuxCoreRender/LuxCor ... malmap.cpp
Code: Select all
// Transform n from tangent to object space
Normal shadeN = Normal(Normalize(hitPoint.GetFrame().ToWorld(n)));
shadeN *= (Dot(oldShadeN, shadeN) < 0.f) ? -1.f : 1.f;
CPU Bidir + Metropolis | Core i5-4570
Re: Normal hard weird edges
It's not 3 cm though.
When normal is pointing outward the camera is should be clipped at near perpendicular, not inverted.
Setting so-called "Height" multiplier doesn't solve anything.
CPU Bidir + Metropolis | Core i5-4570