6
$\begingroup$

I have a solid glass block with a diffuse sphere inside. To keep the geometry simple, the glass has no hollow portion to fit the sphere inside. This means that I must "fake" the contact surface between the glass and the diffuse sphere.


NO CLEARCOAT

The contact surface is just a diffuse shader.


WITH CLEARCOAT

The contact surface is diffuse with a clearcoat on it. Clearcoat because the ball is surrounded by glass, and glass is reflective.


What's the physically correct way?

$\endgroup$
  • 2
    $\begingroup$ 3D graphics are not physically correct, ever, period. Diffuse surfaces are not physically correct. Borderless transitions are not physically correct. If you want to improve the realism of your image, make an interior border between the glass and the diffuse sphere. $\endgroup$ – Nathan Aug 12 '18 at 22:30
  • 2
    $\begingroup$ Nathan, this is not going to improve realism of the image at all. You are mistaken. One surface is enough to mark the end of one material and the start of another. 2 surfaces will only cause so called z fighting rendering errors or if a gap between them is left to avoid that, it will render it precisely as it sounds - as a gap of air in between glass and the object. If the gap is not intended then making interior surface of glass will in fact make the render a lot less realistic. $\endgroup$ – Martynas Žiemys Aug 15 '18 at 6:45
6
+50
$\begingroup$

If an object is diffuse it will be diffuse in glass same as in the air or in water. If you drop something diffuse into water it does not become reflective because water is reflective it stays diffuse unless there is some other material in between it and water like for example air bubbles stuck in surface imperfections, dirt or oil, or something else or if the materials react chemically. If the object is fully submerged in another material, the way it reflects light will not change. The type of light that can reach the object or the amount of it can change because of the material it is in, but not it's reflectivity. If there is no interface of two transparent materials there will not be any change in the direction light travels as well, so there is no need to do anything at all for it to be accurate if an opaque object is fully submerged in a transparent material.

The first image is physically correct if there is nothing inbetween the object and the glass and if the object is diffuse. Volumetric effects should work correctly as well, since all that is needed to calculate them is the depth from the surface of the glass to the surface of the object.

$\endgroup$
  • 1
    $\begingroup$ As I understand it, though, the problem in Cycles is that the glass shader, or the primcipled shader with transmission set to 1, require that the transparent object be solid. I think this applies here because I get a different render when I simply place the sphere in the cube than I get when I use the technique in my second answer. $\endgroup$ – Marty Fouts Aug 12 '18 at 19:58
  • 2
    $\begingroup$ You would get different results if the object was in glass and if there was a gap of air inbetween the glass and the object. $\endgroup$ – Martynas Žiemys Aug 12 '18 at 20:20
  • 2
    $\begingroup$ Surely the ray is deflected appropriately by the front-facing face of the refractive material, and then, if scattered by the diffuse material, is deflected appropriately again by the back-facing face on the way out? This is not the same problem as might arise at the boundary between two refractive materials, where the relative IOR has to be calculated $\endgroup$ – Robin Betts Aug 14 '18 at 23:03
  • 2
    $\begingroup$ That's right. So this is 'physically accurate'. Of course ray scattering functions and the way light is reflected off the diffuse surface and many other things are not exactly what happens in reality, but this is as physically accurate as it is intended to be. $\endgroup$ – Martynas Žiemys Aug 15 '18 at 6:32
  • 2
    $\begingroup$ The way I see it this answer is almost complete with the difference being that the fresnel on the embedded object would be affected by being embedded in a material with a different refractive index. However, I don’t know enough about the physics of this to be able to add any justification to this or suggest exactly how the fresnel should be adjusted to compensate, only that intuitively it would be affected. $\endgroup$ – Rich Sedman Aug 16 '18 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.