Glass renders no reflections and too dark shadows, why?

Hi @nathanletwory,
Why doesen’t glass have any reflection?
If I set the glass material to have refraction =1 then looks like this:

I put it next to a similar object with a metal material for comparison.

And the transparent object has way to much shadows.
Either it let’s light through, or it doesn’t :wink:

The glass BSDF in Cycles is actually not really transparent, but opaque. Having glass act like… glass we have a trick with a mixed in transparency BSDF, controlled by the shadow ray. On coplanar, incident faces like your object on the GP you’ll get the black blotch. You’d have to offset the GP down ever so slightly to work better.

Glass will be reflective really only at grazing angles.

Edit: There is somewhere a patch out there that makes Cycles glass actually transparent (refraction BSDF too, I guess), but I haven’t looked at it.

Edit2: It looks like between 6.0 and 6.1 I may have broken Rhino Glass with IOR set to 1.0 RH-43938

Edit3: regular glass has reflection...

Hi Nathan,
Good stuff!

And moving the ground was of course the first thing I tried as I have rendered transparent stuff for 20 years :slight_smile:

But this is a bug in how cycles handles the groundplane, mabye related to how it handles the groundplane reflection color wrongly too?

It is easy to see that it is a bug by adding a simple plane under the object and compare it:

Ah yes, well, that is because of the shadows-only ground plane. It does not work the same as an actual plane - lots of hacky stuff going on there. If you are still on 6.0 then you also still have a slightly worse version of the reflections and refractions in combination with the ground plane. You probably see Reflection of groundplane? Monochrome . This is fixed in 6.1.

Well, it should… :stuck_out_tongue:
And, I understand that it is “different” and that it is a difficult hack from a programmers point of view, but a users point of view isn’t that forgiving, at least not since shadowcatchers has been around for decades in other engines. At least not “bad-different” because now it looks very unnatural.
Good to hear that the monocrome groundplane is fixed! Well done! So I am sure you’ll fix this as well :slight_smile:
I’ll keep on testing and bugging you every now and then though!
Cheers!

Well, as far as I know the only good way to do shadows-only groundplane with Cycles is to composite, and I’d prefer if something like that was implemented. Doing this in one go with Cycles only isn’t really a good solution.

I do want to add some simple compositing abilities, render layer management and such, with which the current result won’t happen at all. Since there is no compositing available yet (and wasn’t in the scope of the current effort) the shadows-only GP we have is really just a hack. It looks OK, but cannot act the same. There will be just technical limits until those are resolved. And in my opinion the correct solution is (under-the-hood) compositing.

1 Like

Under the hood compositing, if extended to all Rhino architecture, would give a very flexible and powerful way of creating all kinds of interesting viewmodes.

Examples:

Artic/AO pass + technical

Emap + transparent wireframe overlay

User-defined thickness of view-dependent object outline/silhouette

Glow (even pulsating) of luminescent objects (like LEDs)

Fading wireframes (view-dependent)

Export passes to layered .PSD

Etc…

G

2 Likes

Indeed. This is one of the things I secretly fantasize about when I have a moment time.

1 Like

Hi guys, I just revisited glass and Raytraced and see that it handles shadows only groundplane much better now! Great work!

But the glass material is soo limited that it is impossible to get proper glass look. Here I have pure white, about 12% gray and black glass.


I wish it wasn’t so hard on the tint AND that white would appear transparent and not milky-washy.
Anything you could do to fix this?

This is by the way the OpenGL view of the same three materials… :expressionless:

It all depends on the environment, lighting. White as transparency color for glass will be transparent, but what you are seeing is the fresnel reflection. Here a simple scene with also two glass panes in (one very thin, one thick). Due to the ange there is no discernable (fresnel) reflection in the glass, so it appears quite invisible:

I’m guessing you want just less reflection?

Hi Nathan, not exactly.
I made a new scene to illustrate what I am talking about:


That glass is in an entirely BLACK scene with just a rectangular light, and the glass material looks milky white. The light has an intensity of 500. So the material collects too much light yet reflects too little (the reflected panel should be 100% white IMO (burnout))

With the light at the default 100 intensity setting it looks a bit better ofcourse:

But clear glass doesn’t collect light like that, it either passes it through or reflects it. (otherwise fiber optics would have one hell of a time :wink: )

The material looks good in a scene with bright objects though, but if you look at the base then you’ll see that it appears to gather light and overexpose the area that should be in slight shadow.

And you see it even better here when the glass is slightly elevated:

I’ll pm you the file, just hide the backdrop to see the effect I illustrated above with the black scene.
(But that said, this is a nice render and a good result from JUST a single rectangular light, in an entirely black scene with no hdri reflections or nothing! So I hope this encourages you more than it frustrates you!)

And that “light gathering” doesn’t happen on a shadow cathcer groundplane…


Here I added some strength to the HDRI too.