Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As refractive objects are one of the handful of material types that we come into contact with pretty much every day, the chances that we will want or need to re-create them at some point, probably in a number of different ways, really are quite high. In this video, we are going to work at creating a couple of glass materials, really as a way of demonstrating how we create refraction inside the V-Ray Standard Material. Now one of the glass materials we want to create is for the glazing in our scene. Now, at this moment in time, we don't have our geometry available, so we do need to go up to the Window menu, select that, come down to the Layers option, and open the Layers dialog up.
In here, we need to put a check in the Skylight Glass and Patio Glass layers, just to bring that geometry into the scene. Then of course we can close our Layers dialog. Now I am just going to middle-mouse-scroll out of our view, just so we can get a little bit of a better view of what is going on in scene. I am going to hold Shift key and hold down the middle-mouse button just to pan across. And now I just want to Ctrl+Click and select all of our glazing geometry in the scene, just so that we can add our material to it when we have created it.
With that done, of course we can go and reselect our Glazing camera. To create the first of our Glass Materials, we of course need to open up the V-Ray Material Editor for ourselves. You will once again notice that our start scene has been somewhat upgraded; not only do we have our diffuse components in place now, but also all of the reflective aspects of our materials are in situ. Of course, at this moment in time, we don't have any refractive materials set up in the scene, so let's go and add a glazing material for ourselves. So with the Scene Materials label selected, let's right-click, go to the Create Material option, and we will choose a Standard Material.
Now of course that's going to be added to the bottom of our Materials List, so let's scroll down, select the material, right- click, and use the Rename Material option. Sticking with descriptive names, I'm going to call this Glazing. Now with the geometry still selected in the scene, we can simply right-click and use the Apply Material to Selection option. Now Glass of course is a material that doesn't really have any Diffuse coloration. Even should we want to create colored class, it wouldn't be the Diffuse slot in our V-Ray Standard Material that provides the color information.
These controls are really just for surface light interaction, whereas the coloration in glass comes from inside the volume, and we'll see how to handle this inside the V-Ray Standard Material in just a little while. This doesn't mean, however, that we can just completely ignore our Diffuse layer. Essentially, in order to create a glass material, we need to disable the Diffuse component of this material. Now, you may wonder why this is a necessary step. Well, if we just go to our Glazing material, right-click, go to the Create Layer option, and create a Refraction layer for ourselves, you'll see that it sits underneath the Diffuse layer.
This means with Diffuse information inside our Diffuse controls, we are not actually going to see the effects of any refraction in our material. This is why we need to disable the Diffuse layer. Now the easiest way to do this is to set our material to be completely transparent, using the Transparency controls. However, there is a problem if we just use the default color swatch. If I just click on that, set our Color value all the way to pure white, which would make it completely transparent, and click OK, you can see our scene objects actually disappear.
Now, thankfully we have them selected at this moment in time, but if they weren't, we perhaps wouldn't even know that they were there in the scene. So clearly this method of adding transparency could have some potential problems with it. Thankfully, there is another way. Let's just go and set our Transparency color back to black so that our scene objects reappear, and we can instead use the Map slot. So if we click on the Map button to bring up the Texture Editor and in the dropdown list, if we use the first option, this TexAColor option, we can now go and set this to be white.
This of course will control the transparency on our Diffuse layer. You see our scene objects remain unchanged. They will, however, be completely transparent at render time. This then is typically a much better way to set our Diffuse layer to be completely transparent, or in real terms, we've disabled the color information from this particular layer. Of course, we still don't have a Glass Material as of yet. There are other components we need to add--specifically Reflection. Glass is, as well as being a refractive material, a highly reflective material.
So let's go to our Glazing Material, right-click, go to Create Layer, and this time we want to add a reflection layer. As you may recall from our reflection lesson, by default, the Reflection layer comes in with full reflectivity enabled; this white value ensures that. And if we scroll down to our Refraction layer, you'll see that it does the same. It uses the same control mechanism for handling refraction. So we now have a fully reflective, fully refractive material. And if we just use the Preview Render option, it perhaps won't be any surprise to us the reflectivity wins out.
It is, after all, the top-level layer. We need then to be able to tell our material that it is both reflective and refractive. We can do this by adding a Fresnel map into the Maps slot for the Reflection layer. So again, let's click on the Map button; in the dropdown, let's choose TexFresnel; and in this instance the defaults of white and black for Perpendicular and Parallel and the IOR values of 1.55 will work very nicely for us. So again, let's accept that and click OK.
Now V-Ray knows that the Reflection versus Refraction options will be determined by the viewing angle of the camera. If we view one of our windows straight on, we will get lots of refraction, so we will see through the material. If we view our glass at a very sharp angle then we will get lots of reflectivity. And again, if we use the Preview button inside of our Material Editor, you will see that we do indeed now have a refractive and reflective material. In fact, better still, let's go and take a render of the scene, so we can see how our glazing is working out.
What we now have is a very nice glass material that has both reflective and refractive properties. And you can see, as the viewing angle becomes deeper, the reflectivity becomes more and more pronounced. With our glazing working nicely then, we can see that creating a clear glass material is a pretty easy thing to do, using the V-Ray Standard Material. What, though, if we wanted to create that colored glass that we mentioned earlier? Well, let's do that inside of our scene right now. The first thing we are going to do is switch camera. We are going to focus in on our garden ornament, our butterfly, and let's see if we can turn it into a beautiful piece of colored glass.
Now, as we're simply creating a variation of our glazing material, there really is no need to go through the whole process from scratch. Instead, let's open up our V-Ray Material Editor. We'll find our Glazing material. Right-click on it, and we will just use the Duplicate Material function. Now if we scroll down, you can see we have a Glazing1 material. We of course are going to want to rename this, so let's right-click and go to Rename Material, and we'll call this, very descriptively, Butterfly Glass.
Now, if we go and select our object in the scene, we can right-click on our material and use the Apply Material to Selection option. Of course rendering at this point would simply reveal that we have a clear glass statue. That's the type of material that we created for our glazing. So how do we create our coloration? Well, we have already stated that we don't use our Diffuse components to create colored glass. Instead, we want to make use of some controls found in our Refraction layer. Specifically, we want to make use of these Fog controls.
These will allow us to add a coloration to the volume of our Glass object. To set the color, all we need to do is click on our color swatch and then choose the RGB values that we want to work with. In this instance, we have got some very specific values we just want to use, so we are going to use a Red value of 141, a Green value of 40, and in the Blue channel, we are going to leave everything set to zero. So we get this nice burnt-orange look. With that applied, let's take a test render and see how things are looking.
What we get from that very small parameter tweak is a very nice colored glass effect, one that, as you can see, actually takes into account the density of the geometry when it comes to determining the coloration that it applies. You can see where the body of our butterfly is. The thicker geometry, we get a much deeper color, where we get the thinner part, we get a much less saturated version of the color. If we wanted to increase the strength of the coloration effect here, if we just come back to our Material options, you can see we have this Multiplier option, which really acts as a strength control for the Fog effect.
So we've seen then how we can create refractive materials inside of the V-Ray Standard Material, and remember the steps that we have gone through here to create glass can just as easily be used to create water that could be applied to our pool geometry. We've even seen just how very easy it is to add a coloration effect to the volume of our refractive object. Time now to move away from working with hard surface materials and take a look instead at our tablecloth geometry. In the next video, we are going to show you how we can create a nice translucency effect using nothing more than a couple of V-Ray Standard materials and a V-Ray Two Sided material.
Get unlimited access to all courses for just $25/month.Become a member
102 Video lessons · 7126 Viewers
109 Video lessons · 9419 Viewers
56 Video lessons · 14164 Viewers
97 Video lessons · 9488 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.