Author Topic: Reflection visible in refraction AOV  (Read 1345 times)

2022-07-05, 15:46:23

aldaryn

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hi Everyone,

I'm not sure where to post this issue. At first, I was thinking to post is as a bug, but I have a hunch that this is actually a feature how corona handles things, so this might be more of a feature request or help request.

Our studio mainly does architectural and product visuals and ever since the new propagate maks options were implemented for reflective and refractive rays the refract render element contains a portion of the reflected rays as well. This makes our work rather complicated, as we use the refract element extensively during image and animation post processing. To be able to manipulate only the stuff that is refracted is quite important for us.

I've included a very simple scene/image to show the problem.
Two teapots, and a simple box in between. All have Corona Physical shaders. Yellow teapot is in front, magenta teapot is behind the "glass wall". The glass wall, (a simple box) has the Corona Physical hader preset "Glass" applied, again, to make thing as simple as possible.
You can see that the refract render element contains the reflection of the yellow teapot superimposed on the refracted image of the magenta teapot.

( Note: when using VRay for example, the reflected part is not visible in the refracted render element. This would be the preferred behavior, I suppose. )

Should this be considered a bug? Is there a workaround? Right now we have to render each scene twice. Once with glass shaders visible and once with all geometry with glass shaders (or any refractive shader for that matter...) hidden and this is very cumbersome so to speak.

Many thanks for any info or suggestions!

2022-07-06, 13:23:24
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12714
  • Marcin
    • View Profile
Hi, this is currently expected. If you look closely at your render to the left and the one in the middle, you will see that the left one has double reflection of the yellow teapot visible, and the one in the middle has a single reflection. This is because one of the reflections is an internal reflection (reflection of an object on the backside of the glass) and Corona counts this as refraction (technically this is something that passes through the glass).

Maybe using cryptomatte could help in this case?

I also think V-Ray would be a better choice here as it is more flexible when it comes to non-physical effects like this.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-07, 11:39:53
Reply #2

aldaryn

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hi Maru,

Many thanks for your reply!

I had the feeling that this is how it should work and the reflection I see in the refraction AOV is there because it's an internal reflection that was refracted, hence contributes to the refraction component from there on after.

I did a quick test with VRay as well, and, interestingly, this internal reflected component is entirely missing in those renders. So the VRay rendering should be considered incorrect? I always thought that reflections/refractions have been something that were completely physically accurately rendered for some time now in all engines. Nevertheless, our studio uses Corona, and I doubt that this will be an issues that forces us to switch back to VRay. :)

I believe there is no way not to render internal reflections, so we're stuck with this. Cryptomatte or any other matte won't help us here, because our 2D post department explicitly requests us to supply a reflection channel without reflections. Guess the only option is to fake the glass with a thin geometry with no actual refraction.

But again, thaks for your insight!

cheers!

2022-07-07, 13:03:51
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12714
  • Marcin
    • View Profile
I did a quick test with VRay as well, and, interestingly, this internal reflected component is entirely missing in those renders. So the VRay rendering should be considered incorrect? I always thought that reflections/refractions have been something that were completely physically accurately rendered for some time now in all engines. Nevertheless, our studio uses Corona, and I doubt that this will be an issues that forces us to switch back to VRay. :)

It seems that in V-Ray you need to enable "reflect on back side" which is off by default.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-07, 18:16:16
Reply #4

aldaryn

  • Active Users
  • **
  • Posts: 8
    • View Profile
Ah, so tehre it was...

I could remember such a parameter existed, but completely missed it. I've even opened up the "Options" group to hunt for it and found a "Double sided" option and thought that I've remembered wrong and this was the parameter my mind remembered as "reflect on back side" Thanks! Been a while since I last used VRay and got rusty I guess. :D

I've tried to look for a workaround on the original issue and for now opted to use the legacy shader with a refractive IOR of 1.0 (for planar glass panels it will make no visible difference), this completely shuts off any internal reflections and the render element remains "clean". For the time being this will do the job well. For the glass edges, where visible, a different shader with proper IOR takes care of the refractions.

Many thanks!
« Last Edit: 2022-07-07, 18:21:22 by aldaryn »