Learn how to render realistic glass and other refractive materials in Blender with Cycles
Since the introduction of the Cycles render engine Blender users have had built-in access to physically correct glass rendering. Though it’s significantly faster and more accurate than what we’re used to with Blender Internal, refraction can still bog down render time and confuse us with it’s behavior. This tutorial is designed to be a relevant reference for anyone’s glass-rendering endeavors.
Join Citizen for this tutorial and many others for the cost of one fast food meal a month
WHAT YOU’LL LEARN:
Kent Trammell will walk you through the shading, lighting and rendering of refractive materials. First you will see how easy it can be to set up a basic glass shader with the Glass BSDF. Then you’ll see how to gain more control by building a custom glass shader with the Refractive and Glossy BSDFs. All along the way you’ll become familiar with optimizing Cycle’s render settings for best performance verses best result. As a bonus you’ll be walked through a brilliant technique for faking believable caustics introduced by Bassam Kurdali on the Tube Open Movie blog.
Working with the Glass Shader in Cycles
Download HD Video
(26:37)
Creating Fake Glass in Cycles
Download HD Video
(26:11)


















Excellent to see more than simple poly-pushing tuts from you guys these days! Keep it up!
There’s lots more coming
speaking of things to come, when do you think the super awesome tutorial of hard surface modeling will be released?
Just what I need? I did say this before and say it now You guys like magician always know what we need..
Thanks
Exactly! This tutorial is what I need this week. Not sooner, not later. They’re magicians!
This’ll come in handy. Thanks Kent.
Thanks guys for more great tuts!
Yes,great stuf you guys rock.:)
That was well done. I learned a lot about rendering glass in Blender from this. Thanks!
Another citizen tutorial??? Oh wait, I am a citizen. ; p Sorry guys, couldn’t resist.
made me lol!
it wont load
You’ll need to either sign into your Citizen account or join Citizen in order to watch the tutorial. The black loading bar for non-Citizens is a bug right now that I’ve already reported to our web team.
You can join Citizen here: http://cgcookie.com/membership
Cheers,
Jonathan
Realy nice . learned a lot about rendering glass in blender
yey
I like Kent, good stuff mate, thanks
Say you wanted to have “writing” in/on the glass (like a mason jar) Would you apply the text mesh before or after “turning it to glass”? Would there be inherent difficulties here?
Unless you’re going for really close-up shots, this is something that would probably be best as a bump or displacement map.
Great question! What do you mean apply the text mesh? If I were you, I’d sew the text geo into the geo of the mason jar for rendering.
if you want it bumped i found the best way was to make a normal map and map that to the glass uv that is how i did the Jack daniels and Bottle sizes on the image that is in the galary above
Now that’s just ace! Cheers Kent!
Thanks so much everyone for the positive feedback! Very encouraging comments
Come on paypal! Why does it take so long to get your money on it.. Either way, probably I will see this tomorrow, looks promising!
To solve artifacs in coincident faces, instead of deleting faces in th glass, you’d better scale up the wine geometry, so its side faces lies inside the glass.
Same result an you don’t lose geometry in the case you need to “put some more wine”.
In facking caustics, if you multiply the ColorRamp o lose any color information (needed to get color caustics).
An alternative to get overbright caustics areas is to set RGB values greater than 1 in the ColorRamp.
Great tips Adriano! I really like your idea for scaling the wine geo up
Very nice! thx
Is it right the start blend bring the final scene loaded?
Yes you can save a scene as default by pressing CTRL+U, then the scene will open when you start blender
Really great tut. I especially appreciate how you are trying to balance visual effect with render times. I wish more people would include render times with there scenes and/or tuts. Something else that would be very helpful for those of us who are trying to get up to speed with cycles is to know what equipment you are using. Not in general, but specific to that project. Thanks to all of you for the great tutorials.
You make a great point. I regrettably never think to include that info. I’ll make an effort to always include that when addressing something Cycles-related.
My machine is a MacPro3,1 Quad-Core Intel Xeon 2.8 GHz, 12 GB ram, with a Quadro FX 5600
Wow quadrupled! This is absolutely brilliant and timed to perfection! I am creating some stained glass textures for a customer and trying to work out the caustics nearly had me in tears, and I’m not prone to crying (or screaming) …
Thank you, Kent and of course the person who came up with it. This tutorial is so appreciated, I set my Citizen payments to repeat. I am now a citizen for life!
We’re so glad to have you!
Where do you get your Enviroment Textures? I have been looking eveywhere and can’t find any good ones. Please help:)
Searching “equirectangular” in google yields surprisingly good results
look for FH HDRI map pack.
-Alex
Very nice, though I would have preferred the ray length technique to simulat absorption. You can get a very physically accurate setup (As accurate as you can get without volumetrics) here: http://agus3d.blogspot.com/2012/05/blender-cycles-ray-length-node-output.html
For those who are curious, the dot product of 2 vectors is a scalar quantity that is equal to the product of the magnitude of the 2 vectors multiplied by the cosine of the angle between them. The cosine of small angles is close to one, so the output of the dot product node will be high when the normal and incoming vectors are near parallel. What this means is that, when plugged into the color input of the transparency node, light will more easily pass through areas where the normals are parallel, or close to parallel to the incoming light rays. These are factor values between 0 and one I believe (assuming the incoming and normal vectors are unit vectors, that is, have a magnitude of 1) and can then be re-mapped using the color ramp node. By multiplying this by 5, you have essentially made parts of the transparent shader “super transparent,” where light is actually added as it passes through.
Sorry, it’s a lengthy explanation, but this is how I make sense of it. If there are people out there who are more familiar with this, please feel free to correct any mistakes/misunderstandings.
The ray-length technique (slightly modified) is already covered in this tutorial for the coffee shader.
Your explanation about the vectors makes sense
Glad I watched this tutorial since there were so many things I had some knowledge of that were fleshed out and explained fully, particularly the optimisation and the mentions of using the lamp instead of the plane.
Thank you for the encouraging feedback. I’m glad you watched it too
Thanks for the tutorial some interesting techniques, love the faking of caustics as my computer is no hero
Kent, you’re a great asset to CG Cookie. Glad to have you doing tutorials. Very handy to have your expertise readily available.
Thanks so much
Cheers.
Looking forward to watching this.
I’m a citizen again thanks to your awesome tutorial Kent
Welcome back!
this was a great tutorial. well presented and with a lot of great tips.
Hi,
This is nice, thank you. As with most video tutorials, I wish you talked a little slower and had a script.
I am at about 4 min into the tutorial where you first open your render window. So far so good, then, my render window is bring pink. Where did this color come from? I started with your start blend file and hid everything using H, except for the table and the glass. I hid the light too. Mine renders, but its pink! Any ideas why and what I can do? Thx
Joey
It sounds like your environment image isn’t sourcing correctly. Open your world properties and re-source the environment image (which is included with the source files)
This is a really interesting tutorial. The biggest challenge to me is to optimize my render times so I can use Blender in production.
Great tutorial and very educational! So thank you very much!
Good job.
Great tutorials, really useful. Great insight into how glass ‘works’. You have a very quick Mac! I noticed the theme you are using, it’s really nice, would be great to try. Is it available or is it a personal one?
The theme is available in Blender via User Preferences > Theme > Modo
Thanks Jonathan, that’s much better!
I used to love blendercookie, but now you almost every tutorial is for those who pay for them, not against that, but now, for me, this website is dying little by little, god save the capitalism!
Hey Claiton,
I can understand your disappointment, but rest assured many more free tutorials are coming
Are there any particular topics you’re interested in?
Thanks Kent, Clear and concise. I learned some basics from the free stuff on Blender Cookie. But today, I had to become a citizen!
This stuff is great and lots of fun! I now know what an equirectangular image is and thanks to your tutorial, I have put my little space ship model into your cathedral image and the view through the ships curved glass canopy looks real! (A little wierd, unless you’re a “2001: a Space Odyssey” fan.) So, the big question: Is there a way to get this same glass effect with real video footage as the background? I’d like to land my ship in the field behind my house. (I’ve done this in the compositor even with realistic shadows but the glass canopy, of course, only reflects whats in the 3D world.)
I really appreciate the positive feedback and welcome to citizenship!
You ask a great question. If it were me I’d first track the footage with the motion tracker, then use that as your backplate for capturing matching refractions through the glass. For the reflections I’d try to find a similar environment texture map as your backyard and use that for your world. Hope that makes sense and helps!
Have been struggling with glass for a while, thanks Kent.
I love this tutorial! I have needed a tutorial on glass recently – I’m doing a lamp. Problem I’m having is that I am getting little white spots everywhere. Do you know how to fix this? Here is a screen grab of what I’m experiencing.
http://i.imgur.com/RJLCGmr.jpg
In the render properties look for the ‘Sampling’ drop-down and change the ‘Clamp’ value to 1 or 1.1. That should help clear up those fireflies (white dots)
This tutorial made me become a citizen. Totally worth it!
Kent, you do explain really well – I could run video in the background just listening and following the instructions without watching it at some point.
Nice! I learn so much from this ones! “Looks like a venn diagram” that made me laugh haha so unexpected xD