RenderMan Fundamentals - PxrSurface - Glass

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome to this next lesson and this one is all about glass and i'm going to run you through the basics of how to get nice looking refractive objects and then i'm going to show you a few cool and creative ways that you can enhance your glass as well so the first thing to understand is that glass really needs an environment to reflect and refract and without one it can very quickly look very underwhelming flat and boring so for instance if you just throw in a wine glass model and make a glass shader and then put in a few area lights and then press render you may very quickly feel a little bit underwhelmed with it so scenes with glass in them at times need more refining and crafting to really get that lovely refractive quality so you can try a bunch of different hdris and you can also add a variety of extra objects into the scene for the glass to refract and reflect and one technique that you can really use to sort of add extra realism and storytelling to your scenes is by placing objects behind the camera so that they're seen within the reflections and also within the refractions as well so one example is this gumball machine that i've been making with the amazing fabio rossi for the fundamental shader pack and if i just zoom in here you can see that in the reflection of the glass dome on this gumball machine i've actually got a number of objects i've got this sign here i've got this edge of this building and i've also got this street light here that i've placed and all this is actually behind the camera the viewer never sees it in the scene but i've moved these objects inside of houdini so that when i press render you can see that in the reflection of this glass object here and so yes the scene within houdini may be a little bit messy and unrealistic but i wanted to cheat reality to get the reflections and also the refractions that i wanted so the moral story here is don't forget about the world behind the camera you know don't forget about the things that you can't see because within reflections and refractions they also play a big part okay so let's get on with some actual rendering of some glass so i'm just going to draw a render region around this so it works a bit faster so the first thing i'm going to do is i'm going to start by increasing the refraction gain and as i do you can now start to see that our teapot starts to become a little bit more glass-like and then the next thing i'm going to do is i'm then going to increase the reflection gain which adds reflections into our glass object okay so now this is starting to look a little bit more like glass the next thing i need to do is i need to now remove all the defuse from here because any color you want in the glass is actually controlled by this refraction color here so if i take the gain down completely on the defuse you can now see that we're starting to get a really nice glass tape up so the next thing i want to demonstrate to you is that you can see that it's not really as transparent and glass-like as we would want and this is the first sort of gotcha really with glass the way to solve this is if i come up to the render settings here and i go down to the render man tab and down here you can see this parameter here under the default ray depth and this is called max specular depth so the best way for me to demonstrate this is i'm going to take this down to 1. so the idea here is that this max specular depth is set to 1 which means that one ray is being shot from our camera that we're looking through and it hits this glass teapot and what we effectively want to do is we want to increase this this depth value so that our ray doesn't just stop at the first face it goes all the way through the teapot so if i increase this to two you can now start to see that some parts of the object become a little bit more glass-like again if i increase this to three a little bit more glass like down here and then to four where we started from and then this is the default value that renderman comes with and you can see here that as we started with our teapot the inside of the legs here aren't as glass-like as we want them to be so again i kind of want to increase this to five and then a little bit more increases to six and now you can start to see that the ray that we're shooting out of our camera has has pretty much almost gone through it's gone through the front piece of this teapot and then it's gone through the exit part of the teapot and then it's hit this part of the leg and it's gone through the leg then it hits the back of the teapot and then we might just go one more time to see and go to seven and now you can start to see that having a specular depth of seven really makes our teapot look really lovely and glass-like and the way you know when to stop going up with this number is if i go to 8 for instance it doesn't make any difference really so the difference here between 7 and 8 is negligible because there's no visual difference of having this between seven and eight the best practice here is to actually bring it onto the lower number so you're not wasting render power on specular depths that you don't actually need okay so that was a specular ray depth now let's move on so the next option here is refraction color and yup you've guessed it this is where you choose what color you want your glass objects to be and then you can also plug in a texture as well which we'll get to in a minute i'm just going to put this back to white for this example okay so next up here is roughness and the first thing to note here is that if this refraction roughness is set to -1 then this roughness slider will increase your roughness of both your refraction and your reflection but if this is set to anything else apart from one you'll see what happens so if i increase this to say 0.5 i've now increased the refraction roughness and then if i then bring down the roughness what you'll see is that we're controlling the roughness for the reflection and the roughness for the refraction independently of each other so this controls how rough your glass is and then this controls how rough your specular highlights are on your glass you can see here that we're getting some really interesting effects and like all these other parameters they can be controlled by maps so if i just come down here you can see that i've got a number that i've already prepared so i'm going to go ahead here and plug in a map that i've created for the refraction color and you can start to see here now that we've got our blue renderman logo that's applied onto our glass and then here i've got a roughness map i'm just going to go ahead here and apply this into the glass roughness and when i do so i also need to take this back down to minus one and then here i've got a bump map as well of our renderman logo and for this example here i'm just going to plug it straight into our normal so now what you can see is we've got this clear teapot and if i just show you the maps you can see here we've got this white map with the blue colored logo and that goes into our refraction color and then if i show you the roughness map and you can see here that where it's black it's completely clear on the glass and then where it's this gray color that becomes more frosted and rough and then here i've got a simple normals map which i'm using to add bump and relief to the teapot okay so there's just a few more parameters i want to bring your attention to so if i just come back to the glass here and under the advanced tab you can see that we have a number of other options here i can control the anisotropy of the glass here i can plug in some shading tangents and under bump here this is where i can plug in a map which basically only controls the bump values within the glass lobe next up here is this index of refraction or refractive index and for most of them this 1.5 is pretty good for glass but under here you've got a bunch of presets as well so you can look at things like beer which is 1.345 and then we can have a look at something like plastic acrylic plastic which is 1.490 so it's really useful having these presets and so the last option here that i really want to bring your attention to is this thin option and what this does is it turns off all the refraction on your object this is really useful for thin glass objects like flat panes of glass in windows okay so that's been the basics of glass and in the next example i'm going to show you a slightly more advanced version where we're going to get into these options here this single scatter albedo and extinction
Info
Channel: PixarsRenderMan
Views: 595
Rating: undefined out of 5
Keywords: renderman, pixar renderman, rendering, vfx, cgi, tutorials, training, r24, MaterialX, MaterialxLama, vfx tutorials, 3d training, 3d lessons
Id: tQVraLJi2bw
Channel Id: undefined
Length: 8min 54sec (534 seconds)
Published: Sat Jul 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.