Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: Naxos on 2019-05-15, 15:20:55

Title: RaySwitch won't render as it should with Layered Mtl
Post by: Naxos on 2019-05-15, 15:20:55
Hello there,

I think i may have found a bug, for real !

Here is the situation : i've used a layered material and - for optimization purpose - the materials that are connected to it are rayswitch ones.
Of course, the raySwitch has the correct material in reflex / refrac / direct overrides, but a simplified one (dull color simple mat) in the Gi override.
The objects (and the preview) with layered material assigned are rendered with the direct look of the dull simple one, instead of the one plugged into the "direct override" slot.
See attached picture, the teapot should be shiny grey.

Also i've tried to put a mask (coronaColorMap) in the mask slot, to test : same issue.

Edit : Corona is 3 hotfix 2, tested with 3dsmax 2018.4 and 2019.3
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: Naxos on 2019-05-15, 15:32:49
here a max scene to reproduce the thing :
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: maru on 2019-05-15, 16:08:30
Looking into this...
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: maru on 2019-05-15, 16:24:47
Reproduced and logged.

id=352747647

There should be a workaround, I'm on it...
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: maru on 2019-05-15, 16:29:30
Here is the workaround: use the rayswitch map instead of rayswitch material.
So if you want your material to be non-reflective to GI, plug a rayswitch map into the reflectivity slot, and set all colors to white and GI to black.

In this example here GI is red and direct visibility green.
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: Naxos on 2019-05-15, 16:40:52
Here is the workaround: use the rayswitch map instead of rayswitch material.
So if you want your material to be non-reflective to GI, plug a rayswitch map into the reflectivity slot, and set all colors to white and GI to black.

In this example here GI is red and direct visibility green.

Nice idea !
Do i need to do that only for the reflectivity slot (the main reason - as you know - is to speed-up render to get less noise
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: maru on 2019-05-15, 16:43:31
Yes, reflectivity is mostly responsible for fireflies when sun hits the surface. You can of course adjust other properties too.
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: Naxos on 2019-05-15, 17:42:52
Great !
Title: Re: RaySwitch won't render as it should with Layered Mtl
Post by: XLS88 on 2020-04-29, 15:21:16
Hello, I confirm. Corona multi-layer material does not work with rayswitch. Moreover, the corona rayswitch material works faster than the rayswitch map. Here are examples with the map and material separately. As the example shows, the number of rays is greater on the rayswitch material than on the map.


Please consider the possibility of working with rayswitch mtl together with corona layered in the following render versions