Glass shader and shadows

from my experiments so far with the inbuilt glass shader it seems like shadow rays don’t respect the materials refraction transmission? (e.g. a perfectly clear glass sphere with zero absorption scale while totally transparent still casts an opaque shadow as if it were solid)

Is this a bug, current limitation or some sort of pilot error on my part? (I can’t see anything obvious except for either setting the geometry to not cast shadows (which isn’t technically correct either) or setting the shaders opacity attribute (which as far as I can see is just a sort of alpha blend and not really designed to be part of a physically accurate sense of refractive transparency)

interesting comparisons to Iray (left column is RTX, right column is Iray)

roughness = 0, IOR = 1.1

roughness = 0.1, IOR = 1.5

roughness = 0.8, IOR = 1.5

roughness = 1, IOR = 1.25

the middle two have a dome light on which is why the shadow looks more lit up there

weirdly the Iray render shows light penetrating through to the surface on the ground only at zero or near zero roughness and low IOR, whereas the RTX pathtracer only starts to hint at some of that at max roughness…

obviously the Iray internal refraction and colour tinting is way better in general

guessing maybe caustics aren’t being properly computed on either? (the realtime renderer actually feels more like convincing glass than the RTX mode here)

in RTX Path Trace, try adjusting your firefly settings. These can sometimes clamp caustics. Also, light cache had a bug, please trying disabling.

mmm - might have had something funky going on with the last tests I did (create was complaining in the console about memory if I recall)

I redid this and this time all 3 render engines looked pretty much more similar - differences in the actual glass surface are more minimal, the big difference being the transmission of light through the glass onto the floor, where only Iray produced what I would expect - no errors in the console this time

I did switch off firefly capping and caching as suggested - didn’t make any difference though

So looks like the actual glass rendering is pretty consistent after all (ie ignore previous tests!) but only Iray is doing something ‘correct’ enough for light transmission onto other surfaces…

this worked at a much more expected range of roughness and IOR this time also, which again speaks to something funky going on last time with GPU memory faults


RTX pathtraced:

RTX realtime: