Join Adam Crespi for an in-depth discussion in this video Making glass sparkle and shine, part of Rendering Interiors in Maya.
Glass is a chameleon in materials. It can look anything from totally transparent to beautifully reflective and sparkling in the light. I've got several different glasses I need here in my scene. There's a solid glass I'll need for my railings. There's a single pane or single polygon thickness glass for the windows, so on the inside I see the right reflection. There's a readed glass on the door. And also the tile on the left side is, well we can call it a version of glass, It needs definitely a sparkle to it. I'll start out by getting my clear glass made for my railings.
What I'll do is select them using the outliner. Choosing window and outliner. And here in the outliner, I'll go grab the glass panels. They're called railing glass panel, and I'll pick the first one, hold shift and pick the last. Now assign a new material, and in those materials, under mental ray materials, I'll choose my MIA material XPasses. I'll name this, glass, solid. These have a decent thickness to them. So, we want them to do a little bit of refraction, or, bending the light as it passes through. We've got a couple of different glasses available here in our MIA materials.
I'll fly out my pre-sets. And here's glass solid. We can see there's glass physical, glass thick, glass thin and glass solid. The difference is this, glass physical is for physically accurate glass. Glass solid is for a solid glass volume, such as a glass rod or plate glass that's thicker than standard windows, glass thick then is for modeled glassware. Let's say a pint glass or a similar drinking glass where we have the entry and exit normals modeled, as well as possibly the liquid inside it.
And we want that glass to accurately refract the light. Glass thinning is a single thickness window glass that does not do any refraction and it's made for putting on a single polygon, like the windows in this scene. I'll choose glass solid and replace. And now my window, or rather my railing glass panels have a solid glass in them so they'll bend what we see through those nicely. In this glass, what's going on is that, there's a main color, which is, well, black. The reflection is white and it's completely reflective and totally glossy.
Down here, in the refraction, then, the transparency is all the way up, and the glossiness is all the way up. So, it's a fully transparent material. And, the index of refraction has been set to 1.5. This is common value for glass, and many IOR's would default to this as glass is one of the materials we use most often with refraction. Either hard constants and actually, if we mouse over, we get a tool tip of some length that shows other available in the seeds of refraction. Air, water, alcohol, quartz, and even diamonds.
What this determines is how much refraction goes on. What I'll do in my glass though, is leave the IOR alone, and click on that color. The refraction color is set by default to a very slight blue. And I'm going to move this in to a little bit of green, just so I have my own tent on the glass. For now I'll leave this alone and see how it looks in a rendering. Now I'll make my reeded glass. Again, I'll select those objects, right click, and assign a new material. And in here, in my MIAs, I'll choose the XPasses.
I'll name this material, glass reeded. And choose a preset. Because this is reeded glass, I want to see some refraction. However, there's nothing on the other side of those doors. So I need to be careful what I do here. I'll go in my presets, and use a glass solid again. Now I'll go into the color of that glass, click on that texture, and choose a file. In my file dialog I'll go browse into the source images folder for the exercise files project and choose Reeded glassC. It's a reeded glass I've drawn in Photoshop, and it's got a definite green tint to it.
I'll click open and, now we've got at least that re-did glass. Although, that sample sphere still shows dark. I'll leave the reflection and gloss up. But, I'll scroll down and, take down the transparency a bit. I'll pull that back so we start to see more of the glass. And then, I'll scroll down to the bump section. In the bump, in the MIA, the overall bump is where we put in things like, a round corner-shader, for example. Whereas the standard bump is where I can put in things like normal maps we've constructed. I'll click on my standard bump texture, choose file, and use as tangent space normals.
In the file node, under the Image Name, I'll go in and pick Reeded glassN. Now it's got a normal map to it, so it definitely will disturb what's going on in that refraction. So far, it looks pretty good, although we'll really have to see how it looks once I get some lights in the scene. One of the things we can do, especially if we need to shine a light through a glass like this, is to tint that color by the diffuse map as well. I'll do this in my note editor, choosing window and note editor. Right clicking to graph the material and making sure I have an object actually selected.
Now with one of the readed glass pieces I can graph that material and there's that glass. I'll click on the out node for the readed glass color. Choose out color and put it back into the material under refraction color. Now that we can see here when we look at this material again is that it's got more of a green to it. And here on the refraction that color is mapped to that texture. Now for my window glass. This is pretty straight forward because it's an easy clear glass. Again, I'll choose it. Choosing window and outliner, scrolling down to the w section, and choosing window_glass.
I'll right-click. Assign a new material. Make an MIA XPasses for it. And, in my presets, choose my glass thin. It's a single sided glass that doesn't do any refraction. And, for the moment, I'm just going to put it on and leave it alone. I'll name it glass clear. And, my glasses are ready. What I'll do for the tile is make a glass, but take down the transparency, put my textures in, and then I'll have a luminous tile that's really got some lift to it instead of looking heavy. It's a neat way to handle it, especially when the tile needs a strong glaze.
I'll select that object, assign a new material, go into my mental array Materials Put an XPasses on, call this mosaic tile. And in my presets I'm going to choose glass thin. I'll put in by file my defused color and in here I'm going to choose mosaic tile two cs, it's a rich blue-green tile. I'll scroll down, and put in its normal map. In the standard bump, I'll choose a file, change to tangent space normals, go into the file, and go pick mosaic normal.
Now I'm ready to get this material really tuned up. What I'm going to do, is in that material, make sure I've got the same color in the refraction. I'll do this in the node editor and I'll also put that color into the reflection color so it shows properly. Here in my node editor, I'll right click and graph that material. Now, what I do, knowing that this has a CS in the title for mosaic tile meaning color and shine. Is I'll take from the outnode of the file the out alpha and it'll go into the mosaic tile.
And in here I have a bunch of things it can go into. What I'll do is put this into the reflectivity. What this lets me do then is vary the amount of reflection in that mosaic tile. By this it still looks kind of dark. And the last thing I'll need to do in here is to scroll down to the refraction and back out the transparency and there's my tile and it's got luminous glass like look, it'll look terrific in our rendering. If we take a little time, we can get our glasses right, and we'll get beautiful, sparkling, glittering surfaces everywhere.
And we can really get some good luster and complex surfaces when we start to factor in refraction colors as well as normal maps and diffuse color maps.
- Creating and applying materials with luster and shine
- Creating a mental ray Daylight system
- Casting light from interior fixtures
- Lighting with sky portals
- Creating an ambient occlusion rendering pass
- Fine-tuning Final Gather and lighting
- Compositing in Nuke and After Effects
- Adding depth of field, highlights, and glow