Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: LorenzoS on 2025-01-27, 15:35:54

Title: CoronaRayswitchMtl not as aspected
Post by: LorenzoS on 2025-01-27, 15:35:54
Hi,
I notice an unjustified difference between the material on the left and the one on the right.
On the left i used a legacy material and on the right i used the same material inside a rayswitchMtl, see attachment.

I don't think it works as aspected.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: romullus on 2025-01-27, 15:44:01
Things i would try: a. plug the same normal map to override material, b. use rayswitch map instead of material to override diffuse colour only (assuming that your goal is to eliminate excessive colour bleeding).
Title: Re: CoronaRayswitchMtl not as aspected
Post by: TomG on 2025-01-27, 15:53:58
Yep bear in mind that the reflect override affects how the material shows in reflections - including reflections of the same material in itself. So a ray can be reflected off the carpet with displacement, and would have intersected with another point on the carpet with displacement, but without the displacement it does not intersect that another part of the carpet (now that the carpet is a completely flat plane according to how it is seen in reflections). And even where it does still intersect with the carpet, the result will be different given the carpet is both flat AND grey when seen from a reflection ray.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: maru on 2025-01-27, 16:00:47
Looks like on the left you are using displacement and on the right you aren't. You can use a Corona Displacement Modifier on top of your carpet and plug your map there, or (AFAIK) you can plug your displacement map into the displacement slot of the Global Illuminator material.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: LorenzoS on 2025-01-27, 16:02:28
a. not works
b. it works

On the old release of corona, RaySwitchMtl woked as aspected, i can't say which exactly, maybe 10.

Quote
Yep bear in mind that the reflect override affects how the material shows in reflections - including reflections of the same material in itself. So a ray can be reflected off the carpet with displacement, and would have intersected with another point on the carpet with displacement, but without the displacement it does not intersect that another part of the carpet (now that the carpet is a completely flat plane according to how it is seen in reflections). And even where it does still intersect with the carpet, the result will be different given the carpet is both flat AND grey when seen from a reflection ray.
pluggin the original material on the reflect override and on the refraction override not solve.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: maru on 2025-01-27, 16:04:22
Check my comment above. I'm pretty sure displacement on/off changes the shading.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: LorenzoS on 2025-01-27, 16:14:54
Quote
Looks like on the left you are using displacement and on the right you aren't. You can use a Corona Displacement Modifier on top of your carpet and plug your map there, or (AFAIK) you can plug your displacement map into the displacement slot of the Global Illuminator material.
I tried it didn't work for me
Title: Re: CoronaRayswitchMtl not as aspected
Post by: maru on 2025-01-27, 16:48:35
Can you share your results with displacement on?
Can you also share your box scene with textures?
Title: Re: CoronaRayswitchMtl not as aspected
Post by: LorenzoS on 2025-01-27, 17:24:14
This is the scene i worked
Title: Re: CoronaRayswitchMtl not as aspected
Post by: maru on 2025-01-28, 17:30:35
The issue is caused by Subsurface Scattering enabled in the red material. Since SSS "counts" as GI, if you plug a gray material into the GI slot, you end up with a different result than when using the red material only. I'm afraid in this situation the only solution is to disable SSS for the red material.

I have to admit it took me a while to find the culprit.
Title: Re: CoronaRayswitchMtl not as aspected
Post by: LorenzoS on 2025-01-29, 10:38:50
Thank you Maru,
yes disabling SSS it works.

Quote
I'm afraid in this situation the only solution is to disable SSS for the red material.
no problem
Title: Re: CoronaRayswitchMtl not as aspected
Post by: romullus on 2025-01-29, 11:22:24
Would it work if you'd enable SSS in override material instead of disabling it?
Title: Re: CoronaRayswitchMtl not as aspected
Post by: maru on 2025-01-29, 11:31:36
I tried that but it never gave the same results. This is because SSS uses both the diffuse color and the settings available under SSS. To make it work, we would need to use the same diffuse color as for the original material, which would be the same as not using rayswitch at all. :)