Microstructures and shadow shading

   1046   10   5
User Avatar
Member
141 posts
Joined: 11月 2017
Offline
Is there a proper way to have ultra fine structures AND correct shadows? : )

Well, displacements might actually "solve" the shading part, but the cost of displacing the geometry is enormous. Even with a 20GB gpu it's a burden and lottery.

I'm totally fine with the normal map results visually, but the shadow is just broken.

Image a is the horrible result, image b what I actually expect it to look like. In this case I just altered the shadow softness, but the steps are still visible.

Is there a way to render this correctly with Karma?

Bump mapping instead of real displacements gave me stretched mapping results while not getting the amount of detail achieved with the procedural normal map.

Anybody with suggestions?


Cheers
Tom
Edited by Tom Mangold - 2024年9月13日 12:23:53

Attachments:
normal_a.jpg (3.0 MB)
normal_b.jpg (3.2 MB)

User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
do you have a good model, or is this like a raw CAD conversion?
User Avatar
Member
141 posts
Joined: 11月 2017
Offline
Geo was rebuilt in Houdini and is fine. If I lower the amount of the texture the shadow gradually returns to be more correct, but at the cost of loosing the surface structure.

I tried the height to normal node and adding the procedural color noise to the normals (+normalizing the results). Both ways end with the same amount of hard shadow transition.
Edited by Tom Mangold - 2024年9月13日 12:28:32
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Tom Mangold
Geo was rebuilt in Houdini and is fine. If I lower the amount of the texture the shadow gradually returns to be more correct, but at the cost of loosing the surface structure.

I tried the height to normal node and adding the procedural color noise to the normals (+normalizing the results). Both ways end with the same amount of hard shadow transition.

why is the shadow so hard, is it a point light? Increasing size of the light is another way to soften the shadow. With raytracing, the shadow is always a perfect white or black shadow with a point light. The thing that makes the shading fall off smoothly is the normals. Using an insanely rough normal map means that the normals are all facing random directions, so even samples right next to the terminator are possibly facing perpendicular to the surface, so the terminator has no room to transition. Using true displacements will make the shadow terminator smooth as the facets can only be facing so far before they are occluded by other facets. There might be methods employed by other renderers to fake this transition. Does it still happen if you use a normal clamp with a VEX material (cpu only)?
User Avatar
Member
141 posts
Joined: 11月 2017
Offline
That's the problem isolated. I normalized the normal, but I considered to try something like a max angle implementation, but didn't find the time during production. Light type didn't make a difference, only the shadow softness/light size.
Edited by Tom Mangold - 2024年9月13日 12:50:02

Attachments:
shadow_issue__005.hiplc (372.1 KB)

User Avatar
Member
141 posts
Joined: 11月 2017
Offline
P.S.: Didn'T normalize it in this example, but when I added the noise to the original normal I did.
User Avatar
Member
39 posts
Joined: 2月 2017
Online
What you're seeing there is the typical shadow terminator issue. Basically an issue concerning self-shadowing of polygons in conjunction with extreme shading normals. I'd suggest googling it instead of me explaining it wrong and making an ass out of myself but the "fix" is adding a render geometry settings node and bumping the "bump shadow terminator" value to something that works. You still need add a bit more geo to get rid of the remaining artifacts but it's helping quite a bit as you can see in the attached image.
Edited by racoonart - 2024年9月13日 15:03:09

Attachments:
shadowTerminator.png (759.2 KB)

User Avatar
Member
141 posts
Joined: 11月 2017
Offline
Is that H20.5? This parameter doesn't exist in 20. : (

No wonder that I couldn't find it. Tried every parameter I could find in all the settings so far. Thanks! Will give that a try.
User Avatar
Member
39 posts
Joined: 2月 2017
Online
Huh.. you're right, this setting doesn't exist in 20.0, only 20.5, just checked. I wasn't aware that this is a new feature.
User Avatar
Member
141 posts
Joined: 11月 2017
Offline
In my example: What's kind of funny is the different shadow terminator if you switch from Cpu to Xpu or vice versa.
User Avatar
スタッフ
42 posts
Joined: 5月 2022
Offline
The Bump Shadow Terminator is H20.5 feature and Karma CPU only(atm).

The next daily build will have a fix to use the smooth goemetry normal so that the facets are not visible as in the above snapshot.
  • Quick Links