Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => Topic started by: dcode on 2018-01-08, 23:43:25

Title: Incorrect shading on imported geometry
Post by: dcode on 2018-01-08, 23:43:25
Hi ,

I am working in version 1.6 and my imported polygon geometry (converted from Rhino) is not shading correctly.
I tested in Vray and Fstorm and got the expected results so it is a Corona issue.
Attached are quick screen grabs and 3D File.

Tested on both a dual Xeon E5-2687 and Threadripper on Win 7 and 3DS Max 2016

Cheers,
Title: Re: Incorrect shading on imported geometry
Post by: maru on 2018-01-09, 10:04:22
Have you tried using the "smooth" modifier, or selecting all faces and using "retriangulate" option in editable poly tools?

Another idea is disabling the terminator fix and checking if it helps:
-go to development/experimental rollout - https://coronarenderer.freshdesk.com/support/solutions/articles/12000021288
-under "terminator handling" set shadow shift to 1

If that does not help, it would be best if you could send us the scene - https://corona-renderer.com/upload
Title: Re: Incorrect shading on imported geometry
Post by: romullus on 2018-01-09, 11:08:08
@maru, i think the scene is already attached to the original post. As for smoothing options, usually geometry from CAD softwares comes with explicit normals and almost any manipulation inside 3ds max, would ruin those beyond repair.
Title: Re: Incorrect shading on imported geometry
Post by: pokoy on 2018-01-09, 11:08:51
Maru, geometry from Rhino or other CAD packages will import with its own set of explicit normals, using the smooth command or modifier will ALWAYS result in worse shading.

It's likely that this is the shadow terminator fix wich doesn't work well (at all) with explicit normals. Follow Maru's suggestion and set it to 1 to disable it.

BTW, Corona should either get a fix so it supports explicit normals in the shadow terminator fix (preferred) or it should throw a warning when a mesh with explicit normals is found upon render start, together with instruction on how to disable it. Chances are more people from the CAD world face the problem but don't ask for help here and instead give up on Corona thinking it can't render CAD geometry.
Title: Re: Incorrect shading on imported geometry
Post by: NicolasC on 2018-01-09, 12:38:01
Hello,

I've just found that, not sure it will help you, dcode, but worth trying:
http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax (http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax)

Title: Re: Incorrect shading on imported geometry
Post by: pokoy on 2018-01-09, 12:58:05
Hello,

I've just found that, not sure it will help you, dcode, but worth trying:
http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax (http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax)
This is something else I guess. The point is to keep the explicit normals (and NOT using max smoothing routines). The problem is that Corona's terminator fix doesn't play well with explicit normals and this should get fixed, for the time being the only way to get artifact-free renders with explicit normals is to disable it.

See post #14 here:
https://forum.corona-renderer.com/index.php?topic=18509 (https://forum.corona-renderer.com/index.php?topic=18509)
Title: Re: Incorrect shading on imported geometry
Post by: romullus on 2018-01-09, 15:24:22
Hello,

I've just found that, not sure it will help you, dcode, but worth trying:
http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax (http://polycount.com/discussion/181833/any-way-to-transfer-explicit-normals-to-smoothing-groups-in-3dsmax)

That could only work if original model would be created as polygonal with smoothing groups, then exported and reimported with explicit normals, but without smoothing groups. But that wouldn't help with imports from CAD.
Title: Re: Incorrect shading on imported geometry
Post by: NicolasC on 2018-01-09, 15:27:04
okok I get it ;)
Title: Re: Incorrect shading on imported geometry
Post by: atin on 2018-01-09, 18:11:23
Wrong Tread, sorry; same problem in c4d ...

-> https://forum.corona-renderer.com/index.php?topic=18794.0
Title: Re: Incorrect shading on imported geometry
Post by: dcode on 2018-01-09, 18:52:15
Hi guys,

Thanks so much for the prompt  help, indeed you are all correct!
One of our poly modelling hotshots here had a look at the smoothing and normal options and gave up mentioning exactly what you said about explicit normals, so adjusting the shadow terminator shift completely worked!

Thank you!

Maru, the file is attached to the thread in case you ever need an example of this case but more than happy to upload somewhere else if required.