Page 1 of 1
Normal hard weird edges
Posted: Sun Apr 28, 2019 1:52 am
by kumaran7
Hard edges in normal map.how can i fix this problem.
Re: Normal hard weird edges
Posted: Sun Apr 28, 2019 7:51 am
by Dade
Can you post the scene ?
Re: Normal hard weird edges
Posted: Sun Apr 28, 2019 12:16 pm
by wasd
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
Re: Normal hard weird edges
Posted: Sun Apr 28, 2019 3:59 pm
by kintuX
Use Normal Height value below 3 cm = 0.03.
eg. h = 3cm / without Subdivision, as you can observe artifact starts appearing
Re: Normal hard weird edges
Posted: Sun Apr 28, 2019 5:56 pm
by wasd
kintuX wrote: ↑Sun Apr 28, 2019 3:59 pm
Use Normal Height value below 3 cm = 0.03.
eg. h = 3cm / without Subdivision, as you can observe artifact starts appearing
bump_terminator-c@3cm(=0.003).jpg
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.
Re: Normal hard weird edges
Posted: Wed May 01, 2019 12:09 pm
by wasd
Normal map Height = 2.45
~
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;
If normal is pointing wrong way it is reversed?
Re: Normal hard weird edges
Posted: Wed May 01, 2019 2:12 pm
by Dade
wasd wrote: ↑Wed May 01, 2019 12:09 pm
Normal map Height = 2.45
kintuX wrote: ↑Sun Apr 28, 2019 3:59 pm
Use Normal Height value below 3 cm = 0.03.
Re: Normal hard weird edges
Posted: Wed May 01, 2019 3:57 pm
by wasd
Dade wrote: ↑Wed May 01, 2019 2:12 pm
wasd wrote: ↑Wed May 01, 2019 12:09 pm
Normal map Height = 2.45
kintuX wrote: ↑Sun Apr 28, 2019 3:59 pm
Use Normal Height value below 3 cm = 0.03.
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.