Glass Shadows Cycles

Now this is maybe old, but I still do not get it.
So in CycleX all glass shader render with an opac shadow. Well, a bit of light shines through in a blurry way, maybe to simulate caustics, but even an all white glass color creates a shadow, but thats not realistic,
Yes I know caustics exist now in 3.1 and would do that fine, but not without costs.
For flat glass, like on windows I just use a lightray node, with shadows set to transparent through shader mix. But, why?
I mean, shouldn’t a glass shader do that right from the start? Its a trap for beginners and honestly, no other render makes it all so complicate.

It’s a fundamental limitation of a path tracer.

Any light passing through a refractive medium such as glass is necessarily a caustic - and straight path tracers like Cycles don’t handle caustics at all well.

The only way to deal with the situation is to create a fake glass (e.g. a transparent glossy mix - or the light path trick as you have done), or use a renderer that handles caustics better.

The new MNEE patch for cycles should dramatically improve things - once it lands of course.

Yeah, but that was never a thing in any other render engine. Yes caustics are great if you have complex transparent objects. For what people use 99% cases, its just a relativ thin layer of glass that has not really any effect on caustics. And again, this problem is years old and being ignored ever since. Even with Caustics you would have to enable that on every object being affected, instead of just hit render.
Sometimes I think Cycles is still in a alpha state.

Any light passing through a refractive medium is technically a caustic though. The fact that the glass is flat and doesn’t concentrate or spread the light out or form patterns is kinda irrelevant.

The only difference between these two objects is one is a flat piece of glass, and one has slightly convex surfaces and thus is focussing the light somewhat. Imagine blending between these two objects, when does a transparent reflection become a caustic (if you make the distinction). Note this image was produced using the new MNEE caustics patch.

The MNEE patch is still at an early stage of development - we dont know how it’ll function in the final build, or even if MNEE is ultimately the best solution.

When you say ‘any other render engine’ which ones specifically are you referring to and are you fairly comparing like with like? (i.e. not comparing a bidirectional path tracer with a unidirectional one like Cycles)

They could implement a “transparent shadow” cheat for the glass shader to make it easy on newer users - but it would be just that, a cheat, no different from using the light path trick.

There is always the option to use caustics instead of the simple traditional version. I mean we had that 30 years ago! I know none render engine rendering opac shadows or caustics by default.
The whole rendering process is and will always be a fake of realism. So caustics are not better, but just adding another fake method to mimic real world behavior. In the lower realism level there a simple transparent shadows. The only software I remember where had to enable that, was the scan line render in 3dsmax before it had raytraced shadows… back in 1998. Vray for example did that right in 1999 0.4 alpha version… Blender doesn’t in 2022.

Blender does have it in 2022…it’s just not built automatically into the glass BSDF.

All render engines are a compromise between realism, stability (biased vs unbiased), performance, ease of use etc.

Many rendering engines have Blender integration - if you don’t like the way Cycles works currently, even with the trivial workarounds and tools available - just download and use one of the many other render engines available.

LuxCore, Octane, Radeon, POV, V-Ray, Redshift etc.

Nobody is forcing you to use Cycles.

Yeah no one forcing me indeed. But I still don’t understand why this has no high priority. A bit like oh we have a render, its free, we will add a save function… maybe in 10 years.

It’s not high priority - because there are trivial workarounds.

What advantage would building transparent shadows automatically into the glass BSDF bring over using the light path node, or a glossy/transparent mix?

It might help a few newbies use Cycles more easily out of the box - but beyond that, anybody who has explored Cycles nodes or browsed these forums will have quickly learnt about the workarounds and will use them.

It’s just not a problem that warrants significant effort. I’d rather the time be spent reviewing and polishing an actual real caustic solution (such as MNEE) rather than implementing cheats to problems that take seconds to learn and overcome using pre-existing nodes.

Just how big a problem do you feel opaque glass shadows are?

Every room has windows.
And every glass on a table should have more or less realistic shadow.

Every room does have windows - but why do you have to use the glass BDSF for those?

What additional realism does having refraction on a flat piece of glass give you that a glossy/transparent mix does not?

Like I said - the workarounds are so trivial, what advantage would adding this by default to the glass BDSF bring other than saving you perhaps a couple of seconds of work?

The glass BDSF has other, more serious issues IMO. For example, if you give it a colour (e.g. red), the reflections also become red. This is not accurate for a dielectric material where reflections should be the colour of the incident light.

You are far better off using a glossy/refraction mix with a fresnel term in order to get colour correct reflections as demonstrated in this thread:

Cycles shader nodes are tools in a toolbox - they are not (for the most part) a complete solution by themselves. You should use an appropriate combination of tools to complete the job.

First off, there are many many new Blender asking me why. Because they all run into that trap. Second only because you have a windows, doesn’t mean you camera is not moving and not seeing the reflection, which normally is also doubled do to the use of two glass layers.
If Blender ever get a ‘real glass’ shader, well then things might be different, even if its just a ‘flat glass shader’. But honestly just to avoid the shadow casting, isn’t really a good solution.
And no, I do not depend on Cycles, but Redshift isn’t fully implemented yet and the benefit of using Eevee isn’t bad at all.

It IS a real glass shader. It’s just that it takes a gazillion samples to reach a satisfactory result so we end up having to cheat. You probably don’t model you windows correctly either, with 3 layers of glass with gas interfaces (i.e. argon gas) between, right? Yeah it lacks dispersion and Cycles isn’t a spectral tracer.


Something like that is the only thing you need to simulate clear glass for window use. You don’t have to worry about fresnel normal, and you get fresnel shadowing for free. You don’t get thickness response as you don’t need it on edge covered glass, you don’t get dimmed secondary reflections on solid glass, you don’t get “accurate” fresnel effect, and you don’t get internal reflection effects. I’m using this style for pretty much every project I do and I use single pane thin glass (for windows, not for glass railings and curved or varying thickness glass) - all that really matters are reasonable reflection levels and that it “looks real enough”.

For “pretty caustics patterns” for stuff like a glass vase with engraved and bump patterns on it, no I don’t agree we have reasonable workarounds. Might be better off rendering out a light map in Luxcore and use that as an emission texture or use a different ending all together. But not having sharp caustic pattern simulation using completely different technologies means I get to use other tricks that would be incompatible with those techs. The patch sounded like a good approach using specialized light sources not interfering with light path tricks, but it only did caustics through refractive materials (not glossy) and apparently had other severe issues as well - for now.