Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: iacdxb on 2017-11-13, 07:06:45

Title: Double reflection over glass
Post by: iacdxb on 2017-11-13, 07:06:45
Hi,

Getting double reflection over glass, outer and inner. Any idea how can I fix that...?
Model I think it is ok. Some reflection and refraction issue i think.

...
Title: Re: Double reflection over glass
Post by: Beanzvision on 2017-11-13, 17:03:43
Strange, I just did a quick test render and it seems to be fine here. Is there a mesh inside for a liquid?
Title: Re: Double reflection over glass
Post by: iacdxb on 2017-11-14, 03:19:27
yes... inside also mesh.

Glass with thickness and then mesh for liquid.

...
Title: Re: Double reflection over glass
Post by: Eddoron on 2017-11-14, 03:34:25
This seems to be a nested dielectrics issue then.
The approach varies from engine to engine using different techniques, like the "infinitesimal gap" or inverted normals for one side of the fluid or have the fluid mesh slightly penetrate the glasses mesh etc.
I don't know how corona handles this and it would be nice to hear from the devs about the optimal solution.

edit: seems like the standard C4D approach works with the liquid mesh penetrating the walls slightly (0,2% larger in the pic).
At same size, checkerboard artifacts would appear.
Title: Re: Double reflection over glass
Post by: iacdxb on 2017-11-14, 04:16:30
ahhhh..... yes corona handle it a bit different. glass, liquid and then glass thickness....!!!
https://coronarenderer.freshdesk.com/support/solutions/articles/5000515618-how-to-model-a-liquid-in-glass-in-corona-

"STRANGE METHOD"

...

Title: Re: Double reflection over glass
Post by: Cinemike on 2017-11-14, 06:33:48
ahhhh..... yes corona handle it a bit different. glass, liquid and then glass thickness....!!!
https://coronarenderer.freshdesk.com/support/solutions/articles/5000515618-how-to-model-a-liquid-in-glass-in-corona-

"STRANGE METHOD"

...

Glass thickness?
You scale the liquid a big so it extends into the glass. That's what I know from the AR, from Vray and it works fine in Corona, too, just like in the tutorial.
Title: Re: Double reflection over glass
Post by: iacdxb on 2017-11-14, 06:41:36
C4D AR and Vray works as real.... liquid mesh inside glass, not in-between glass thickness. First time saw this method.

...

Title: Re: Double reflection over glass
Post by: Cinemike on 2017-11-14, 18:55:17
C4D AR and Vray works as real.... liquid mesh inside glass, not in-between glass thickness. First time saw this method.

...

Unless we are completely misunderstanding each other, Vray works the same (as is AR):
https://www.vray.com/vray_for_rhino/manual/liquid_inside_transparent_glass.shtml
Title: Re: Double reflection over glass
Post by: Nejc Kilar on 2017-11-15, 15:54:45
This seems to be a nested dielectrics issue then.
The approach varies from engine to engine using different techniques, like the "infinitesimal gap" or inverted normals for one side of the fluid or have the fluid mesh slightly penetrate the glasses mesh etc.
I don't know how corona handles this and it would be nice to hear from the devs about the optimal solution.

edit: seems like the standard C4D approach works with the liquid mesh penetrating the walls slightly (0,2% larger in the pic).
At same size, checkerboard artifacts would appear.

I can confirm this :) With Corona you need to slightly intersect the two meshes.
Title: Re: Double reflection over glass
Post by: Cinemike on 2017-11-15, 20:24:25
There is another way, though, but it is more complicated than just "normal move" the liquid's surface into the glass:
- Create the glass vessel, create the cap of the liquid, then select the polys where glass and liquid would meet (involves cutting and connecting), and create a selection tag of them (after you joint them with the "cap").
- Assign a glass material to the whole object and a liquid material to the selection.

Works, but I always prefer the "scale" way to go.