mental ray Nodes Reference Library: Materials

In this series of tutorials, we'll be taking a detailed look at each of mental ray's material nodes. Software required: Maya 2008 and up.
Course info
Level
Advanced
Updated
Mar 25, 2009
Duration
4h 10m
Table of contents
Description
Course info
Level
Advanced
Updated
Mar 25, 2009
Duration
4h 10m
Description

In this series of tutorials, we'll be taking a detailed look at each of mental ray's material nodes. Each video is a self-contained tutorial centering on one of mental ray's nodes. This means that these tutorials can be viewed in any order you wish, allowing you to jump straight to the content that is most relevant to you. Over the course of these tutorials, we'll learn how each node works and best practices to utilize for attaining desired results while saving time. Software required: Maya 2008 and up.

About the author
About the author

Kyle was one of the first authors for Digital-Tutors (now a Pluralsight company) and has been a part of the team for over 10 years. Kyle began his career in computer graphics education as a college instructor and worked as a Digital-Tutors rendering tutor and curriculum manager since 2002.

More from the author
Maya 2018 Fundamentals
Beginner
11h 21m
Feb 7, 2018
3ds Max 2018 Fundamentals
Beginner
8h 48m
Sep 27, 2017
Introduction to 3ds Max 2015
Beginner
12h 35m
Jun 4, 2014
More courses by Kyle Green
Section Introduction Transcripts
Section Introduction Transcripts

Introduction and Project Overview
[Autogenerated] in this lesson, we're gonna take a look at how we can utilize the mental raid die electric material. So the dialectic material is a material type within middle ray that has the ability to physically simulate in a very accurate way, the way that things like refractive and reflective objects will behave in real life. So this dialectic material utilizes something called a friend l effect, where the objects or the areas of the object that arm or directly facing toward the camera are less reflective or refractive. Whereas these areas that are facing very heavily away from the camera you can see they contain a much higher level of refer activity. So this is what the dialectic material will allow us to simulate. So let's take a look and how we can start to implement this so we can first start by dropping in the dialectic material. And in our case, we actually have two different pieces of geometry in this scene. You'll see why here in just a moment. But for now, let's get started by just selecting these two pieces, assigned the dialectic material and just quickly hit render Now he first render and a brand new senior probably noticed that the dialectic material actually comes out pretty much black. We have no transparency whatsoever. So whenever using the dialectic material, since it does make use of Ray tracing, reflections and refraction Sze, we want to make sure that the number of Ray's is set up to an appropriately high level. In our case, let's try something like 55 and 10 Rio, and now you can start to see automatically. We get the refractive, the refractive ability, and we also have the final effect that's already built in for us. So let's take a look at some of the attributes that are going to control this dialectic material. The first is the color. This is basically referring to the color of the ray as it enters this material. So in our case, if we wanted this to be more of a green glass, we have the ability to very easily control that. So just below that we have the index of refraction which more or less controls how far the light is able to refract as it passes through. So, with an index of refraction of one, we should see no refraction capabilities whatsoever, which is exactly what we see. So typically, most liquids will have an index of refraction of around 1.3, whereas most types of glass will have an index of refraction of around 1.5, although the exact index of refraction may very depending on the actual material that you're trying to simulate now, the outside color in the outside index of refraction come into play whenever we try to create some kind of a di electric to die electric material interaction. What we have right now with the color and the outside, or rather, just the index of a fraction will be perfectly fine if we're trying to simulate some kind of an empty vessel like an empty glass. However, if we wanted this glass to be able to be filled with some kind of a liquid, that liquid would most likely be die electric as well. That's where we start to get into di electric to dialectic material interactions. How does this dialect er glass interact with the dialectic material inside so we can start to see that if we were to, um, start to add in a new dialectic material whenever we start to create dialectic material interactions. It requires actually several different pieces of geometry to actually encompass the entire effect. So right now, this dialectic material will be set up for the glass. It will go ahead named this accordingly. So index of refraction of 1.5. And this will give a glass of white color as the ray enters. And as the ray exits, this is basically what the outside color is referring to. We want to leave the outside index of refraction, set toe one for this glass. So that way, whatever the ray reaches through this first layer of the glass and then reaches this area right in here this open, empty space, we want it to have an index of refraction of one, which is basically a WR. All right, so let's come back to the mental ray notes. Let's add a new dialectic material for our liquid. So in this case, we call this liquid material. Now, if we wanted this liquid to be more of a blue color will have the ray as it enters the liquid be blue, and then we'll have the ray as it exits the liquid. Be blue Also. Now, this is where these values become very, very important. The index of refraction is that passes in to this liquid. We would probably want to be around 1.3, since that will be the refractive index of most types of liquids and then the refractive. As it passes outside, we want to be about 1.5. So what this means is, if this piece of geometry, which is actually just the hollowed out portion of this inner peace of the glass So we want the ray whenever it passes in to have a refraction of about 1.3. So that way we see most of this liquid as it is. And then as the ____ passes back out, we want it to be 1.5. So that way it has the appearance of being up against this glass, which also has a refractive index of 1.5. All right, so let's go back to our view. There we go. And now we can start to see the dye electric effect of this liquid. It's inside. Now, for our final piece, we need to actually have a separate piece of geometry that will act as the cap for this liquid. So you can see this is really just the top. And for this will add yet another dialectic material. Middle click Dragon dropped this on here. Now, for this one will go ahead, leave the color in and the color out boats that toe white. Since this should inherit its color from the dialectic material that's inside that we just set to blue and for this one will set the index of refraction at about 1.3 to match the liquid. So that way, when the ray is passing into this surface, it should have an index of refraction 1.3. But since this particular object does not have any glass on either side of it, whenever the rate exits, we want to have a have a refraction index of one. So that way it matches the index of refraction that you would have if it were to just simply interact with air. And now you can start to see the effect of the liquid at the top of our glass. Right now, you will start to notice that the materials overall are starting to darken a bit, so we probably need to go back and increase our number of raise again, and now you can see that that looks much better. Although now, if you look at our rented result, you can start to see that there is an error that we have. And that is that we actually don't have any of this blue liquid color right in this area. As we start to pass our refraction raised through the glass itself. However, you can see behind here that there is a very strong blue color and below was well, so this is where we need to come in and actually go back to the dialectic material and most likely start to give it some kind of blue color as the ray enters this liquid. And if we want to, we could probably actually go back to the glass liquid itself and start to take note of these RGB values that we have here. So you concede that the color is a little bit darker, so let's actually go back to the die electric material, which is this material up at the top. So we'll open up the color chooser and with this color chooser still open, we could just go back to the dialectic material sample this color press. Except in that way, we can make sure that we actually use this exact color over and the material that's gonna be at the top of the liquid. And I should probably go ahead and rename this. So let's save our red result for comparison. And there we go. Now you can see how the ray, whatever it enters this material, as far as the top of the liquid is concerned, will now have this blue color. All right, so that's a look and how we can start to utilize these dialectic materials and how we can utilize multiple dialect of materials on multiple objects in order to get these die electric material interaction effects. Now, one last thing that we need to take a look at before we finish up this lesson is the actual normal's on our geometry. Now, this dialect material is very particular about the normal direction that you use. So in our case, we have this inner peace of geometry, which is the blue liquid that's standing inside the glass, and you'll notice that the normals are pointing inward, right? This becomes a little bit more apparent. If I were to turn on the normal display fur face normals. In our case, he's normals are a little bit too big, so let's take this back down a little bit. Here we go. So for these liquid materials, we want to make sure that the normals are pointing outward in. So that way we get the correct interaction of the surface that is meant to be pointing out. So let's go back to normals and will reverse the normals on this geometry. These normals will leave pointing outward, and the normals for this piece of geometry will want to make sure they are pointing up, which they are. So now let's go back. Now that we have the normals for this inter portion that have been flipped around, let's compare a result. So here's what we had before, and now you can see how that gives us a result that is a bit more accurate compared to what we had before. You can really see the difference along this top portion where now we can actually see the reflections in the refraction Sze that we would get if this were a dialectic liquid that were touching right up against the glass so the normal direction and the materials that we assigned to each object do make a very, very important difference. So that's a look at the dialectic material.