Cycles Render: Glass BDSF Not Working

Hello all,

Cannot find an answer to this anywhere, so thought I’d give in and ask the experts.

I’m following a tutorial to make an eye. However, after copying exactly how their node editor looks on the outer eye (ie. the glossy coat), I get an entirely different result.

Here’s how it’s supposed to look:
http://s4.postimg.org/72k14jwa5/f_Bf_Hx.jpg

Here’s how it looks when I render it with various lighting.
The preview, however, looks like it’s supposed to (albeit with some artifacting):
http://s13.postimg.org/5k1zeh3lj/f_Bf_FP.jpg

Anybody have any ideas on why this has happened?

Can you share the .blend or the node setup with render settings? It’s difficult to tell without.

Of course - sorry. Here it is:
http://s24.postimg.org/7r0ueyo45/f_Bo_GH.png

What’s the tutorial? That’s a fairly useless node setup unless the mix factor is driven by something like Is Shadow Ray.

It would also help if you upload the .blend to www.pasteall.org/blend, there are a lot of things that could be going wrong here.

http://www.pasteall.org/blend/34251

I’m not very experienced with Cycles Render, so I’m really sorry if it turns out to be something really simple.

Ok, it’s just because you have a geometry under the glass surface, so it can’t refract the background like in the preview. Remove it and it will match.

The tutorial was this:

Not quite sure how he got it working there with the sphere underneath, but I presume since the tutorial is a year old, probably an earlier version of Blender.

Thanks for all your help anyway though. I’ll look for more recent tutorial!

That’s not a problem here, there’s supposed to be geometry underneath.

I went ahead and made some changes to your file.

http://www.pasteall.org/blend/34252

I changed the glass to have a bit of roughness. Without it, you won’t get any highlights. No reflective surface in the real world has a roughness of 0 anyway.

I moved the lamp. It was in a position that made it impossible to see reflections from the front.

I added a material to the inner eye object. The default was close to pure white, which was completely blowing out the glass layer highlights. This is really dark at the moment, but this will likely be textured in the future anyway, so just consider it a “debug” material.

I fixed up the node setup. There’s no reason to mix Glass and Transparent by 50%. However, mixing by Is Shadow Ray like I’ve done will allow the glossy outside while still allowing you to see the rest of the eye inside.

I turned off caustics in the render settings. Just trust me that you don’t want to wait for caustics in this case.

Let me know if you have any other questions!

You are amazing.
Thank you so much.

Is it possible to turn off the caustics for specific objects only instead of everything?

Not currently. Having per-material controls for this would probably be useful in some cases. I’ll bug Thomas and Sergey about it. In general though, caustics and forward path tracing don’t get along very well.

You’re very welcome.