Author Topic: CoronaRayswitchMtl not as aspected  (Read 569 times)

2025-01-27, 15:35:54

LorenzoS

  • Active Users
  • **
  • Posts: 324
    • View Profile
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.

2025-01-27, 15:44:01
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9160
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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).
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2025-01-27, 15:53:58
Reply #2

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5979
    • View Profile
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.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2025-01-27, 16:00:47
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13390
  • Marcin
    • View Profile
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.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-01-27, 16:02:28
Reply #4

LorenzoS

  • Active Users
  • **
  • Posts: 324
    • View Profile
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.

2025-01-27, 16:04:22
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13390
  • Marcin
    • View Profile
Check my comment above. I'm pretty sure displacement on/off changes the shading.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-01-27, 16:14:54
Reply #6

LorenzoS

  • Active Users
  • **
  • Posts: 324
    • View Profile
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

2025-01-27, 16:48:35
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13390
  • Marcin
    • View Profile
Can you share your results with displacement on?
Can you also share your box scene with textures?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-01-27, 17:24:14
Reply #8

LorenzoS

  • Active Users
  • **
  • Posts: 324
    • View Profile
This is the scene i worked

2025-01-28, 17:30:35
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13390
  • Marcin
    • View Profile
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.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-01-29, 10:38:50
Reply #10

LorenzoS

  • Active Users
  • **
  • Posts: 324
    • View Profile
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

2025-01-29, 11:22:24
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9160
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Would it work if you'd enable SSS in override material instead of disabling it?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2025-01-29, 11:31:36
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13390
  • Marcin
    • View Profile
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. :)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us