Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: alexyork on 2021-02-25, 13:23:36

Title: [Solved] Terminator Shading Fix causing shading issues
Post by: alexyork on 2021-02-25, 13:23:36
Hey devs,

We have discovered that the default 0.0 value of the Terminator Shading Fix is actually causing some shading issues to appear on dodgy geometry. Of course the underlying issue is the dodgy geometry, but interestingly setting the TSF to 1.0 (disabling it) removes all these shading artefacts. We are working with some insanely detailed geometry provided to us by clients that we cannot hope to clean up fully, so this "fix" reversal works really well. But of course it means that we then start to get the terminator bug elsewhere in scenes (typically strong sun hitting cushions etc.).

Uploading a max file to show this now using the private uploader - Geometry.max. To test it just stick the value up at 1.0.

Cheers,
Title: Re: Terminator Shading Fix causing shading issues
Post by: pokoy on 2021-02-25, 19:25:32
If the data comes from a CAD app then the mesh has explicit normals, the terminator fix doesn't work well in that situation.
Title: Re: Terminator Shading Fix causing shading issues
Post by: romullus on 2021-02-25, 19:40:41
Maybe a checkbox "ignore on geometry with explicit normals" somwhere in dev/experimental rollout?
Title: Re: Terminator Shading Fix causing shading issues
Post by: alexyork on 2021-02-26, 15:11:59
Or ideally if Corona worked a bit more intelligently and could apply the fix on objects without explicit normals only?
Title: Re: Terminator Shading Fix causing shading issues
Post by: pokoy on 2021-02-26, 15:18:50
Or ideally if Corona worked a bit more intelligently and could apply the fix on objects without explicit normals only?

I asked about this when I first encountered this but the answer was it's either all or nothing, unfortunately.
Title: Re: Terminator Shading Fix causing shading issues
Post by: Aram Avetisyan on 2021-04-05, 06:55:20
Hi Alex,

I took a look at the file and here are my investigations. Maybe you will find them helpful. Of course, some of the points mentioned below may had been already tried by you.

• Anything >0.5 for the terminator shadow shift seemed to fix shading artifacts on the model.
• I noticed that the XForm for the model was 1000%. Resetting it and welding vertecies with 0.05mm threshold did fix the problem. Rendered as expected with 0.0 shadow shift.
• There has to be something with the way it was imported/generated/converted in 3ds max, as dashed (hidden) edges are visible in Editable Poly, and for basic shapes, dashed line appear only when retriangulating/turning the edges and then they disappear. For the model you provided, they seemed to not go away/turn invisible in any case (even when converting to Editable Mesh, making some of them visible and some of them not and then converting to Editable poly) and it would be interesting to know how that happened.
• An interesting solution/workaround I found, was turning on NURMS subdivision (just checking it in in Editable Poly) for the model. It does show up bad in the viewport but renders completely fine. Shadow shift is 0.0 in this case as well. If there is a quick/one click solution (like terminator shadow shifting) you are looking for, maybe this can be one.
Title: Re: Terminator Shading Fix causing shading issues
Post by: alexyork on 2021-04-06, 10:12:17
Hi Alex,

I took a look at the file and here are my investigations. Maybe you will find them helpful. Of course, some of the points mentioned below may had been already tried by you.

• Anything >0.5 for the terminator shadow shift seemed to fix shading artifacts on the model.
• I noticed that the XForm for the model was 1000%. Resetting it and welding vertecies with 0.05mm threshold did fix the problem. Rendered as expected with 0.0 shadow shift.
• There has to be something with the way it was imported/generated/converted in 3ds max, as dashed (hidden) edges are visible in Editable Poly, and for basic shapes, dashed line appear only when retriangulating/turning the edges and then they disappear. For the model you provided, they seemed to not go away/turn invisible in any case (even when converting to Editable Mesh, making some of them visible and some of them not and then converting to Editable poly) and it would be interesting to know how that happened.
• An interesting solution/workaround I found, was turning on NURMS subdivision (just checking it in in Editable Poly) for the model. It does show up bad in the viewport but renders completely fine. Shadow shift is 0.0 in this case as well. If there is a quick/one click solution (like terminator shadow shifting) you are looking for, maybe this can be one.

Hey Aram,

This is all super interesting, thank you! I'll pass it on to my team and will let you know our findings too.

Cheers,