Hello,
I’m trying to render an edge lit “3D” lamp. It is made of an acrylic plate, engraved with laser or CNC, lit by an LED strip on one side (tipically the bottom side). Of course it’s a fake 3D.
In Blender, the engraved graphic can be modeled as a thin white or translucent matte material. It is inside the large transparent slab.
Of course, this simple system can be rendered by giving the graphics an emission. If instead we want to render it faithfully, this simple system results incredibly tough. I tried with Cycles, V-Ray, Redshift and LuxCore. It seems that only the latter is able to simulate the scene correctly…
Does anyone have experience with this type of simulation? Ideas?
Thanks
Welcome!
Cycles is not good at passing light through glass materials (refractive caustics). The simplest way to do it that will give you the most control would be by cheating and using this trick in the glass material.
This setup will give you complete control over the glass’ shadow. The shadow is going to use the transparent BSDF instead of trying to calculate the light going through the more complex glass. By changing the transparent color, you can control exactly how much shadow you want for the glass and what color it should be.
–
There are other, more realistic but slower ways to do it in Cycles.
You can switch to CPU rendering and activate path guiding. This will help the light better pass through glass and will give you the most realistic result. For best results, you will also want to reduce “filter glossy” and disable clamping. Those settings exist to blur and limit caustics out of existence to prevent noise, but path guiding can make use of those more complicated paths.
This is the slower option and I would only use it for a static image. path guiding is still experimental and is not yet available for GPU. It’s very slow as a result.
There is also the shadow caustics feature which would be perfect for this. It’s not ideal in every situation, but it works well for an object encased in glass. The light will need to be an actual light object and the glass and engraved mesh will need to be separate. Here is a video (from when it was experimental, but it still works the same way).
–
LuxCore can use its “light tracing” technique to render this correctly. It can do this thanks to its bidirectional capabilities. Cycles doesn’t have such features, because they also come with downsides (preventing light linking and lots of shader effects).
Thank you, your explanation is very detailed. It remains surprising that a relatively simple optical phenomenon is so difficult to simulate by modern rendering engines.
Cycles and most modern renderers have a hard time with glass in particular because they are backward path tracers.
The way they work, the light rays start from the camera and bounce through the scene in reverse until they manage to find the light source that originated them. This is good in most situations, because it greatly reduces the number of wasted rays. If you were to trace starting from the lights, most rays would hit outside the camera’s view and be wasted.
However, this is a problem if the light source is behind a refractive material, because the refraction bends the path a ray would need to take to find the light, preventing a direct tracing. This means that without the techniques I explained, only the light rays that happen to randomly bounce into the glass with the correct angle by pure chance will find the light source.
-
Replacing the shadow with transparency helps because the transparent shader doesn’t bend rays and Cycles can actually find the light through it.
-
Path guiding helps by increasing the chances that light rays will be sent toward bright parts of the scene, and that includes the glass the light is coming through. It doesn’t help light go through the glass directly, but many more rays will attempt it and will find the light.
-
Shadow caustics will actually calculate the bent path needed for the light to be found through the refraction. This is expensive and needs to be told which object plays which role, which is why you need to enable it per object.
-
Luxcore has bidirectional capabilities. It can trace from both the camera and the lights. This allows beautiful, realistic caustics, but prevents light path manipulation. It locks you into a physically correct behavior for light sources.