Maya 2011: Creating Textures and Shaders

Maya 2011: Creating Textures and Shaders

with Eric Keller

 


Maya 2011: Creating Textures and Shaders with Eric Keller shows how to create textures and materials, and then apply them to models to render realistic surfaces. The course covers working with the mental ray shading nodes, including the mental images architectural node, subsurface scattering nodes, occlusion, and car paint shaders, as well as how to incorporate these nodes into shading networks using the Hypershade editor. It also explores using textures, Maya software nodes, normal maps, and displacement maps for adding detail to models. Exercise files accompany the course.
Topics include:
  • Understanding shading concepts
  • Simulating the Fresnel effect for realistic reflections
  • Rendering transparent and translucent surfaces
  • Comparing mental ray and Maya standard shaders
  • Introducing the mia_material
  • Developing shader networks
  • Using subsurface scattering shaders
  • Mapping polygon UV coordinates
  • Incorporating texture nodes into networks
  • Improving skin detail with ambient occlusion
  • Painting bump maps
  • Creating normal and displacement maps
  • Troubleshooting maps

show more

author
Eric Keller
subject
3D + Animation, Textures, Materials
software
Maya 2011
level
Intermediate
duration
3h 30m
released
Sep 28, 2010

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi! I'm Eric Keller.
00:05Welcome to Maya 2011: Creating Textures and Shaders.
00:09For professional Maya users, rendering and mental ray has become the de facto standard.
00:13Over time, the capabilities of mental ray have evolved, making rendering
00:17easier and more powerful.
00:18I'll be showing you how to get the best results using the latest features.
00:22Now I'm assuming that you have a good understanding of modeling concepts and
00:26that you know your way around the Maya interface, how to work in the Hypershade
00:29editor, and how to do preview renders.
00:31I'll begin this course with the brief discussion of how light interacts with surfaces.
00:35We'll look at reflection, refraction, and absorption, and how to simulate these properties.
00:40Then I'll get right down to brass tacks and show you how to get your work done.
00:44We'll take a look at how to design translucent materials such as plastic, create
00:49subsurface scattering to simulate human skin, adapt presets to design your own
00:54shaders, and add texture maps to create surface detail.
00:57I've been working with mental ray shaders in Maya for a number of years.
01:01I'm looking forward to sharing what I've learned with you.
01:03So, let's start shading.
Collapse this transcript
Using the exercise files
00:00If you have access to the Exercise Files for this course, you can put them on
00:04your Desktop as I have or anywhere else you want.
00:06The Exercise Files have been organized into a typical Maya project
00:10directory structure.
00:11So the scene files are actually found in the scenes folder of the project.
00:16You'll see that there is a scene for the start and the ending of each exercise.
00:24The texture maps that are connected to the various shader networks are found in
00:28the sourceimages directory.
00:35It's important to remember that when you start working with the files,
00:38you want to make sure that the current project in Maya is set to the Exercise Files project.
00:44To do this, go to File > Project > Set and then choose the Exercise Files folder.
00:51If the project is not correctly set, Maya might not be able to find the file textures.
00:56Then when you render the scene, it may not render correctly.
00:59So it's very important to set your project when you start to work on this and
01:03keep the projects set to Exercise Files as long as you're following along.
01:06If you do not have access to these files, you can follow along with your own
01:10files as we proceed through the course.
Collapse this transcript
1. Shading Concepts
Explaining diffuse reflections
00:00So in this movie, we're going to talk about the concept of diffuse reflections.
00:04What is a diffuse reflection?
00:06Well, we have to think of it this way.
00:07All surfaces in the real world reflect light in one way or another.
00:12If they don't, then they're completely transparent.
00:14The light passes through them and they're essentially invisible to us.
00:18So when you're thinking about this kind of thing, you want to think about how
00:21smooth is the surface, because the type of reflection that is created is
00:25dependent on the smoothness of the surface.
00:28Let's take a look at this scene.
00:29We have two teapots here on this checkerboard surface.
00:34I've created two very simple shaders to illustrate the point of
00:37diffuse reflections.
00:39So I'll do a quick render here and we can compare the result.
00:45So this teapot here on the left is highly reflective.
00:48The surface is a lot like a mirror.
00:50We can clearly see the checkerboards in the background reflected on the
00:54surface of the other teapot, and even other parts of the teapot reflected on the surface.
00:59This teapot on the right is also very reflective.
01:02However, you can see that the surface is somewhat rough.
01:05What this means is that a smoother surface is going to reflect the light
01:09much like a mirror.
01:10A rougher surface is going to reflect the light kind of like - think about
01:14concrete on a sunny day.
01:16Concrete is very rough.
01:17So when the individual photons of light hit the surface, they're reflected
01:21back in all directions.
01:23What we end up with is we see the light reflected on the surface, but we don't
01:27actually see the other objects in the scene reflected on the surface.
01:31So I've created a dynamic simulation to illustrate this point a little bit better.
01:35Imagine this surface, this plane, as being a smooth surface.
01:40At this point, we're so close to it that we can actually see the
01:42individual photons of light.
01:44So as I play the simulation, you'll see the photons of light come in and they
01:47bounce off the surface at about the same angle that they hit the surface.
01:51This is what a smooth or highly reflective surface would look like very close.
01:56Now if the surface starts to become rough, like concrete or something like that,
02:00you'll see that the photons, as they hit the surface, they're reflected back
02:04into the environment in all directions.
02:06In other words, the photons of light are diffused back into the environment.
02:11Hence, the term diffused reflection.
02:13So as you can see from the way that I've set up this diagram, I have it
02:17gradually becoming rougher over time.
02:19Let's just illustrate the point that surfaces have a wide range of diffusion.
02:24So, as you think of your surface is going from perfectly smooth to very rough,
02:29you'll think about how that affects the individual photons of light.
02:32So we have a range of diffuse reflection, from perfectly smooth to very, very
02:36rough and everything in between.
Collapse this transcript
Defining glossy and blurred reflections
00:00Glossy reflections occur on very smooth surfaces.
00:04So a glossy reflection you can think of as being almost mirror like, completely
00:08reflecting the environment.
00:10I have a scene here that shows three teapots.
00:12This scene demonstrates a range of glossy reflectivity.
00:16So let's do a render here and see what it looks like when we render.
00:19So I'm creating a render, so we can compare the three teapots.
00:24On the very left here, I have a very glossy reflective surface.
00:29It's perfectly reflecting the environment.
00:31So it's reflecting the other teapots and the checkerboard.
00:33You can see the surface is very smooth.
00:35So the reflection is very nice and clean.
00:38If you look at the elements of reflection, you see right here is what's known as
00:42a specular highlight.
00:44So this is a reflection of the light source.
00:46In this case, the sunlight that's hitting the teapot.
00:48A lot of computer graphic shaders have a separate channel for reflecting the
00:54light source and reflecting the environment.
00:56This is usually referred to as the specular channel versus the
01:00reflectivity channel.
01:02In real life, of course, there is no separation.
01:04Reflective surface is going to reflect both the environment and the light source.
01:09The reason that it is separated in computer graphics program is because virtual
01:12CG light is often an infinitely small point of light in space.
01:17So what they've done is by separating this, they give you a control to sort of
01:21fake the reflection of the light source.
01:23So when you look at the specular channel on a typical computer graphics
01:26shader, it's giving you a separate control to sort of fake the reflection of the light source.
01:31Let's take a look at these other two teapots.
01:34This is going into sort of a range of roughness.
01:36As the surface becomes more rough, you can see that the reflections on the
01:40surface start to become blurrier.
01:42So this is a slightly blurry reflection on a slightly rough surface.
01:46This surface is a little bit more rough.
01:49The reflection itself is a little bit more blurred.
01:52As the surface becomes rougher and rougher, of course, you're going to start to
01:55move from a reflective surface to more of a diffuse type of reflection.
02:00Many shaders in mental ray have a control that allows you to simulate
02:05blurred reflections.
02:06So you can have a range from very smooth and perfect reflections all the way up
02:11to very blurry reflections.
02:13When you're designing a shader for your surface, think about how rough the
02:16surface is, think about how much it's going to reflect the environment.
02:20If you think of a surface like a wet road, it's still going to reflect the environment.
02:25But the reflections are going to be very, very blurry as opposed to something
02:28like a chrome ball or a chrome bumper on a car.
Collapse this transcript
Looking at refraction
00:00Refractions occur when light passes through a transparent medium, such as glass or plastic.
00:05The individual photons of light are actually slowed down as they passed to the
00:10medium, which creates distortion.
00:12This distortion is what we see visually as refraction.
00:15I'll take a look of the scene.
00:17I have a couple of teapots here.
00:19I've created a render.
00:20Let's take a look at the render here.
00:23This teapot on the left here is completely transparent, but it shows no refraction.
00:28In other words, you can see the checkerboard pattern through the transparent
00:32surface is still perfectly undistorted.
00:35It looks just like the texture in the background.
00:38The only difference between this surface on this teapot here and this teapot is
00:42that I've turned on refractions for this surface.
00:45So now you can see that the checkerboard pattern is actually distorted.
00:49As we look through the surface, we can see this distortion.
00:52That's known as refraction.
00:53I've created another diagram here to illustrate this point using dynamics.
00:59Imagine this is a transparent surface that has a fare amount of thickness it.
01:02So this is the top of the surface and this is the bottom of the surface.
01:06Right here is the medium.
01:08I'm going to play the simulation.
01:10You can see as the photons of light hit the surface and pass through it,
01:14the direction is actually altered.
01:17This is what's causes the distortion known as refraction.
01:24Just like with reflective surfaces, if the actual surface of the transparent
01:28object is somewhat rough or bumpy, as the light passes through the surface,
01:33it's going to be refracted in all directions.
01:35This is going to create what's known as a blurred refraction.
01:38So we can see that as a light passes through the surface,
01:44it's fairly rough,
01:45it starts to get bounced in all directions.
01:49So in this rendering, I have two surfaces which are identical in the terms of
01:53how much they refract the light is passing through the surface.
01:57I've turned off reflections so that you can clearly see how the light is being refracted.
02:03But in this case, I have a nice smooth surface.
02:06So the refracted light is being refracted, but you can see that it's fairly clear.
02:11On this surface over here, I've made the refractions blurry.
02:14So the surface appears rough.
02:16It's kind of like a plastic.
02:18So there is just some blurriness to the refractions here.
02:21So as you're designing your surfaces, if you're trying to think of how to do
02:24something like the plastic surface or very frosted glass or something like that,
02:29you want to consider how blurry the refractions are going to be.
02:33The other important concept to understand when talking about refractions is the
02:37index of refraction.
02:40The index of refraction or refractive index, sometimes as abbreviated as IOR,
02:45is the ratio of the speed of light through a given medium relative to the speed
02:49of light in a vacuum.
02:51So when you work with the shaders in mental ray it's important to know the index
02:54of the refraction of the surface you're trying to stimulate.
02:56For example, water has an index of refraction of about 1.33.
03:01So in this rendering, I have three different teapots just to demonstrate how
03:06changing the index of refraction will affect the appearance of your surface.
03:11So on the far left here I have a teapot with index of refraction of 1.
03:16So this means that the light is not really being refracted at all.
03:19So as light passes through the surface, we can clearly see the checkerboard
03:22pattern through the surface.
03:25The teapot in the middle has a refractive index of 1.33, which is about the
03:30same for clear water.
03:31So now you can see how the checkerboard pattern is distorted here.
03:36Here on the far right, I have a refractive index of 2.4, which is about the
03:42refractive index of diamonds.
03:44So you can see that the surface is very refractive, so that the background
03:47images are very distorted.
03:49Once again, I've turned off reflections on these surfaces.
03:52So you're only seeing the refractive quality of it.
03:55So they look a little bit unrealistic.
03:57But when you combine reflection and refraction, you can start to develop very
04:01realistic looking shaders.
04:03If you want to know the index of refraction for a particular shader that you're
04:07trying to develop, you can just do a search on the Internet for the term index
04:11of refraction and you'll find charts available posted online that list the
04:16various refractive indices for surfaces.
Collapse this transcript
Describing the Fresnel effect
00:00Another important concept to understand when talking about reflections is the
00:05concept of Fresnel reflections.
00:07Fresnel reflections are named after the 19th Century French physicists
00:12Augustin-Jean Fresnel.
00:13This property describes how reflections behave based on the angle at which they are viewed.
00:19The angle which the surface is viewed is often referred to as the angle of incidence.
00:24As a surface turns away from the eye or the rendering camera, it can become
00:29increasingly reflective.
00:31So a good example of this is this render that I have right now.
00:35I'm comparing two different surfaces.
00:36They have an equal amount of reflectivity applied.
00:40But this surface exhibits the phenomena of Fresnel reflections.
00:43You can see on the parts of the surface that are more perpendicular to the
00:47camera are less reflective than the parts of the surface that are moving
00:51away from the camera.
00:52You can sort of think of it this way.
00:55Pretend that you are standing at the edge of a clear lake.
00:58If you look straight down into the lake, you can clearly see the bottom and all
01:02the fish and all that stuff in the lake.
01:04But as you look out over the surface of the lake,
01:07in other words, as the angle of incidence increases, the surface becomes more reflective.
01:12It becomes harder to see what's actually in the lake.
01:15So adding Fresnel type reflections to your surface can greatly increase the
01:20realism in the surface.
01:21You notice how this perfectly reflective surface looks just a little less
01:25realistic than this one right here.
01:27This looks a little bit more like steel.
01:29This looks like a mirror or chrome, which in some cases can be appropriate.
01:32But depending on the type of metal or the type of reflective surface that
01:36you're designing, consider how the surface reflects the light in the
01:40environment, and whether or not you should add a certain amount of Fresnel
01:44reflectivity to the surface.
01:46Some mental ray shaders have this built-in, but in some case,
01:50with other shaders it's something that you can build into your shading network.
Collapse this transcript
Understanding anisotropy
00:00Anisotropic reflections appear on surfaces that are made up of tiny grooves or microfacets.
00:06When you create a shader for material like this,
00:09the most noticeable attribute is that the specular highlight or the highlight
00:13of the light source is going to become spread out and have kind of
00:17directionality to it.
00:18So you can sort of see how this is the specular highlight, but you notice how
00:21it's sort of stretched out over the surface.
00:23So this is sort of creating kind of a brushed metal like effect and you can see
00:27that there are microfacets in the surface itself that are affecting the
00:31reflectivity of the surface.
00:33Some surfaces that would exhibit anisotropic reflections include things like
00:38a CD or a DVD with tiny grooves on it or satin pillow or the shininess of very silky hair.
00:45There are anisotropic shaders within Maya and then some mental ray shaders
00:49also have anisotropic options which can be activated to simulate these types of surfaces.
00:55So as you're creating a surface, whether it's brushed metal or something like
00:58that, think about how the tiny grooves on the surface itself will affect the way
01:03the environment is reflected and also the way that the specular highlights are
01:07reflected on the surface.
Collapse this transcript
Identifying ambient and reflection occlusion
00:00Ambient occlusion is actually a lighting concept that describes the darkening of
00:05surfaces in crevices and areas were two surfaces meet.
00:09So in this render you can see ambient occlusion shadowing appears as the
00:13surfaces get close together or in these corners.
00:16Fewer photons of light actually reach these areas of the surface and so you
00:20see it as darkening.
00:21This is known as ambient occlusion shadowing.
00:24It's something that happens usually in an ambient lighting environment like an overcast day.
00:29Now this is a lighting concept, but mental ray allows you several options for
00:34creating ambient occlusion.
00:36You can create it as part of the lighting setup or you can actually build it
00:40within your shader network, or you can actually do both at the same time.
00:45So this is a concept that's important to understand because it affects the
00:48lighting on the surface and it also affects the way light is reflected from a
00:53surface, because this is an example right here of ambient occlusion shadowing.
00:57But there is also the concept of reflection occlusion.
01:02So in the rendering that's shown here I have an example of a surface
01:06that is perfectly reflective, but there is no reflection occlusion.
01:10So each part of the surface is reflecting the environment with the same
01:13amount of strength.
01:15In this teapot here on the right I've added reflection occlusion.
01:19So you can see how the surface right here gets a little bit darker, because
01:22fewer photons of light are able to reach these parts of the surface and reflect
01:27back into the environment.
01:28So you see this sort of lessening of the reflection here in the cracks and
01:32crevices of the surface.
01:33It can be kind of subtle, but it adds an awful lot of realism to your surface.
01:37So this one looks a little bit less realistic than this.
01:40So reflection occlusion is something that you can build into your shader
01:44networks to increase the realism of your surfaces.
Collapse this transcript
Defining sub-surface scattering
00:00Subsurface scattering is a phenomenon that occurs when photons of light
00:04penetrate the outer layers of the surface.
00:06It bounces around inside and then leave the surface to return back into the environment.
00:11It's a phenomenon that gives human skin a very translucent quality and adds to
00:15the realism when you do character models.
00:17So for sample on this particular model, you can sort of see the red quality in the ears.
00:22There's a strong light coming from the background that's sort of lighting up the
00:26ears and making it look like sort of thin cartilage.
00:29There is also sort this slight reddening here in the shadows.
00:32When shading characters is just one of the things that really adds to the
00:36realism of the render.
00:37So you look in this setup of the actual scene here, add a strong light in the
00:43foreground, and then a directional light coming in the background.
00:47This directional light is lighting up parts of the surface and making it
00:50look semi-translucent.
00:51That's why I have another diagram here to illustrate the basics of how
00:56subsurface scattering works.
00:58Once again I have photons of light, some of them are being reflected back
01:02into the environment.
01:03But if you can imagine that this here, there are several layers of a surface,
01:07you could see how some of the photons of light enter the surface, they bounce around
01:12a little bit and then they bounce back out again, back into the environment.
01:17This is what creates the subsurface scattering effect in the real world.
01:21As you'll see mental ray has a number of ways to create subsurface
01:26scattering effects.
01:27I've added it to this model of the teapot here and you can sort of see how in
01:32the shadowed areas we have this sort of luminescent red glow.
01:37Actually, most materials in the real world exhibit some amount of
01:41subsurface scattering.
01:42The only ones that wouldn't be things like metal or rock where light just can't
01:46penetrate the surface.
01:48So it's another thing that you want to consider when you're developing your shader.
01:51If you're doing something like a candle wax or human skin or surfaces like jade,
01:57things like that, subsurface scattering under certain lighting conditions will
02:00really make your surfaces look much more realistic.
Collapse this transcript
Simulating translucency
00:00Translucent materials are opaque or semiopaque materials that still allow
00:04light to pass through.
00:06A few examples of this would be like the leaves of the tree or plastic or stained glass.
00:13You can see in this scene I have a teapot.
00:15It has a translucent material applied to it and then on the inside I've added
00:20just a simple polygon sphere.
00:22Now we'll create a render and you'll see how light passes through this surface,
00:26allowing you to see what's inside, even though the surface for the most part is semiopaque.
00:32Translucency can be simulated in a number of ways in Maya.
00:35It's similar to subsurface scattering and it's also similar to
00:40blurred refractions.
00:41So you have a number of options for creating translucent material.
00:45Some shaders have a translucency attribute that you can use or what you could do
00:49is you can work with creating very blurry refractions to create translucency or
00:55in some cases you can use a certain amount of subsurface scattering to make very
00:59realistic translucent surfaces.
01:03I would use that in extreme cases like thick candle wax or something like that.
01:07But for something like plastic a certain amount of blurred refractions will do a
01:11good job of creating a translucent looking surface.
01:14So here's the final rendering.
01:15You can see the sphere even though it's semiopaque.
Collapse this transcript
2. Shading in mental ray
Using Maya's standard shaders with mental ray
00:00The mental ray render is integrated as a plug-in into Maya, but you can still
00:05use standard Maya shaders when rendering scenes with mental ray.
00:10So for example, in this scene I have a number of teapots and each one has a
00:13different Maya shader applied to it.
00:15I'll take a brief look at how some of these shaders work.
00:21Here's the scene right here. On this teapot in the far left I have a
00:25Lambert shader applied.
00:27Lambert shader is good for diffuse surfaces.
00:30So when light hits the surface it's reflected in all directions, creating kind of
00:35a matte like quality to the render.
00:38So you look at the render right here.
00:41This is what Lambert shader looks like.
00:43So there's no reflection or specular highlight on Lambert shaders.
00:47It's just essentially a diffuse control.
00:49So I can control the intensity of the diffuse reflections using the Diffuse slider.
00:54I'm just moving this up and down and you can see how the surface becomes lighter or darker.
00:59Next to this teapot I have a teapot with Blinn shader applied.
01:04Blinn shader is one of the most commonly used shaders and you can use it with mental ray.
01:09It's good for simulating various types of shiny metal.
01:12It has a nice broad highlight with a nice falloff to it.
01:17You can see this is the Blinn render right here and it's also reflective.
01:22Like the Lambert shader it has a Diffuse setting as well and then to control
01:27the specular highlight and reflectivity you want to go down to the Specular Shading section.
01:33So by decreasing the Eccentricity you get a tighter highlight.
01:38You can then control the Specular Color, make it more or less intense, and also
01:44the Reflectivity, how much it reflects the environment.
01:47Now a couple things to note and this sort of a general statement about many
01:51of the Maya shaders.
01:53You have a separate setting for Diffuse and Reflective qualities and also
01:57the Reflective qualities are split between controls for the highlight and
02:02the overall reflection.
02:03This is to allow you more flexibility when designing a shader.
02:07In the real world the more diffuse a surface is, the less it won't precisely
02:12reflect the environment, because the diffuse quality is essentially as the
02:16surface it becomes more rough it diffuses light into the environment.
02:21So you see less of the reflection of the environment on the surface.
02:25But in this shader there are separate controls, and this allows you to create
02:28the look of maybe like a layered material.
02:31So something that might have a diffuse layer and then on top of that kind of
02:35like a glossy coating.
02:37The reason we have this separate controls for this specular highlight in the
02:40Reflectivity is that CG lights are actually emanated from an infinitely
02:45small point in space.
02:47So if I was to do a realistic reflection of a CG light source, it would end up
02:53being a very, very tiny dot.
02:54Maybe even less than a pixel in size.
02:57So by adding a separate specular control it's kind of a cheat that allows you to
03:01create the look of a reflected light source on this surface without being
03:05necessarily physically accurate.
03:07This again is just to give you more control over when you're designing a
03:11particular type of shader.
03:14Next to the teapot with the Blinn shader I have Ramp shader.
03:18If you look in the Attribute Editor for the Ramp shader you can see that there
03:21are various color ramps that are designed to control the qualities of the shader
03:26for the Color, Transparency, Incandescence, the Specular Color, Specular Rolloff,
03:33and Reflectivity, how much it reflects the environment.
03:36In this case these two settings use a graph.
03:39You can expand this graph by clicking on this little icon here. It's the one
03:43where I get more control over editing it.
03:45The way in which the ramps and the graphs are controlled is determined by the
03:51Color Inputs setting.
03:52So for this particular shader I have Facing Angle.
03:55So this is to simulate like sort of Fresnel types of reflections.
03:58I've selected this color marker here on this side of the ramp. I clicked on the
04:02Selected Color swatch and just use the color chooser to add a dark blue and I'm
04:09going to click on the second color input.
04:12Click in the color swatch and add a different color, like maybe a deep red.
04:16You can see in the preview here that since this is set to Facing Angle, the
04:21parts of the surface that face the camera are red; the parts of the surface that
04:25face away are dark blue.
04:27But you can also choose things like Light Angle, Surface Brightness, Normalize
04:31Lightness, that keeps the brightness within range of 0 to 1.
04:34These are different ways to determine the ramp shader.
04:38Ramp shaders are good for various types of special effects, but you can use them
04:43for a variety of surfaces as well.
04:45The Anisotropic shader is a standard Maya shader that simulates anisotropic
04:50reflectivity and specular highlights.
04:52In other words, surfaces that have microfacets on them, like a CD or a satin
04:57pillow or something like that.
04:59If you open the Attribute Editor for the Anisotropic shader, you'll find the
05:02controls for editing the specular highlight under the Specular Shading section
05:07and you can control things like the Angle, the Spread in order to control the
05:12tightness of the highlight on the surface, Roughness, Fresnel Index.
05:17So how much the highlight reflects based on the incidence angle or the angle of
05:22view that you're viewing the surface.
05:23If you look at our render here, here's the Anisotropic shader and you can see
05:27how this highlight is sort of stretched out here.
05:31In the back here I have two teapots with the Phong and Phong E shader applied.
05:36These are again very useful for simulating glossy materials such as plastic and glass.
05:42So it's an alternative to using something like a Blinn shader and depending on
05:46what the surface you're trying to determine you might want to experiment using
05:49either Phong or Blinn or Phong E.
05:53If I click on this teapot right here towards the center and this has a Phong
05:58shader applied and again the specular reflective qualities are found here in
06:04the Specular Shading section.
06:05So to control the size of the highlight you can increase or decrease the
06:09cosine power, you can change the Specular Color, the amount of Reflectivity,
06:15and so on and so forth.
06:17The Phong E is very similar to the Phong shader.
06:19It just has additional controls.
06:21You can control the Roughness of the highlight and the Highlight Size separately
06:26and also the Whiteness and the Specular Color.
06:31The Whiteness is kind about the brightness of the highlight and then
06:34the Specular Color.
06:35I'm going to click on the swatch here and choose Green.
06:40So that's the Specular Color, but the Whiteness you can see controls kind of the
06:43intensity of the highlight.
06:46Then again we have Reflectivity, how much it reflects the environment.
06:49So if you're comfortable using the Maya standard shaders, you can use them when
06:55rendering with mental ray and you'll find for the most part you can simulate
06:58most materials using the Maya standard shaders.
Collapse this transcript
Comparing mental ray and Maya shader nodes
00:01In this movie, we're going to talk a little bit about the mental ray
00:04specific attributes that are found on standard Maya shaders, shaders such as
00:09the Blinn shader and the Lambert shader, and these could be useful for
00:13creating specific shading effects.
00:16So in this scene, I have a number of teapots with different shaders applied.
00:21These are all my standard shaders, but I've adjusted some of the settings in the
00:25mental ray attributes section of each shader's attribute Eeditor.
00:30Let's take a look at what I've done.
00:31On the orange teapot here in the far left, I've added some blurry reflections.
00:38You can see them right here.
00:40So let's take a look at what I've done with the shader.
00:42I'm going to select the teapot and open up its Attribute Editor to the
00:46blurryReflectionBlinn tab. This is the shader that I've created for
00:50this particular teapot.
00:52And it's a standard Maya blinn shader. There's nothing too special going on.
00:56I've a kind of dark orange for the color.
00:59Most of the other settings are the default settings.
01:02I've adjusted the specular highlight a little bit by decreasing the Eccentricity.
01:08For the most part it's the default settings.
01:10Now let's go down in the Attribute Editor to the mental ray section.
01:15So these attributes are only effective when you're rendering with mental ray.
01:19If you render with Maya software, these attributes won't do anything.
01:23In order to create the look of blurry reflections, I've gone down to the Mi
01:28Reflection Blur slider and I've set this to seven and I'm going to zoom in here
01:37and do another test render, so we can see what this looks like up close and it
01:40is something like this, and let's do a quick test render.
01:43So, you can see that in the reflection of the scenes of the elements in the
01:49environment, how that they're slightly blurry, indicating that the surface might
01:53be a little bit rougher or slightly imperfect.
01:56You can also see how that the reflections here closer to this edge are sharper
02:00than those of the elements of the scene that are farther away from the surface.
02:04They get more blurry.
02:05So it's even easier to see here at the spout.
02:07Parts of the spout that are closed to this surface, the reflection is sharper
02:10than parts of the spout that are farther away from the surface.
02:13It's a nice-looking effect and it's very easy to achieve.
02:17Just take a quick look at the settings, the Reflection Blur, this setting
02:21controls how blurry the reflections are going to be.
02:24The Reflection Rays, this can be used to increase the quality of the blurring.
02:29Lower settings are going to result in more grainy looking reflection blur.
02:32Increasing this setting will add to render times, so be careful a little bit.
02:36The Reflection Blur Limits sets the number of times the Reflection Blur itself
02:40is going to be seen in other reflective surfaces.
02:43So if I had a number of other reflective surfaces in the background here, this
02:47will set the number of times that the blurred reflection effect is seen in those
02:51surfaces, as it reflects this surface.
02:54It's really just a way to optimize it.
02:57If there's no other reflective surfaces around, you can set this to one or two
03:00and it will be just fine.
03:02So that's Reflection Blur, fairly simple to set up and can add a very nice
03:06quality to your renders.
03:07I like to use it when I'm rendering something like a shiny floor, such as like a
03:11hardwood floor that might be reflecting like windows in a room. You want it kind
03:15of blurry, so it looks little bit more realistic.
03:17On this teapot here, I have any Lambert shader, just a standard Maya
03:22Lambert shader, and I want to point out that notice that the c odor of the shader is gray.
03:26I've a fairly low Diffuse value.
03:29When I create a render, let's take a look at how it results to the surface.
03:32Now I'm rendering with Final Gathering on, so you're going to see that it takes
03:36two passes to do the render. First it calculate the final gathering rays and
03:40then to calculate the render itself.
03:42So what I've going here is there's a slight subsurface scattering quality
03:47applied to the shader in the Lambert shader settings.
03:51So this is where the greenish color is coming from.
03:54It's almost giving kind of the look of like clay or something like that.
03:58So it's like a nice like clay pot kind of shader.
04:01So as the light hits the surface, the photons of light are bouncing around
04:05within the surface and then coming out again giving it the slightly
04:07translucent effect.
04:10To create this effect, I've gone down in the Lambert shader settings to the
04:14mental ray section and I've increased the Scatter Radius setting.
04:18I've set this to 2 and I've created a yellow color for the Scatter Color.
04:24So that's why this gray shader is rendering out in this sort of greenish yellow
04:29color, because that's the result of the scatter settings. So once again take a
04:33look at the render itself.
04:36The other settings in this section will control the quality of the
04:39subsurface scattering effect.
04:41So the Scatter Accuracy will increase the quality, but also increase render times.
04:46You can set Scatter Falloff similar to setting a light falloff, so right now I
04:50have it to None, but if we set it to Linear and Quadratic or Exponential, that's
04:55going to change the falloff of the subsurface scattering effect.
04:59Let's do another quick render of this teapot right here.
05:06And in this one I have a transparent surface but I've activated Refraction
05:11Blur, so this is going to create kind of the look of frosted glass and this
05:16again, this is a standard Maya shader, this is just a blinn shader and I've
05:20turned the reflections down a little bit, so that you can clearly see the
05:24effect in resulting render.
05:25So here's the end result. The refractions closest to the camera are little bit
05:32sharper than those that are farther away.
05:33So as light passes through the glass, the further it passes, the more blurry
05:40the refractions get.
05:42So let's take a look at how I've created this effect.
05:45If I go to the blurry_refraction_blinn tab here, this is the shader applied to
05:50this surface and let's take a look at some of these attribute.
05:53I just have a green color for the surface itself and I've lowered the Diffuse a
05:58little bit, and in the Specular Shading I've lowered the Reflections just to
06:02make it a little bit more clear.
06:04Under the Raytrace Options, I've turned on Refractions and I set the
06:08Refractive Index to 1.1.
06:10So these have to be active in order to get this effect.
06:13I've also increased the Surface Thickness, just to give it the look of more
06:17slightly thicker glass.
06:19But the most important settings to achieve this effect are found again in the
06:22mental ray section down here.
06:25So I scroll down, I've increased the Mi Refraction Blur setting to 3, and this
06:31is very similar to the way Reflection Blur works.
06:33So the higher this is, the blurrier the reflection.
06:36The Refraction Rays, this increases the quality of the blurring.
06:40If the blurring effect you see in your surface is very grainy, you can increase
06:44Refraction Rays, but again this will increase render time and like Reflection Blur,
06:48the Refraction Blur Limit sets the number of times the blurring effect can
06:53be seen in other surfaces in the environment.
06:58And then finally the last mental ray specific setting I want to point out is
07:02the Irradiance setting.
07:03So I'm going to select this teapot here and open up the irradiance_blinn tab.
07:09This is the shader that's been applied to this surface.
07:11And in the mental ray section, you'll see that I've increased the Irradiance
07:15value to a light gray and then set the Irradiance Color to kind of a fuchsia.
07:21And this is why I have Final Gathering turned on, because this effect is only
07:24going to be seen when you have some kind of indirect lighting such as Final
07:29Gathering or Global Illumination, and what this setting does is it controls the
07:34color of the bounced light.
07:36So as light hits like the floor and then bounces and then hits the
07:40surface, those photons of lights are going to be colored based on the
07:44Irradiance settings.
07:45So this is a way you can fine-tune an individual surface in a scene that uses
07:50indirect lighting such as final gathering.
07:52I have just set this to purple, just to make it nice and obvious, but you can
07:55use more subtle colors depending on the effect that you're trying to get.
07:59That's a brief overview of how you can use the settings found in the mental ray
08:06section of standard Maya shaders to create specific effects.
08:13So this surface has some Reflection Blur set to it. On this surface I've
08:17increased the Scatter Radius to create kind of a subsurface scattering effect.
08:22On this surface I have blurry refractions to make the look of frosted glass,
08:27and on this surface I've increased the Radius value and added a slight color to
08:31the Irradiance Color.
08:32Now of course, mental ray has a wide variety of shaders that can also create
08:38these effects and in some cases can do much more sophisticated versions.
08:43But the reason that I might choose to use a standard Maya shader with the mental
08:48ray attributes adjusted is that it's very simple to achieve the effect very
08:53quickly and it tends to render fairly quickly as well.
08:56So if I just need a very simple, blurry reflection over a simple look of frosted glass,
09:01I would choose to use Maya standard shader with the mental ray attributes
09:05adjusted, as opposed to using the mental ray shaders which have more controls
09:09that may be a little bit more complicated.
Collapse this transcript
Creating mental ray shaders
00:01In addition to the standard Maya shaders, mental ray comes with its own
00:05library of shaders.
00:06These can be used to create very sophisticated surface effects.
00:10So let's take a look at where we could find these on mental ray shaders.
00:14I'm going to go to Window > Rendering Editors > Hypershade to open up Hypershade
00:19and you'll see in the Create tab, if I click on Maya up here and I click on
00:23Surface, you'll see these are the standard Maya shaders, so Anisotropic, Blinn,
00:28Lambert, Phong and so on and so forth.
00:30I want to create some of the mental ray shaders, I'll go down to the mental ray
00:35section and click on Materials, and you can see now I have a list of quite a few
00:40mental ray specific shaders.
00:42Now you don't have to master every single one of these shaders. Just a few of
00:46these shaders will take care of most of the effects that you want to create.
00:52Now I want to point out very briefly that you'll see that mental ray has its
00:56own version of blinn and lambert and phong, these types of shaders, and these are
01:02similar to the Maya standard shaders, but they're used in more complex mental
01:06ray shading networks.
01:07If you just need to use like a standard blinn shader, go ahead and use the Maya
01:12Blinn found here under Maya Surface.
01:14That would work just fine when rendering mental ray.
01:16The only reason you need to use the mental ray blinn is part of a more advanced network.
01:22The other thing I would like to point out is you'll noticed that some of these
01:25shaders have three versions.
01:26For instance, this metallic paint has a metallic_paint, metallic_paint_x and
01:30metallic_paint_x_passes.
01:33So which one should you use?
01:35The x stands for extended, which means that it has some extended capabilities
01:40more in the backend, stuff that you don't necessarily need to worry about when
01:44you're solving typical shading problems.
01:46I tend to use the x version of the shader and then if I know I'm going to render
01:50it using render passes, I'll use the x_passes shader.
01:54And for example, I'm going to create the metallic paint shader just to show a simple point.
01:59Let's say if you start out with this version of the shader and you decide later
02:03you need to upgrade the shader for if you are going to use passes or
02:07whatever, if you open up the Attribute Editor for the shader down here at the
02:12bottom, there is an Upgrade Shader button and this will upgrade it to the x
02:17version or the x_passes.
02:19So, if you start with this shader and create a bunch of different attributes,
02:22but for some reason you need to upgrade it for example to create render with
02:26passes, all you need to do is press this button and then you can use that for
02:30rendering with passes.
Collapse this transcript
Making sense of mental ray shaders
00:01In this movie, we are going to talk about making sense of some of the mental ray
00:04shaders that come with Maya.
00:06Some of these shaders can be quite complex and especially when you are first
00:10learning mental ray they can be difficult to use.
00:13They are good for simulating a variety of materials but they can give you a lot of headaches.
00:17So, my goal for this movie is to help you eliminate some of those headaches.
00:22I am going to talk about how these shaders work and also some alternatives that
00:26can make your life a bit easier.
00:28In this rendering here I have three teapots and each one has a different mental
00:32ray shader apply to it.
00:34Up here, in the far left I have a DGS shader applied to this teapot. That's the
00:38Diffuse, Glossy, Specular shader.
00:41In the center, I have the dielectric shader applied and this is meant to
00:46simulate glass or liquid.
00:48You see it has very nice refractive qualities to it.
00:51Then down here on the lower right I have an MIB network applied to this shader.
00:57The MIB stands for Mental Images Base shader.
01:00So, let's take a look at what's going on in this scene.
01:03I am going to store this image in the Render View and minimize the Render View.
01:08I am going to start with the DGS shader.
01:11So, I am going to select this object, open the Hypershade by choosing Windows >
01:15Rendering Editors > Hypershade.
01:19In the work area of the Hypershade, I am going to right-click and choose Graph
01:23Materials on Selected Objects.
01:34And here we see the dgs_material1.
01:37So, I'll select this material and open up the Attribute Editor.
01:40Let's just take a quick look at it.
01:42The material here it doesn't have too many settings.
01:44The main settings are the Diffuse, Glossy and Specular channel and then below
01:49this we have additional settings that allow you to adjust the Transparency,
01:53Index of Refraction as well as the quality of the Specular highlight.
01:58Now, the Diffuse channel is fairly straightforward. This is where you determine
02:01the color of the objects.
02:03So, if I click on there. I can choose a color so I'll just choose green for this.
02:07But,what's confusing where the shaders we have a Glossy channel and a Specular
02:11channel and both of these have different ways of controlling the reflective
02:15qualities of the material and it's slightly redundant.
02:19So, for example if I set these both to black the Glossy channel controls the
02:25specular highlight, the color of it and it's overall brightness, but it also
02:30controls some of the reflective qualities of the shaders as well.
02:34So, if I hide the lower two parts,
02:38I am just going to select them and press Ctrl+H to hide them and zoom in and
02:43I'll do a quick rendering.
02:46You can see that we have reflection and we also have specular highlight.
02:52But if I select this material and turn the Glossy to black and turn up the
02:56Specular aspect of it and then do another render,
03:00now we see a nice reflection but no specular highlight.
03:05So, where this gets confusing is that the Glossy channel controls both the
03:10specular highlight and the reflectivity and the Specular channel controls just reflectivity.
03:15So, which one do you use?
03:17How do you get the proper reflection out of your material?
03:21It gets a little bit confusing and can spend a lot of time doodling with this
03:25and not get way the results you want.
03:27On top of this you have a Shiny setting which controls the blurriness of the reflections.
03:32So, it's an okay material but I don't use it very much in my own work because I
03:36find it very non-intuitive.
03:38So, I am going to select the dielectric_pot here in the outliner and choose
03:43Display > Show Selection and I'll select the dgs_pot and do Ctrl+H to hide it.
03:52Let's take a look at this material.
03:53I am going to do another quick render here.
03:56To the most pot of this material does a good job of simulating glass but you'll
04:00notice that the shadow cast by the object is opaque.
04:05This can drive you a little bit crazy because you have to jump through a number
04:08of hoops in order to get a transparent shadow going that's effective.
04:12So, if I select the dielectric_pot object in the outliner, right-click in the
04:17Hypershade, and choose Graph Materials on Selected Objects.
04:20I can select the material and open up the attribute editor.
04:25There are several channels to control the color of the object.
04:29You have Color and Outside Object and Outside Color.
04:32You also have two settings for Index of Refraction and the idea is that material
04:36is meant to accurately simulate light as it passage through multiple surfaces.
04:41So, for example the Index of Refraction here would control the index of
04:45refraction for the glass. Outside Index of Refraction would control say the
04:50index of refraction of the air.
04:52So, if I set this to 1 that will be the index of refraction for the air.
04:56Then the Phong Coefficient controls the specular highlight.
05:00What makes this material particularly difficult to use is in order to get that
05:04transparent shadow you have to either create some workflow that involves render
05:09passes or render layers.
05:11So, one render layer would have the dielectric material and no shadows cast and
05:15another render layer would have an object that has a transparent material
05:19applied but the object is hidden and then you could composite the shadow.
05:23You can see it starts to get more and more complicated.
05:25The other alternative would be to select the dielectric_material shading group
05:29node and connects the dielectric_ material Photonic node to the photon shaders
05:36slide down here in the shading group node.
05:38Again, very complicated and on top of this you have to start messing with caustics.
05:43It becomes a pain in the neck.
05:45So, again not a material that I use very often.
05:48Then finally I'm going to display the MIB_pot.
05:53I'll select it, right-click in the Hypershade, and choose Graph Materials on selection.
06:03You can see for this material this shader has actually created of a network of
06:06two other materials.
06:08We have the mib cook_torrance which determines the diffuse quality as well as
06:14the specular highlight but does not have any settings for the reflection.
06:18Reflection is controlled by the mib_glossy_reflection node.
06:22So, in order to set this up I need to connect the mib cook_torrance to the Base
06:27material of the glossy_reflection_node.
06:30You'll notice if I select in the Hypershade under Materials that there are a
06:34number of MIB nodes.
06:35We have a Blinn, Cook-Torrance, Lambert, Phong, Ward and so on and so forth.
06:41All of these shaders control the diffuse quality and the specular highlight but
06:46they need to be connected to an mib_ glossy_reflection node or to indicate a
06:52transparent material you need to connect it to a mib_glossy_refraction node.
06:56Then to get the look that you want you need to basically adjust the settings on both nodes.
07:02So, there's a lot of jumping back and forth and adjusting these settings until
07:06you get what you want.
07:08Again, it can be a kind of a headache especially if you are just hasn't come up
07:11with something fairly simple.
07:12So, what is the alternative?
07:14Well, these shaders are from an older version of mental ray that has been
07:18integrated into Maya.
07:20The reason they still exist is largely to provide legacy support for people
07:24using older shaders or older workflows.
07:28There is an alternative to using these shaders that can make your life a lot easier.
07:32So, I am going to show these objects again and I am going to set Diffuse back to
07:37dark gray color for the dgs node.
07:41I am going to select the mia_pot 1, 2 and 3 objects in the Outliner and I'm
07:50going to choose Display Show Selection.
07:54So, what I've done in this scene is I've created three alternate pots here in
07:57the back behind these in the front.
08:00These pots all have different variations of the mia_material applied to them.
08:07So, again if I open up the Hypershade the mia_materials found under mental ray >
08:15Materials and it's this material right here, mia_material.
08:19I use the mia_x_passes material most of the time.
08:23This material is an awful lot of settings but at the same time these settings
08:31allow you to simulate just pretty much anything you want to without the
08:34headaches of the other more complex shader networks.
08:38So, if I do a render here you'll see that what I've done is I've quickly used
08:42mia_materials to imitate the same look that I created with the other mental ray shaders.
08:48I'm just trying to drive home the point here that for the most part you don't
08:51need to use the DGS, the Dielectric or the MIB shading networks to create
08:57good-looking materials.
08:58You can skip those altogether and just start working with the mia_materials.
09:03You can see like for instance this transparent glass shader that I've
09:07created using mia_material.
09:09It looks extremely as similar to the Dielectric shader.
09:12I think it's a bit more physically accurate we don't have these over bright reds here.
09:16This to me looks more realistic than this does and you'll also notice nice
09:21transparent shadow has already been created and it's part of the material.
09:25I don't need to jump through any extra hoops to create a transparent shadow for this shader.
09:30Diffuse glossy shader, I've imitated very quickly using an mia_network and same
09:35with the MIB-based network.
09:37Again, I think this shader to me looks more realistic than what I've created
09:42with the MIB Base material.
09:45So, the bottom line as an academic exercise it's a good idea to learn about how
09:49these materials work.
09:50But if you really want to get some work done and you what to create a
09:53good-looking render which I'm assuming is your actual goal,
09:56then skip these shaders, go straight to the mia_material and master that maternal.
10:01You'll be able to simulate pretty much anything you can think of.
10:05mia_ stands for Mental Images Architectural shading node and the purpose behind
10:10it is for simulating hard surface objects.
10:14But I've actually used it to simulate a wide variety of shading types.
10:18I've used it for insects. I've used it for translucent plastic. I've used it for
10:23special effects for things like you know scanning electron, microscope shaders.
10:28Pretty much anything you can think of with the exception maybe of human skin the
10:32mia_material is perfect for it.
Collapse this transcript
Introducing the mia_material
00:01In this movie we are going to introduce the mia_material. This is the Mental
00:06Images Architectural Material.
00:08This is my favorite mental ray shader because it is essentially a Swiss Army knife.
00:13You can simulate seventy different types of surfaces using this material.
00:17So, I am going to start in this scene, and I just have a familiar teapot
00:21model on a checkerboard.
00:22The first thing I want to do is I set up some lighting.
00:25Now the mia_material, the idea behind it is that it's a physically accurate light.
00:31In other words, no matter what you do with the settings,
00:33the settings are always going to accurately simulate the physical properties of
00:38real-world materials.
00:39So, a good way to start playing with this material is to set up some physically
00:43accurate lighting and that can be easily achieved using the Physical Sun and Sky network.
00:49So, let's set that up really quickly.
00:50I am going to go to Window > Rendering Editors > Render Settings.
00:56Under the Render Settings, I'm going to click on Indirect Lighting and at the
01:01very top under Environment,
01:02I am going to choose Physical Sun and Sky.
01:04So, I'll just press the Create button this will create the Physical Sun and Sky network.
01:10You also notice that it turns on Final Gathering, which will take care of
01:14our indirect lighting.
01:15This is actually very easy lighting setup to use.
01:20In the outliner, I have a sunDirection node.
01:23I am going to zoom out a little bit and pull up the directional light that is
01:31created when you activate this lighting network.
01:33I am just going to rotate it a little bit so we get something more like a late
01:39afternoon or early evening type of lighting.
01:41So, let's do our test render.
01:43Currently, the teapot has just a regular old Lambert applied.
01:46Let's do a test render so you can see what the lighting looks like.
01:49So, here is our lighting so far, and you can see that we have a nice bluish
01:53shadow that's reflecting some of the indirect lighting of the sky.
01:57What I am going to do is just rotate this a little bit more, and zoom in, and
02:05do another test rendering just to make sure we have a good decent angle to start with.
02:08So, that's looks pretty good.
02:11You'll notice in the Attribute Editor for the sunDirection node, the way you
02:15control the lighting is on the mia_ physicalsky tab, and the reason I want to
02:20point this out is notice the mia_ prefix here.
02:23This is an indication that this lighting scenario works very well with the mia_
02:28shaders, they are designed to work together.
02:30So, I am going to choose Window > Rendering Editors > Hypershade and in the
02:36Hypershade under mental ray > Materials, I'm going to choose the
02:40mia_material_x material.
02:42The X stands for extended, which means this material has some
02:45extended capabilities.
02:47Most of that is in the backend, so you don't really need to worry about it too much.
02:51Generally speaking, I usually either use the mia_material_x shader or the x_passes
02:56shader if I know I am going to be using render passes later on.
03:00But I'll just start with this one.
03:01Just click on the mia_material_ x button to create the shader.
03:04I am going to remove the Hypershade out of the way, select my teapot, and
03:11right-click over the shader and choose Assign Material to Selection.
03:14So, now with that applied let's do a quick test render to see what the
03:19default settings look like.
03:20So we essentially have a shiny white pot as a default setting.
03:26Let's store this image.
03:27So what I want to do is give you a brief tour.
03:30This is an overview of how the shader works.
03:32So, I am going to select the shader in the Hypershade and open up the Attribute Editor.
03:38Let's take a look at the attributes.
03:39There are a lot of them, but you don't need to use all of them.
03:42You only need to play with the ones that you want to use.
03:45So, let's start by seeing how we can create something that looks a bit like a
03:49translucent plastic.
03:51Up here at the top we have the Diffuse Settings and the way that the settings
03:55are arranged in the Attribute Editor is the more commonly used settings are
03:59at the top of each section and then less commonly used settings are towards the bottom.
04:05So, for example, under Reflection we have basic reflection settings and then
04:09below that we have Advanced Reflection settings.
04:11So, we don't always need to use Advanced Reflection.
04:14Usually wanted to see what you can get away with using the basic controls and
04:19then if you need to add more advanced properties, you can start to use the
04:22lesser used settings.
04:24The other thing that's nice about this is if you hover the mouse over these
04:28settings, you get a little hint as to how each setting works, so that can save
04:33you some trouble from digging through the manuals.
04:36Let's start by creating a blue color for the Diffuse channel.
04:39So I've clicked on the color swatch next to Diffuse and I'm going to create a
04:44blue somewhat desaturated color here just by dragging in the color chooser.
04:49Something like that should work well.
04:50So, the Weight is the overall strength of the Diffuse channel, so as I pull this
04:56down it becomes darker, because less light is being defused by the reflection
05:01as it bounces off the shader.
05:04I want to set it to about something around 6.4 is fine, and the roughness also
05:09helps to add some of that diffuse reflective quality to the diffuse reflections.
05:17Under Reflection, we have Reflection Color, as well as Reflectivity.
05:21So it is the strength of the reflection and then this influences the color of the reflection.
05:27So, I am going to bring the color of the reflection say to like a similar purple
05:33here and I am going to leave the Reflectivity at about 0.8 is fine.
05:39Then since this is going to be sort of a plastic, I want to make it kind of a
05:43dull or blurry reflection.
05:44To do that all I need to do is lower the Glossiness setting.
05:48So, a very high setting, I am going to get very clear reflections on the
05:51surface. At lower settings this is similar to using Reflection Blur on the Maya
05:56standard shaders, Blinn or Phong or those type of shaders, and then the Glossy
06:01Samples controls the quality of settings. So the higher this is the less grainy
06:05the reflections are, but the longer it takes to render.
06:08So, I am just going to set the samples to 12 for now.
06:11These two settings, just very briefly, the Highlights Only means that their
06:15environment will not be reflected just the specular highlight.
06:18Metal Material will add a certain amount of the diffuse color into the
06:22specular highlights.
06:23When I turn this on you can see how we have now purplish highlights, and that's
06:27good for like painted metal colors and that kind of thing.
06:31So, so far we have our Diffuse settings set up and our Reflective settings, so
06:36let's do another test render, and there we go. Wwe get something that's kind of
06:39like a shiny plastic kind of color.
06:41You can see nice broad specular highlight, blurry reflections.
06:45They are not too strong but they are physically accurate, so it look quite nice.
06:50The next thing I want to do to add a certain amount of translucency is come down
06:55to the Refraction settings, and this is similar to the Reflection settings.
07:00In order to make the material look transparent I have to set the Transparency
07:04value to something above 0.
07:06So, I'll set this up to about 0.7.
07:13The Glossiness setting, again, this is for creating blurred refractions, just
07:17like with the reflections.
07:19If I lower the Glossiness value in the Refraction settings I am going to get
07:23blurry refractions, making the material look more translucent.
07:26So I am going to bring this down to about .3. Maybe I'll pump up
07:30the Transparency a bit.
07:32The Color setting affects the color of the transparency, so if I set this up to
07:36like purplish blue, this will make it look more like plastic.
07:39So again, I am going to do a test render and see what we come up with.
07:42It's starting to look somewhat transparent and somewhat translucent, but I think
07:46we can improve that a little bit by increasing the Transparency up to 1, and I
07:52am going to lower the Index Refraction.
07:54Right now, 1.4 is approaching something like glass. I am going to set this to
07:581.1, maybe make Color a bit lighter for the Transparency, and I am going to set
08:04the Glossiness to about 0.5.
08:07This is essentially the workflow that I go through when I am using the mia_material.
08:11It's really a matter of just figuring out the type of shading that I want and
08:15then playing with the settings until I get something that's close.
08:18So you can see now we are on our way to getting something that looks like a
08:22translucent plastic.
08:23I can improve the quality of the Refractions by increasing the samples, because
08:28this is looking a little bit grainy.
08:30In my mind, the blurriness of the Reflections does not exactly jive very well
08:35with the blurriness of the Refraction.
08:36So I will just go up here and lower the Glossiness of the Reflections a bit, so
08:42they are a bit duller.
08:44Then I am going to increase the Glossiness settings under Refraction to about
08:4816, so it looks a little bit less grainy.
08:50So that's just using the basic Reflection and Refraction settings and then we
08:54have more advance settings under here, under Advanced Refraction.
08:59So let's see what kind of result we get just using this standard
09:01refraction controls.
09:03I want to just do another test render.
09:05So as you can see, it's already looking pretty good with just a little bit of
09:08twirling some of the norms. As we get more into the material, we will see that
09:12it's really quite flexible and very advanced.
Collapse this transcript
Creating a custom mia_material preset
00:00The mia_material comes with a number of presets that you can use to speed up
00:05your workflow when designing shaders.
00:08As a demonstration, I'm going to start to shade parts of this car model
00:12using the mia_material, and you'll start to see how flexible this workflow actually is.
00:16So what I'm going to do is I'm going to go into the Hypershade, just by choosing
00:21Window > Rendering Editors > Hypershade.
00:23And what I'd like to do is create three materials.
00:28I want to create a chrome material for parts of the car like the bumper, the
00:32area around the headlights, the runners, and the hubcaps.
00:38I'd also like to create a rubber material for the tires, and then I'd like to do
00:44maybe like a red plastic for the taillights here.
00:48So let's see how we can do that really quick using the presets.
00:52So the first thing I need to do is going to the Hypershade. Under the mental
00:55ray Materials I'm going to create 3 mia_material X nodes by clicking on the
01:01mia_material_x button three times, though at 1, 2, and 3 and expand the Hypershade.
01:10And keep things organized.
01:12Let's start by naming each of these materials.
01:14So I want to select mia_material_ x1 and I am going to name this chrome_mia.
01:24I'll select mia_material_x2 and I am going to call this rubber_mia.
01:33And I'll select the third one, and I'll call it redPlastic_mia.
01:41So now let's assign these surfaces, I am going to go into the outliner, expand
01:46the car group, I have the chrome surfaces grouped together in a subgroup called
01:51chromeSurfaces, so I'll just select the whole group in the outliner.
01:56In the Hypershade, I am going to find the chrome_mia_material, right-click over
02:00it, and choose Assign Material To Selection.
02:03Now for the rubber, I'll just go into the scene here, and I'm going to select
02:08the tire just by clicking on it, then Shift-select the second tire, so I have
02:13the two left tires selected.
02:16I am going to Shift-select on the right front tire and Shift-select on the left front tire.
02:21So I now have all the tires selected.
02:24And I'm going to right-click over rubber_mia_and choose Assign Material To
02:28Selection, so now that one has been assigned.
02:31And then finally I'll rotate to the back of the car. Click on the first
02:37taillight and then Shift+ Click on the second taillight.
02:40So now I have those selected and I'll assign the redPlastic material.
02:44So I now have my materials assigned, so I'm going to press the 6 key, so that I
02:52can see the textured view.
02:55Now, I actually use the presets.
02:57The first thing I want to do is select the chrome_mia_material here in the
03:01Hypershade, and in it's attribute editor there is a button called Presets, so
03:06I'm going to click on this and you'll see a list pops up with a whole bunch of
03:09different presets for creating different materials.
03:12The one at the top of the list is Chrome.
03:14So I'm going to select Chrome, move over to the left and choose Replace, and
03:18this is just going to replace all the settings in the Attribute Editor with the
03:25settings that are appropriate for simulating basic chrome shader.
03:28I could do see the same thing with the rubber shader.
03:32So I'm going to select the rubber shader here from rubber_mia_shader and under
03:37Presets I'm going to click on Presets. Down towards the bottom there is a Rubber
03:42preset, so I'm going to choose Rubber > Replace.
03:44You can see now that this is replaced with all the settings appropriate for rubber.
03:50So it's doing a lot of the thinking for you and taking out some of the
03:52guesswork, which is what makes this material so fun to work with.
03:55And then finally, I am going to select redPlastic, and under Presets in the
04:00Attribute Editor for redPlastic, there is no taillight presets.
04:04So I'm going to have to do a little bit more work on this one, but at least I
04:07can find it in an appropriate starting place.
04:10So maybe TranslucentPlasticFilmLightBlur. Let's see how that looks. I'm going to
04:16choose Replace, and that will replace the shader.
04:19So before I do any tweaking, I want to do a test render just to see how it looks so far.
04:24Arrange the camera view so I can see the car and click on the Render button.
04:32Now this scene is rendering with the Physical Sun and Sky network, so I have a
04:36nice quick lighting setup already arranged.
04:39Now, the chrome surfaces already look pretty darn good. I am happy with that,
04:44just right off the bat.
04:45So I am going to leave those the way they are.
04:47And then to take a look at the tires, they look pretty good to start with, but
04:50they kind of look like a toy. They could be a little bit darker.
04:53I'm going to save this view by clicking on the store image or the Keep image
04:58button and let's minimize the render view, and I'm going to select the tire here.
05:02Any one of the tires will do. They all have the same material applied.
05:06And I'll click on the rubber material tab, the rubber_mia_tab in here at the attribute.
05:12So I just did need to do a little bit of tweaking to get this look more
05:15like darker rubber.
05:16First thing I need to do is under the Diffuse section I'm just going to set the
05:19Color all the way to black.
05:21That will help darken the color and then under Reflection I am also going to
05:26bring down the reflection Color, maybe to a dark gray.
05:31And I'll pull down the Reflectivity to about I say 0.35.
05:35So let's do another test render.
05:39So that's looking pretty good.
05:40So I'll store that image.
05:42Now the nice thing about working with the presets is if with you come up with
05:45something that you like, you can eventually create your own preset out of it,
05:49for use in future Maya scenes.
05:51So what I'm going to do is I am in the rubber_mia material Attribute Editor,
05:56I'll click on Presets, and at the top I'll choose Save_mia_material_x Preset and
06:02I'm going to change the preset name to, we'll just call it rubber_tire, and click
06:10on Save Attribute Preset.
06:12Now, if you look in the Presets menu, I have a rubber_tire material that I
06:16can use in the future, and the nice thing is that this is saved with the Maya
06:20preferences, so in future Maya scenes, they could be in a completely different project,
06:24this rubber_tire preset will be there for me to use, and after a while you can
06:28start to build up your own library of presets very quickly.
06:31If you ever need to delete a preset, you can just choose Edit Presets and
06:36select from the list and then delete the ones that you no longer need.
06:41So let's take a look at how we can quickly define our redPlastic here.
06:45What I want to do is I'll select the surface here.
06:48And the first thing I need to do is I know it's going to be red, so I'll click
06:51on the Color under the Diffuse settings and choose a nice red color.
06:57So let's do a test render and see how the taillights look so far.
07:00It looks all right.
07:02It looks a bit more like a headlight.
07:03It's a little bit too transparent.
07:05So what I'm going to experiment with is rather than going here and immediately
07:09starting to adjust these settings, I'm going to see how if I can blend presets
07:13together, how that might help to look.
07:15So if I go to the Presets menu here, originally I used
07:19TranslucentPlasticFilmLightBlur, so maybe something that's a little bit thicker.
07:24So what I can do is I'll go down to the GlossyPlastic preset and rather than
07:29choose Replace, I'll actually choose Blend.
07:32So if I choose one of these, it's going to Blend 75% of the settings in with the
07:38current settings or 90% or whatever percentage that I choose.
07:42So let's try blending 50%. So this will Blend 50% of the GlossyPlastic preset
07:47with the current settings.
07:49Let's try that, bring up the render view and I have this region selected right
07:54here, so I'll just click on Render Region and see how that looks.
07:58It looks a bit more like plastic.
08:01A bit more reflective. I am liking it so far.
08:04I'll store the image, but from this point on what I can do is I can continue
08:07to blend presets together, all I want, all day long, until I get something that I like.
08:12So I think it is too reflective, maybe I'll blend in 25% of the MattePlastic,
08:17and then on top of that, maybe I'll go into the Diffuse settings and change the
08:21color to a nice deep red for taillights.
08:26And I would also like to go down to the Refraction settings, click on the
08:32Color under refraction,
08:33and this is the transparency color, and also add-in a deep dark red.
08:42Let's render the region and there we go.
08:44It's started to look pretty good.
08:46So this is generally the workflow that I prefer to do.
08:49If I am trying to define a surface, what I'd like to do is go in, choose the
08:53preset that I think is going to be kind of close to what I want, and then start
08:57blending presets together, just to start to narrow down the general area of what
09:02I am trying to achieve in terms of the look of the shader.
09:05And after I've done that I'll go in and start to tweak settings individually,
09:09until I come up with something that I like.
09:10And you'll find that this is a very quick way to get a nice shader going without
09:14worrying too much about the technical details.
Collapse this transcript
Looking at car paint materials
00:00mental ray comes with a special shader that's designed to simulate the look of CarPaint.
00:06This is found in the Hypershade, under mental ray Materials > mi_car_paint_phen.
00:12Phen stands for phenomenon.
00:13I generally like to start with the mi_car_paint_phen_x shader.
00:16So I am going to click on this button to create the shader and then expand the Car group.
00:22I'll select the body subgroup.
00:25Right-click over the shader and choose Assign Material To Selection.
00:29Next thing, I'm going to do is I want to select the mi_car_paint_phen_x material
00:35and rename it to CarPaint.
00:37Let's do a rRender and see how the default settings look.
00:42So this is what we end up with.
00:45It looks a little bit weird because we have some strange stuff going on here in
00:48the specular highlight, but if you understand a little bit about how CarPaint
00:51works it will help to explain what's going on.
00:54The way CarPaint is designed is we have a base color applied to the surface and
00:58then above that several layers and the topmost layer is a transparent coating.
01:04And within the transparent coating, they suspend little flakes of metal that are
01:09meant to reflect sunlight and this is what gives CarPaint its sparkling quality.
01:13So the problem with this particular shader is that the flake size is way too
01:18big, relative to the scale of the car.
01:21So a simple way to fix that is just to reduce the size of the flakes, and this
01:26setting is found in the attributes for the CarPaint material.
01:29So I'm going to store this image and minimize the render view and in the
01:34CarPaint attributes in the Attribute Editor, I m going to scroll down to
01:38the Flake Parameters.
01:40Let me close the Hypershades, so we can see what's going on here.
01:43And the Flake Parameters determine of the quality of the flake suspended in that coding.
01:48So the first thing I want to do is reduce the Flake Scale.
01:50The default settings 0.12. I'm going to set this to 0.002 to make it nice and small.
01:56The Flake Strength, this sets the orientation of the flakes suspended in liquid.
02:00So as this value approaches 1, the flakes become more randomly oriented so you
02:05get a little more variation in the color.
02:07You set this down to zero, all the flakes are parallel to the surface of the car
02:11and you get a kind of a different quality.
02:12So I will leave that at 0.8.
02:14Flake Decay is meant to optimize render times by not rendering the flakes that
02:19are farther away from the camera.
02:21I'm going to leave that at zero for the moment and let's increase the Flake
02:24Density to 0.8, so we have more flakes suspended in a liquid.
02:28And the other thing I'd like to adjust is the Flake Reflect.
02:31This adds a little bit of the environment reflection to the flakes themselves.
02:35So I am just going to put this at 0.1.
02:36It isn't very strong.
02:38Let's do another render and see how it looks. So there we go.
02:42It's a little bit over the top, but you know this is a hot-rod so I think
02:48over-the-top is appropriate.
02:49So I kind of like the way that looks.
02:51So let's store that image and take a look at some of the other settings.
02:54If I wanted to create a duller look or maybe for an older car, I might bring
02:58down the Flake Color to make it a little bit duller, and adjust some of these
03:02settings, so that they're not as present, but this is nice new sparkly paint
03:06so let's leave it that way.
03:08I want to go to the Diffuse Parameters and start adjusting the colors for the car itself.
03:12I'm of the firm belief that a hot rod should be purple so I'm going to click on the
03:15Base Color to open up color chooser and select a nice dark purple color.
03:21You can see that the preview here updates.
03:23This is basically a more apparent on the edges that face away from the camera,
03:28leaving this at a darker color will make the car look a little bit newer.
03:32So if I raise this is going to kind of flatten out the color and make it look
03:35duller, but I want a nice new car.
03:37So the only thing I am going to do to this is click on this, and may be bring up
03:41the blue a little bit just a touch.
03:44And then the Lit Color, this is, as you can see from the preview, visible in
03:48the parts of the car that face towards the camera and it adds sort of a
03:51secondary color to it.
03:53And this can add a nice kind of variation to the color.
03:56And you know what I think I am actually going to leave it the way it is at this
03:59kind of dark fuchsia because I like the way that looks.
04:02It should look like a good hot rod.
04:04And then of course we have to adjust the way this looks, you can adjust the Lit Color Bias.
04:09A lower diffuse weight is going to kind of flatten out the color a little bit,
04:12so I want to leave that at 1, just to keep it nice and intense.
04:17And then down under the Specular Parameters, this is going to adjust the overall
04:20shininess of the car.
04:22The default settings make this look fairly new so I am going to leave them the
04:25way they are, but you can adjust this to make the car look shinier or duller as needed.
04:30Depending on whether you want to make a newer looking car or an older looking car.
04:33That's what we have so far.
04:38A few adjustments I think I can make it a look a little bit newer.
04:42I want to point out that the Spec Exponent and this Specular Secondary Exponent,
04:47these higher values will produce tighter highlights.
04:49So right now I have a fairly broad highlight.
04:52If I raise these values, it's going to make a tighter highlight.
04:55So I think I'd like to do that so I want to set this to 80 and this up to about 40.
04:59This secondary exponent should be a lower value than the spec exponent.
05:05And then I think I want to bring down at the Base Color a little bit and
05:10maybe the Edge Weight.
05:11At this point it's just a matter of messing with these settings until you get
05:15what you like. Of course there is also Reflection Parameters which determine how
05:19the carPaint reflects the environment.
05:22And these are similar to Reflection Parameters found in setting in materials
05:26like the mia_material. We have Glossy Spreads.
05:28So if I increase this, it's going to spread out or blur the reflections, making
05:32it look a little bit duller.
05:34We have a Reflection Color, which is going to add a certain amount of color to
05:37the reflections seen in the surface, but I think we're going to stick with the
05:40default values and do one more render and see how it looks. There u go.
05:42It's looking pretty good.
05:47The last thing I'd like to point out is if you encounter a situation or where
05:50you find the size of the flakes at one part of the car are a completely different
05:54from the size of the flakes in another part of the car, even though the same
05:57material is applied to all the parts of the car,
06:00you want to make sure that the scale of the car is consistent.
06:03In another words, the size of the flakes is dependent on the scale of the object.
06:07So this surface has a scale of let's say 1, 1, 1 in X, Y, and Z and maybe this part
06:15of the car has a different scaling because of something going on during the
06:18modeling process. All you need to do is remember to freeze the transformations
06:22on all the different surfaces that make up your car.
06:25So that everything has a scale setting of 1, 1, and 1 in X, Y, Z and that should
06:31fix any problems that you have in the scaling of the flakes on the car.
06:35But there you go. That's the basics of setting up a carPaint shader.
06:37It's a lot of fun to play with, as you design your own vehicles. So try it out
06:41and see how you like it.
Collapse this transcript
Using subsurface scattering shaders
00:01In this movie we are going to talk about some ways that you can create the look
00:04of realistic human skin using the mental ray Subsurface Scattering shaders.
00:09So in this scene I have a character model just a head of a character.
00:14and at the moment he has got just the default lambert applied to his surface of his skin.
00:20The lighting in this scene is fairly simple.
00:22Let's take a look at it really quick though, because it is important.
00:25I have an areaLight, which is creating the main key light on the surface of the
00:29front of the character.
00:31I have fill light here which is just a directionalLight with a very low
00:35intensity value and just a slight bluish color to it, and then most importantly
00:40I have a light here which is a directionalLight and it's lighting the
00:45character from the back, and this is going to be an important element to
00:49creating the realistic skin, as you see as we get into creating the shader and
00:54adjusting the settings.
00:55Lastly, in the camera1 attributes under Environment, we have the background set
01:02to just a bluish color, just so we can see the objects a bit easier.
01:06I'll do a rendering.
01:09You'll see that the character at the moment looks fairly simple.
01:12And here he is with just a default lambert applied to the skin.
01:16I'll minimize the Render View and let's take a look in the Hypershade, and see
01:20how we can start creating one of these shaders.
01:23So go to Window > Rendering Editors > Hypershade, and under mental ray >
01:28Materials, if you scroll down you will find there are number of shaders that
01:32use the misss prefix, and this stands for the mental images subsurface scattering shader.
01:38So any one of these shaders will create the subsurface scattering effect.
01:43and some of the shaders are very simple and some of them are more complex.
01:47The misss physical shader is the most complex and that's really only used for
01:52objects like very thick candles or jade or things like that, when you really
01:56need an actually physically accurate subsurface scattering effect.
02:01But the one that I like to use the most is the misss_fast_skin_maya shader,
02:07because this is the simplest to use.
02:09It does have more settings than some of the others, but I find it to be the most reliable.
02:13So I'm going to click on this shader to create the node and I'll select the
02:19character's head, right-click over the misss_fast_skin_shader, and choose Assign
02:25Material To Selection.
02:26I am going to select the shader and in the Attribute Editor, let's just rename
02:30this oldmanSkin, so we know exactly what it is.
02:39So I would like to create a test render to see what the default settings look like.
02:42So let's close the Hypershade for a moment and do another test under.
02:46So the way subsurface scattering works in the real world is photons of light
02:51penetrate the outer layers of the surface, bounce around inside and then leave
02:56again, and they pick up some of the color of the surface as they leave again.
03:00In human skin you see it is as sort of this redness, especially in the areas that
03:04are strongly lit from the back or thin areas like the ears.
03:07Now the default settings right here tend to make the surface look very plastic,
03:13so we can start to adjust this to make it look a little bit more realistic.
03:16So I have got the Attribute Editor open for the oldmanSkin shader.
03:24Let's take a look at some of these settings.
03:25At the top we have the Diffuse Layer.
03:27This is the outermost layer of the skin and this is where most of the light
03:31bounces off the skin and back into the environment.
03:34So this is where you put the basic skin color, adjust the ambience, the strength
03:39of the diffuse color and so on and so forth.
03:41But the settings that control the actual subsurface scattering quality of the
03:46shader are found in the subsurface scattering layers, and for the skin shader,
03:52we have three layers.
03:54So when you're working with the shader, what you want to think about is think
03:57about the layers of skin.
03:58Skin covers up all our muscles and bones and keeps us together for the most part
04:02when we are walking down the street.
04:03So it's very useful in that respect.
04:06But you can sort of think about it as building up layers on top of things
04:09like muscle and bone.
04:11When I am designing the shader, I think about it from the bottom up, from the
04:14innermost layer of the skin and up to the outermost layer of the skin.
04:17And the way the shader is organized, is the innermost layers are down here
04:21at the bottom, and as we go up in the Attribute Editor, we moved outwards to
04:26the outermost layers.
04:27So the Diffuse layer is the outermost layer, and the Back Scatter Color is
04:31the innermost layer.
04:32The Back Scatter Color is most affected by strong backlighting.
04:36So the directional light that I have here, that's shining in the back of the
04:40character is going to interact with that back scattering color the most.
04:45So let's select the character and go back to the oldmanSkin shader and the way
04:50I like to do this design in the shader is I want to turn everything off that I
04:55can and work with one channel at a time, and slowly build up the look of the shader that way.
05:00So the first thing I am going to do is I am going to go down to the
05:02Specularity layer, this is the specular head highlights in the surface of the
05:06shader, and I set Overall Weight to zero. So this turns Specularity off and
05:11you can see that in the preview.
05:12There's no more specularity.
05:14I am going to leave Back Scattering the way it is, but I'm going to set the
05:17Subdermal Scatter Weight to zero so that effectively turns that off, and I am
05:23going to set the Epidermal Scatter Weight to zero that turns that off, and I'm
05:28going to turn the Diffuse Weight to zero.
05:31That turns that off.
05:32Think of these weight attributes as kind of like volume knobs for each one of these channels.
05:37So, now they're all set to zero with the exception of the Back Scatter Color, so
05:41let's do a test render and see how it looks.
05:44So this rendering gives you good idea of how back scattering works.
05:48It's picking up the color from the directional light that's shining in the back
05:52of the character's head and you can see the redness come through. In the
05:55thinner parts of the surface we get more red and the thicker parts of the
05:59surface, it's darker color.
06:01The tip of the nose of course has the most amount of matter behind it, so it's the darkest.
06:06If you started to rotate the camera and had it shining from the profile, the
06:10nose might be redder, but from this moment since we are looking at it straight
06:13on, that's going to be the darkest.
06:15So if we look at the settings, the way this works is as I mentioned before,
06:19the Weight setting is kind of like the volume knob.
06:21So right now that's set to 0.5.
06:23So in terms of the overall shader, this is how much of the contribution the Back
06:28Scatter Weight is giving to the overall look of the shader.
06:31Now the Depth and the Radius are also important to understand.
06:34The Back Scatter Depth determines how far this red color is going to
06:38penetrate the surface.
06:39So in other words, when this is set to 25, this is how much the red color is
06:43going to come through the entire character.
06:45So as I lower this value, I am going to set this down to 10.
06:49What's going to happen is we are going to see the thicker parts are going to
06:52become even darker, and that it's only going to be the thinner parts that we are
06:55going to see this red color.
06:56Now the Radius setting, you can sort of think about this as if I rotate the
07:00view and imagine light hitting the surface from the back, think about as the
07:06photons of light are hitting the surface and browsing around within the
07:10surface, think about the radius as about how far they spread as they go through the surface.
07:15So this is kind of like a spread value, and I want to lower this down a little
07:20bit too, because right now I think it's a bit too strong.
07:23So I want to lower this down to let's say about 8. I usually think about this in
07:27terms of same units.
07:28So if the grid is showing this is 10, same units, then I'm thinking about the
07:33Radius is being in about a volume of about 8 units, and same with the Depth.
07:39So let's do another rendering.
07:40So as you can see by lowering those values, the Depth and the Radius, we get
07:49more of a subtle shading here on the ears.
07:51This look is starting to look a little bit more realistic in terms of how it
07:56actually affects human skin.
07:58But of course, if you make it too subtle then it's going to
08:01disappear altogether.
08:02So what I might do is increase the Back Scatter Weight to about .8 and let's
08:07give it a little bit more of a Radius to it.
08:11I will put this up to about 10 as well.
08:14So once you understand how these works, the Depth being how far the light
08:18penetrates the surface and the Radius being spread across the surface, then
08:22you'll understand how these other settings work, because it's basically the same way.
08:26Once again, each one of these is layers. So this is the innermost layer and now
08:30this is the next layer up.
08:32the Subdermal Scatter layer.
08:34Someone talking about human skin, I think about this layer of being like muscle
08:38and bone, and this layer being the deepest layer of the skin where you might see
08:42like veins and that kind of thing.
08:44So again, I am going to turn the volume up on this, so I am going to increase
08:47the Subdermal Scatter Weight to let's say, I'm going to start with 0.5 and generally when
08:54I'm working with the shader, I will just start plugging in when I think it would
08:57be appropriate values and adjusting from there.
09:00The main difference between the Subdermal Scatter settings and the Back Scatter
09:03settings is there is no Depth setting; there is only Radius.
09:06So I am going to lower this down to about, let's do the setting of 10, and I am
09:11going to keep these colors to where they for the moment, but that's another
09:15thing that you can adjust as you are tuning the skin.
09:17You can start to adjust the colors.
09:18It's a bit heavy-handed, but you can easily see now how the two colors are
09:24working together, so they're being added together, which is helping to increase
09:28the brightness on the ears, maybe a little bit too much but you can also see
09:31how these colors are combining on the various parts of the surface.
09:35So what I might do is lower this Weight down to about 35.
09:39I tend to like to have a higher Back Scattering Weight, because I like that back
09:43scattering effect, and I lower the Subdermal Scatter Weight a little bit, and I
09:48might bring the Radius down to about 8, and let's darken the Back Scatter Color
09:53a little bit and darken the Subdermal Scatter Color a little bit.
09:56Once you understand how they work, it's just a matter of tweaking to get the
09:59settings that you want.
10:00The Epidermal Scatter Color is the part of surface that's just below the
10:04very top of the skin.
10:06It's just going to usually have a lighter color, and again with this one I
10:10like to have a bit lower value than the other two.
10:12So I might set this to about 5, just to start with, and as terms of the weight,
10:18let's do 25 and see how that looks.
10:22Now you can see how the three layers are starting to work together to create the
10:29subsurface scattering effect.
10:31Once again, a little bit heavy-handed, but at this point I'm mostly interested
10:35in making this as obvious as possible, so you can see how these things work.
10:38It really takes a bit of tweaking to get the setting that you want.
10:42Finally, at the top we have the Diffuse Weight, and this is the color that
10:46directly interacts with the lights at the very surface of the skin.
10:49So this is where you think about things like freckles and moles and that kind of
10:53stuff, they are actual surface color of the skin, and I am going to set this to
10:57about 35, do another rendering.
11:00And there you can see how they're working together.
11:04The last thing that I like to adjust as I'm designing the shader is the
11:09Specularity settings and this is going to determine the shininess of the skin.
11:13Now what's interesting about the shader is that it essentially has two
11:16different specular channels.
11:18We have a Primary Specular Color and a Secondary Specular Color, and then an
11:23Overall Specular Weight.
11:25So this is going to be the overall volume knob for Specularity.
11:28So let's put this up to about 0.5 or maybe a little bit higher. Let's put it at 0.8.
11:33What I want to point out about the way these two work is if you can think
11:38about this as being like the broad specular highlights, well, imagine the light
11:43that is shining on the surface of the skin. This specular highlight is going to
11:46be fairly broad and spread out across the skin as it reflects the light in the room.
11:52The Secondary Specular Color, think about this is adding kind of the quality of
11:56like oily skin or wet skin.
11:58So you have a very shiny type of highlight on top of a broader highlight and
12:03that's basically the way these two works.
12:05As you can adjust their Weight and their Shininess. Higher values are going to
12:10make these more shiny.
12:12So if I set this up to 50 and increase the Weight up to 0.5, what we are going
12:17to get is a wetter looking skin.
12:20If I lower this, lower the Shininess setting,
12:22lower the Weight, we are going to get more of a duller skin.
12:24So depends on the effect that you're trying to achieve, and by default this
12:28has a slight bluish color and it kind of looks like the skin might in like a cool lighting setting.
12:32It has a nice contrast to the warmer colors to the rest of the skin.
12:36So I am going to render this and look at the end result and of course, we have
12:41a ways to go before we create generally realistic skin, but it's important to
12:46understand how the shader works, because in the next step, what you would want
12:49to do is start to plug textures into the various channels to start to control
12:55the overall colors of each channel as you design the skin.
12:59So you can see here is this specular coloring and you can see this is nice and
13:03shiny in the waxy parts of the ear and on the other parts of the face.
13:08So once you have established the overall values for the shader, the next step
13:14would be to go in and start plugging textures into these various color channels
13:19to start to fine-tune the look of it.
13:21So rather than having these sort of unrealistic colors, you can have a much more
13:25sophisticated texture in there controlling the color for each channel.
13:29That's generally the way that I go about designing the shader.
Collapse this transcript
3. Textures
Understanding UV coordinates
00:013D software such as Maya uses a special set of coordinates called UV to
00:05determine how to place a two- dimensional image on a three-dimensional object.
00:11As you know, in 3D software such as Maya, we use X, Y, and the Z coordinates to
00:16tell where an object is in space.
00:17So if I have a object such as this cube and I start to move it around, you can
00:21see in the Channel box, the X, Y and Z coordinates update, and same as if I
00:28rotate or scale, I get X, Y, and Z coordinates updating.
00:32Likewise X, Y, and Z coordinates also tell you where the vertices are in
00:36three-dimensional space.
00:37That's pretty straightforward.
00:38But when we want to start to texture an object or give an object surface
00:43details using a two-dimensional image, the software needs a way to figure out
00:47how to place this image on a 3D object, and that's where UV texture
00:51coordinates come in.
00:52Think of them as a separate set of coordinates based on the surface of the object.
00:56So imagine if you had a cardboard box and you took a marker out and you drew an
01:00X on the box. So I am going to press the 6 key, and this will turn on hardware texturing.
01:06So you can see that I have a little X drawn here on the box, just as if this
01:10was a cardboard box.
01:11UV coordinates tell us how to map a flat image, so that this x appears precisely
01:17where we want it to.
01:18So if I flatten the box, you can see where the X is.
01:21So a good way to take a look at this is to open up the UV Texture Editor.
01:25So if I have the object selected and I choose Window > UV Texture Editor, we'll
01:31get an idea of what the UV texture coordinates looks like on a flattened box.
01:36Pretty straightforward.
01:37And in the UV Texture Editor, if I click on this little face icon, it's going to
01:41preview the texture that I've applied to the Color channel of this shader on top
01:45of the UV coordinates.
01:46So you can see now here the X appears right up here.
01:49Now generally speaking, the UV Texture Editor is used to map UV coordinates on
01:58polygon objects. Just as a quick demo, I'll show you that the UV texture
02:02coordinates are actually a separate set of coordinates from things like the
02:06placement of the vertices, but you can see that they are directly related.
02:09So if I right-click over the UV texture layout and choose UV, I can select, for
02:16instance, this UV right here, this vertex, and you'll see that it appears
02:23selected here on the object.
02:26So it's kind of like a vertex.
02:29If I select a vertex and start to move it around, now I am moving a vertex.
02:36If I right-click and choose UV and move the UV around, the vertex doesn't move,
02:42but the texture does, because I am changing the placement of the texture values on the surface.
02:48So that's changing the way the 2D image is mapped to the 3D surface.
02:53And generally speaking, when we are working in the UV Texture Editor,
02:56our texture coordinates are usually appear in this upper right-hand corner.
03:01This is essentially a graph, so we have a range going from 0 to 1 along this
03:05axis, and 0 to 1 along this axis, so these are all the positive values, and then
03:10in the entire graph we have negative values in these three areas.
03:16In terms of terminology, these are the individual UV coordinates.
03:21The arrangement of the coordinates on the graph is known as the UV layout.
03:27So how I arrange the coordinates on this graph is known as the UV layout and
03:31you can do things like I can move the coordinates around.
03:34I can select all of the coordinates at once, move them. You can see how that
03:40changes the placement of the X. Scale them.
03:43Notice as I go beyond this range, we start to see repeats because the texture
03:48is actually starting to tile then.
03:50We can also rotate.
03:52That's sort of the basics of UV texturing.
03:58It's an important part of modeling, especially with polygon modeling, because
04:01once you created a model and you want to start shading it. You have to figure
04:05out how you are going to map 2D textures onto the surface, and UV coordinates
04:10are going to enable that.
04:11Creating UV coordinates is really about as much fun as doing your taxes.
04:15It's kind of an arduous process, but it's a necessary one.
04:18As we go forward and we start talking about textures, we will also be talking
04:21about UV coordinates at the same time.
04:23There's the basic overview as to what they are.
Collapse this transcript
Comparing NURBS and polygon UVs
00:00In this movie we're going to talk about the differences between UV coordinates
00:03as they are related to polygon and NURBS surfaces, and talk a little bit about
00:08the advantages of using one over the other, at least in relation to texturing.
00:12The primary difference between textured coordinates for NURBS surfaces as
00:16opposed to polygon surfaces is that NURBS surfaces have what's known as implicit UVs.
00:21In other words, the UV texture coordinates are built in to the surface,
00:25whereas polygons have separate UVs, UVs that can be added in independently of
00:31the other components on the surface like the vertices, the edges, and the
00:34faces and so on and so forth.
00:36So there are advantages and disadvantages to using one over the other.
00:40The nice thing about NURBS surfaces is since that they have implicit UVs,
00:44it means that you don't have to go through the process of setting up or mapping
00:48your UV coordinates which can be a lot of work.
00:51The disadvantage of course is that means that you have less control over how the
00:54texture is placed on the surface.
00:56So let's take a look at how this works in action.
01:00I have two surfaces in this scene. They're both toruses.
01:03One is a NURBS torus and the other is a polygon torus.
01:06I want to select both of these surfaces and in the rendering shelf click on the
01:12Lambert icon, so I'm going to apply the same material to both surfaces.
01:17And in the Attribute Editor for this Lambert material, I'm going to go to
01:21the Color channel and click on this swatch here to open up the Create Render
01:25Node palette and I am going to apply a Checker material to the Color
01:30channel, and when I do this you can see the checker pattern appearing on
01:34both of the surfaces.
01:38So, I am going to open up the Hypershade window, choosing Windows > Rendering
01:41Editors > Hypershade.
01:43Let's map this material.
01:46You can see here is the material, lambert2. Here is the checker pattern.
01:52If I hover over this you can see the checker pattern is connected to the Color
01:55channel, and then we have the place2dTexture node.
01:58This is a placement node that tells how to map this texture to the surface.
02:06If I select this node and open up its Attribute Editor, you can see we have a
02:10number of settings here that help us determine how the texture is applied.
02:14So we go in here and start playing with some of these settings, for instance the
02:18Rotate U and V, you can see how this is rotating the texture.
02:23So, in other words in the Hypershade you can see that the texture is rotating
02:26around and on the surfaces you can see how it's changing its position for
02:30both surfaces at once.
02:33The way these are set up is each coordinate field, this is the U and this is V.
02:37So if I set the V Coverage to 0.5 you can see that now the texture covers only
02:44half the surface but also notice that it's in a slightly different way on the
02:48NURBS surface as opposed to the polygon surface, and let me set this back to 1.
02:52So the main thing to understand about this is that when you're mapping a texture
02:57to a NURBS surface, the only way to determine how the texture is applied to the
03:03surface is to go in and edit the settings in the place2dTexture node.
03:08So this node right here.
03:09So if I want to change the position of this texture, I have to go in here and
03:13start messing with these settings to do that.
03:15So, for instance, if I change the Repeat values so and so forth, and that's the only
03:23way that you can determine the placement of textures on NURBS surfaces.
03:28On polygon surfaces you can use the place2dTexture node to change the placement
03:32of the texture, but you also have UVs that are separate from the other
03:36components of the surface.
03:38So if I select the polygon surface and choose Window > UV Texture Editor, here
03:43are the UV texture coordinates for the polygon surface.
03:46Right now, they just appear as a big flat grid.
03:49If I select the NURBS surface, you can see that it's also kind of a grid but you
03:52can also see they're grayed out.
03:53There is no way I can actually select the individual UVs of a NURBS surface.
03:57Whereas if, I select the polygon and then right-click and choose UV, and select
04:03these UVs and then start moving around, you can see now I can adjust the
04:07coordinates independently of the other components of the surface.
04:10So this is the main difference between UV coordinates on NURBS versus polygon surfaces.
04:16You have absolute control over how polygon UVs are mapped on the surface,
04:21independent of the other components, whereas with the NURBS surface, you're
04:24pretty much stuck using the place2dTexture node in order to position the
04:29texture on the surface, and that's your main option, but at the same time it's
04:33less work because you don't have to go about and necessarily mapping out all
04:36the UVs to get them precise.
04:39Depending on the type of model you are creating and the amount of work that
04:42you want to do, that aspect may make you decide to use one type of surface over the other.
Collapse this transcript
Mapping polygon UV surfaces
00:00In this movie, I am going to talk about how to create UV texture coordinates
00:03for polygon surfaces.
00:06What I have here is a single tire from my car scene.
00:09I've hidden the car, but if I select the car group in the outliner and choose
00:13Display > Show Selection, you can see here is my car.
00:18My goal is to improve the shading of the tire so I can add details using texture maps.
00:24I'd like to add a tread, maybe some decals on the side of the tire, and so on and
00:30so forth using texture maps just to make it look a bit more interesting.
00:34But in order to apply texture maps correctly to the surface, I need to make sure
00:38that my UV texture coordinates are set up properly.
00:41So, let me select the car in the outliner and press Ctrl+H to hide it and I just
00:46moved the tire here to the center of the grid because this will make it easier to
00:49start projecting UV texture coordinates.
00:52So I have the tire selected here. I'll choose Window > UV Texture Editor and you
00:57can see that at the moment, there are no UV texture coordinates.
01:00It's just completely blank.
01:02So the process of creating UV texture coordinates generally involves projecting
01:08the UV coordinates from various angles, shapes that closely match as much as
01:12possible the shape of the surface.
01:14So what I want to do is start by creating a planar projector, in other words
01:18like imagine projecting UV coordinates from a flat plane to get coordinates for
01:23the side of the tire, so I can map a decal right here.
01:27So that's where I am going to start.
01:28Now I'm going to switch to the Front View, press the 4 key to show the wireframe,
01:34and I want to select the faces just on the side of the tire.
01:37So I'll right-click over the surface, choose Face, and drag a selection over these faces.
01:43It's a little bit too much. I am going to hold the Ctrl key, drag another
01:47selection, so now I just have these selected and that works for me.
01:52So in the Create UVs menu, this is located in the Polygon menu set, Create UVs
01:58> Planar Mapping, open up the options, I want to set this to bounding box.
02:02I'm going to project from the X axis.
02:05So you can see that this is the X axis that's moving along this way, so I want
02:10to project this way on the X axis, so I'll choose that, and I'll choose Project.
02:16I'll switch to the Perspective window and you can see here is the projection
02:20plan, so this is the planar projector.
02:22And if I open up the UV projection window, you can see here are my UV texture
02:27coordinates for the side of the tire.
02:30So, I am going to keep projecting on parts of the surface, so for the moment,
02:33I like to move these out of the way.
02:35So I'll just click on that manipulator and drag it away.
02:39And now I'll just click in the scene just to deselect the surface.
02:45I want to do the other side of the tire, so I'll switch to the Front View again,
02:51right-click over the surface, choose Face and then just drag a selection over
02:55these faces and it's a little bit too much again, so I'll hold the Ctrl key,
02:59deselect those, so that's what I have selected now.
03:02That's what it looks like.
03:03So again, I am going to choose Create UVs > Planar Mapping, again choose
03:09Bounding box of the object to determine the size and X axis and I'll choose Project.
03:17Once again my manipulator shows up and here are my UV coordinates.
03:21I'll right-click over the object and choose Select.
03:24Now you can see so far these are the parts of the surface that have been mapped.
03:30So I am going to move these coordinates out of the way again.
03:34So what I'll do is you'll notice under the Inputs selection for the surface,
03:37I have polyPlanarProj3 and Proj4.
03:41These are the projection nodes.
03:42So if I select polyPlanarProj3, I get this surface.
03:47If I select this one, I get these parts of the surface.
03:51What I can do is with that selected I'll just move this out of the way again.
03:55So I am going to select the object again, I'll choose Face, and I am going to
04:03select all the faces of the object.
04:05So now I have the entire thing selected and now I want to quickly deselect the
04:10parts that have already been mapped.
04:11So in order to do that, I'll right- click in the UV Texture Editor, choose Face
04:16and Ctrl+Drag over the surface. Now you can see that it deselected all the parts
04:21that have already been mapped.
04:22That's just quick way to deselect parts of the object because you can select
04:26components within the UV Texture Editor.
04:28But the next thing I want to do is I am going to switch to a Side view, press
04:32the 4 key to switch to wireframe, I am going to deselect these interior parts of the surface.
04:38So, I'll just hold the Ctrl key and drag out and that deselects the interior
04:42parts of the surface.
04:43So now I just have the outer part of the surface selected.
04:46So these are just sort of selection strategies and of course depending on the
04:50surface that you're working with, they're going to be a little bit different but
04:53you can sort of use these hints to speed up your workflow.
04:55At this point I want to map these UV texture coordinates around the edges and I
05:02think the best way to do that is to create a cylindrical mapping.
05:06So I'll choose Cylindrical Mapping from the Create UVs menu, open up the
05:10Options, there is not a whole lot of options here, so I'll just leave those the
05:14way they are and choose Project.
05:16So you are going to see what's happened is I have a cylindrical projection but
05:20it's not combined with the surface, as it completely wrong orientation, but
05:24that's really easy to fix.
05:26You could go in here and do it numerically but another way to do it is to
05:29click on the manipulator.
05:31Down here at this little edge of the projection icon you see this little T
05:35button. If I click on that, that brings up a manipulator and now I can start
05:39manipulating the projection surface.
05:42What I want to do is I want to rotate it.
05:43So, if you take a look here at the manipulator, I'll zoom out so it's easier to see,
05:47see this circle right here at this part of the handle.
05:50if I click on this, this will bring up the rotation manipulator and now I can
05:54start to rotate this way and then on the Z-axis until it starts to match up and
06:00you can see how the UV coordinates are updating while I rotate it here.
06:04Eventually I want a straight line.
06:05I get a close what I can do is just go in here and for the most part it's
06:09pretty straightforward.
06:10I'll set rotate X to zero and rotate Y and Z both to 90.
06:17And now I have a nice projection that's cylindrical and it ends up looking like
06:21a flat stretched out plane in the UV Texture Editor but that's great because
06:25this could be very easy to paint a texture in Photoshop.
06:29So we are doing pretty good so far. We only get one part of the surface left to do.
06:33I need to drop the manipulator so I'll just click on the blank part of the
06:36scene, you can see those are coordinates so far.
06:38I am going to right-click over the surface, choose Face, select the entire
06:44surface once again. I can quickly deselect the parts that have already been
06:48mapped just by going to the UV Texture Editor, right-click, choose Face, and
06:53then Ctrl+Shift+Drag over all these parts and you can see I am just left
06:57with this in the center.
06:59Once again, I am just going to use a Planar Mapping method, so there we go, and
07:05I have the manipulator and of course we know from experience that if I turn
07:09Rotate Y and Z to 90, I end up with the correct type of surfacing.
07:15Now, if I select the object here, you can see the UV coordinates so far. At the
07:20moment they are kind of overlapping.
07:22So let's take a look at some of the ways that we can make our lives easier in
07:26the UV Texture Editor.
07:27There is a button up here that when I turn this on, this is the Toggle Shaded UV Display,
07:34this shades the different UV shells and UV shells are just parts of the
07:38layout that contain connected UVs and it shades it so it tells me how the UVs are facing.
07:43So, what I want is I want consistent colors.
07:46I want all these surfaces to be blue so that they are all consistent.
07:50So right now I have a blue surface, a red one, a red one and a purple.
07:54The purple is indicating overlapping UVs because I have the inner part of the
07:58tire underneath the outer part of the tire.
08:01So how do I fix this?
08:02Well, one thing I can do is I'll right- click over this part of the UV layout,
08:06I'll choose UV, I'll just drag and select a bunch of these, right-click again
08:12and choose Select Shell. I want to press the W key. I have Grid Snapping turn
08:17on, so I'm going to turn off Grid Snapping.
08:20I'm just going to middle mouse button+ drag this out of the way and there we go.
08:24So how do I make these all consistently the same color?
08:27Well, now that I have this shell selected, I can go to Polygons > Flip.
08:32This reverses the UVs, so now this is blue so I know that this is consistent.
08:37Right-click over this UV shell right here, I am going to select the surface,
08:44Right-click, choose UV.
08:46Now I have them all selected and I'll just choose Flip and now
08:50they're consistent.
08:53Sometimes if you're having trouble selecting a component in here in the UV
08:57Texture Editor it's easy to just go out here and right-click over the surface
09:00and choose Select and then you have the whole surface selected.
09:03The last thing I need to do is make sure that these are all laid out at this
09:07texture coordinate space right here.
09:09The other thing I like to do is make sure that their size is consistent.
09:12So right now this is the UV texture coordinates.
09:15All right if I select this, that corresponds with this part of the surface, but
09:21these are really large and this is very small.
09:23So how do I get these consistent?
09:25I can go back to the Projection nodes that I've set up here and take a look at
09:29the Projection Width and Height, and once again, I just want to make these guys consistent.
09:35So if I set this to 1, I'll select polyPlanarProj4, set this to 1, select
09:43polyCylProj1 node right here, set the Projection Height to 1, and then do the
09:50same thing with polyCylProj2. Set this to 1.
09:55Now they're all consistently the same size.
09:58And the last thing I want to do is just select all the UVs in here and choose
10:04Polygons > Layout and that leaves them out in the grid so that they're optimized in size.
10:14Now, I can select the surface and here are my UV coordinates.
10:17There are a couple of things that I would like to do just as a personal preference
10:23in order to optimize the space.
10:25For example, these UVs right here correspond to the inside of the tire and this
10:33is an area that I am not going to have a whole lot of texture map.
10:36In fact we're not going to see it because it's covered by the hubcap.
10:39So what I want to do is I want to scale this down so that I maximize my texture
10:43space for the other parts of the surface that will have detail.
10:46So I have these UVs selected. I am going to right-click and choose Select
10:51Shell, press the R key to pull up the Scale Manipulator, and just scale these
10:56down, and I'll just move them out of the way and now I have more texture space
11:02that I can devote to the other parts of the surface that will have more texture
11:05coordinates applied to them.
11:06I am going to select all of these UVs, move them over, and maybe scale them up
11:11a little bit, and I'll just select some of these UVs, choose Select Shell, move
11:19these out of the way, and just maybe come up with an arrangement that seems to make sense to me.
11:33Move these over here. I can get these to quickly fit within the UV range just by
11:38selecting all the UVs and choose Normalize,and by doing that Normalize fits
11:43them within the zero to one range here in the UV Texture Coordinate Editor.
11:46So now I have UVs for my surface and I am ready to use these as a guide to
11:53create my texture map.
11:54And so what I can do is I can actually create an image based on these UVs and
11:58open that up in Photoshop.
12:00To do that, I am just going to choose Polygons > UV Snapshot and this brings up
12:06this window and this is going to create an image based on my UVs, which I can
12:10then open up in Photoshop.
12:11So, I am going to set the size of my texture to be 2048. I would like a large
12:16enough size to create some fairly detailed treads here, and I will keep the
12:21other settings at their defaults.
12:23I want to make sure the Image format is set to TIFF.
12:26Sometimes it's set to IFF by default.
12:29I can't really open that up in Photoshop, so I use something like the TIFF
12:32format or something I know that'll easily open in Photoshop, and I want to keep
12:36the other settings at their defaults, and this is where it's going to create the image,
12:40usually in the Images directory of the current project.
12:43If I press OK, it'll create the image. You can see down here in the Script
12:47Editor that it saved the image.
12:50Then the last thing I am going to do is save the file.
12:53So I'll save this scene as map_UV and now I am ready to go paint my texture map.
Collapse this transcript
Using texture maps for color and other shader channels
00:00In this movie, I am going to give you a brief overview of how to work
00:03with texture nodes.
00:04Texture nodes add additional detail to your shader networks, so that you can
00:09extend the capabilities of your shaders and start to make them look more
00:12realistic or add special effects or so on.
00:15So how do you connect a texture node to a mental ray shader?
00:19Well let's take a look here.
00:20I'm going to apply a mia_ shader to the sphere.
00:24So I am going go to the Window > Rendering Editors > Hypershade, and under
00:30mental ray Materials, I'll click on the mia_material-X node to create the node,
00:36and I am going to select the sphere, right-click over the material in the
00:40Hypershade and choose Assign Material to Selection, to know it's assigned.
00:45So, I'll select the sphere, and in the Attribute Editor, click on the Material
00:49node, this is the mia_materialx2 node, and as you know we have various channels
00:56within the shader that control its attributes, for instance the Color channel,
01:01controls the diffuse color of the shader, so I can move the slider back and
01:05forth to make it lighter or darker.
01:07I can click on the color swatch and change the color using the color chooser.
01:12What if I want to have a little more detail to the color?
01:15Well, that's where texture nodes come in.
01:17And to create a texture node, you just need to go to the little checker icon to
01:22the right of the slider, and I will click on this and this opens the Create
01:26Render Node window, and you can see under Maya, we have 2D Textures, 3D
01:31Textures, Environment Textures, and Other Textures, and under mental ray,
01:36we have mental ray specific textures.
01:39So these are all the textures that you can use with mental ray.
01:42You can of course use any of the Maya Textures in your mental ray shading
01:46networks. There is no problem with that.
01:47They should work just fine.
01:49The mental ray textures are specific to mental ray and so they only work when
01:53rendering with mental ray.
01:55So for example, if I click on the Checker texture in the Create Render Node
02:00window, you can see it automatically connects the texture to the shader, which
02:05is then applied to the sphere here.
02:06So you can see how the checkerboard looks.
02:09If I go into the Hypershade and right- click over the Material and choose Graph
02:14Network, you can see that I have the shader, the mia_material_ x2 shader, the
02:20checkerboard and the place to 2D Texture node, which determines how the texture
02:24is applied to the sphere.
02:26And if you notice, there are arrows in between here and if I hold the mouse over
02:32the arrow, you can see how the connection is made.
02:34So the out color of the checker is connected to the mia material diffuse
02:39channel and the outchecker alpha by default is also connected to the mia
02:43material to diffuseA channel.
02:45The specific connections may change depending on the material that we are using.
02:50If I want to break the connection between a checker texture and the shader, I
02:54can select the Arrows and Hypershade and just press the Delete key.
02:58Another way to do is to right-click over the Color channel in the material and
03:02choose Break Connection and that breaks a connection between the texture and the shader.
03:07If I want to delete the texture altogether and select it in the Hypershade and
03:10press Delete key and that removes the texture.
03:13Another thing I like to do is I'm working in a Maya scene and experimenting with
03:17my shaders, you fill find that these nodes start to stack up after while and
03:21everything get fairly cluttered.
03:23So to neaten things up sometimes what I'll do is I will choose Edit > Delete
03:27Unused Nodes, and this deletes all the nodes that aren't currently connected to
03:31shader network and that can make the scene a little bit neater.
03:35I have a shader network already connected with some textures that I'd like to
03:38show you, so I am going to select the sphere and choose Control+H to hide it,
03:43and I have a group called Leaves here. So I am going to select the group in
03:46the outliner and choose Display > Show Selection, and the leaves are just two flat plants.
03:52That's all they are and you can see that I've used some File Texture node, to
03:56create the color of the leafs.
03:58And If do a render here, you can see what they look like.
04:01So when I do a render, you see that I have the leaves and the edges here and
04:07even have a little translucency going, so we can see the shadow cast from
04:11this leaf onto this leaf is visible through the leaves, so that's a little bit
04:14of translucency there.
04:16And I'll show you very quickly how I created that effect, so I select one of the
04:20leaves and click on the leafShader tab in the Attribute Editor and in the
04:25Diffuse section, under the Color channel, if I click on the arrow to the right,
04:30this will show you that I have a very basic leaf color texture applied and this
04:35is just a photograph of a leaf connected to this channel.
04:37Let's take a look real quick in the Hypershade.
04:40I am going to open Window > Rendering Editors Hypershade, and right-click over
04:45the Leaf shader material and choose Graph network and I have three file
04:50textures applied here.
04:52So if I hover over the arrows here, you can see that the outcolor of the leaf
04:56photograph is connected to the Diffuse channel and I also have a second copy of
05:02the file and it is connected to the Refreshing Trans Colors.
05:05So let's take a look. What does that mean?
05:10If this label is not descriptive enough, it's a good idea to look in the
05:14Attribute Editor to get a better idea of what's going on.
05:16What this actually means is this is the translucency color. So the mia_ material
05:21has a Translucency channel which is allowing me to see that shadow.
05:25I am going to open up the Render View.
05:29The Translucency channel is creating this effect, so that I can see the shadow
05:32of this leaf through this other leaf.
05:34And I have just connected a second copy of the File Texture to the
05:40Translucency channel.
05:42As a side note, I just wanted to let you know that in order to get the
05:46Translucency channel to work in the mia_ material, you have to have at least some
05:51amount of transparency.
05:52So transparency needs to be at a value that's above zero.
05:56So I have it up that .759 and I just chose this value through experimentation
06:01and then you can turn on Use Translucency and if you just want a regular
06:05color, you can just choose a color, but in this case I have actually used a File Texture.
06:08The only problem with using translucency is now I have occupied my Transparency
06:14channel with this translucency color but I also want a cutout so that I don't
06:18see the black parts of the plane.
06:19I only see the cutout shape of the leaf.
06:23To do this, I have connected another texture down here to this Cutout Opacity channel.
06:29That's found in the Advanced section of the material.
06:32This is kind of like a little secondary level oftransparency.
06:35So this allows me to add an additional Transparency channel to this network and
06:39this is something that you only find in the mia_material network and this is one
06:43of the reasons why I like this shader so much is because it gives you more
06:46options for creating transparency.
06:48So if look at the Hypershade, what I have is just a very simple black and white
06:53texture that's been applied to the Cutout Opacity.
06:57And if I hover my mouse over the connection between this File Texture and
07:01material, you'll see that is the alpha channel of the image that's been
07:04connected to the Leaf shader network's Cutout Opacity.
07:10This image actually does not have an alpha channel.
07:12It is just a simple black and white image called leafCutout.tif, so there's no alpha channel.
07:18So to get around that within the File Texture node, there is a option
07:22called Alpha Is Luminance.
07:24So this is taken the luminance value,
07:26in other words the bright values of this image, and using that as the alpha, so
07:30if this is clicked off and I do a render, you'll see that I'm losing my cutout
07:35ability. I am just getting all the black part, which is not something I want.
07:39When using a File Texture in the Cutout Opacity, you want to make sure that
07:46Alpha Is Luminance is turned on.
07:49So that's some of the basics of using texture nodes within a shader network,
07:52they can certainly add a lot of detail to your shaders making your objects look
07:56more realistic and even a simple plane could be turned into a leaf.
Collapse this transcript
Applying and projecting 2D procedural texture nodes
00:00In this movie we're going to take a look at how you can add a little bit of
00:03detail to your shaders using the 2D textural nodes.
00:06In this case I have my teapot set up to texture.
00:09So I'll go to the Windows > Rendering Editors > Hypershade, and under mental ray,
00:15Materials I'll click on the mia_material _x node, and one way to apply a shader
00:23to an object is just to middle mouse button+drag it on top of the object.
00:28That applies the shader.
00:30So, I'll select the shader in the Hypershade and open up its Attribute Editor,
00:34and under Presets I'm going to choose the Copper preset, so I'm clicking on
00:39the Presets button, choosing Copper and then Replace, and this has a nice
00:43little Copper preset.
00:45So, let's do a render and see how that looks.
00:47Looks very shiny and new.
00:50What I like to do is maybe add a little bit of variation to the reflectivity so
00:54it looks a little bit less brand-new.
00:55I can go to the Attribute Editor for the mia_material_x shader and down under
01:01Reflectivity, I'm going to click on the checker box.
01:06This will open up the Create Render Node and under 2D Textures, I'm going to
01:10choose Fractal and it supplies a Fractal procedural node to the Reflectivity
01:16channel of the copper pot.
01:18So if I go to the Hypershade, choose the material and select Graph > Input and
01:24Output Connections, you'll see I have that shader here and then if I hold the
01:27mouse over the arrow that connects the Fractal texture to the shader you can
01:30see that the outAlpha of the Fractal texture, the alpha channel, is connected to the Reflectivity.
01:36So, I'm going to select the Fractal texture and under Color Balance you can see
01:42that Alpha Is Luminance needs to be checked, so that the Luminance value is
01:47connected to the Reflectivity channel, and I'll do a render.
01:51Now you can see how by doing that I've got a little bit of dirt going on here.
01:56It's a little bit extreme at this point and I like to adjust the size of it so
02:00it doesn't look quite like this.
02:03So I'll store this render, go into the Fractal Node, and this is called a
02:07Procedural Node because unlike a file texture which is just essentially a
02:11photographic image applied to a channel, you change the look of the texture by
02:16adjusting the sliders, hence the name procedural.
02:19So, what I can do is I can tone it down a bit by bringing the amplitude down and
02:23you can see that little preview swatch here.
02:26It's getting a little bit less extreme.
02:28I'll raise the Threshold, so this brightens the overall look of the image just a
02:33little bit, and then to change the size of the fractal pattern on here I can
02:38start to play with the Ratio and the Frequency Ratio and see how we can add a
02:43bit more detail to it.
02:45I'll also play with the Levels just a little bit.
02:55And the Bias slider, a negative value is just going to make it almost invisible.
02:58So I'll put it to about a Bias of -2.83.
03:01I'm going to open up the Render View, select a region here in this highlight and
03:09choose Render Region.
03:10You can see now this is what I get.
03:11Let's render the whole thing.
03:13There you can see it's adding a little bit of dirtiness to the reflection
03:17there, so it's breaking up the highlight, making it look a little bit less
03:21brand-new or little bit less CG.
03:25When I'm designing a shader what I'll do is I'll start to add the texture nodes
03:29of various types 2D texture nodes and so on and so forth to several of these
03:33channels and that will start to break up the overall look of it and start to
03:36make it look more realistic.
03:38That's the basic idea behind the procedural nodes.
03:40Some of the other nodes include Bulge, Cloth, Fractal, Mountain, Noise.
03:46Noise is like another version of the Fractal node.
03:49So experiment using the various 2D texture nodes within your shader networks and
03:53see how you can start to expand the realism of your surfaces by applying these
03:57nodes to different channels.
Collapse this transcript
Applying 3D procedural texture nodes
00:00The 3D textures found in the Hypershade are similar to the 2D texture node.
00:05These are more additional procedural nodes that you can apply to the channels of
00:09your shader networks.
00:11The main difference is how they are mapped to the surface.
00:14By default 2D texture nodes, whether it's a file texture node or Fractal or Ramp
00:19or so on and so forth, use the UV texture coordinates to map the pattern created
00:24by the node to the surface.
00:263D texture node uses a special 3D Placement node in order to map the pattern
00:32to the surface, and this can help you get around some of the drawbacks of using
00:36UVs to apply procedural texture nodes.
00:38So for this copper pot shader, I have a 2D Fractal texture node applied to
00:43the Reflectivity channel, and for the most part this looks okay, because you
00:48don't see any of the problems that can be caused by doing this, because it is fairly subtle.
00:52So for example, the Fractal pattern seen on the surface of the pot looks fairly
00:58even and I think part of that is just because we're getting little bit lucky
01:01with the way the UV texture coordinates are mapped.
01:03So let me show you where this might cause a problem.
01:06I am going to the select the tea ot and hide it for a moment, and I'm going to
01:11choose Create > Polygon Primitives > Cube, and then drag on the surface to create a cube.
01:16I am going to make this cube a little bit rounder by pressing the 3 button so
01:25now we see a smooth mesh preview and to make this a little bit easier to see,
01:31I'm going to apply Lambert material to the cube and then in the Lambert
01:37material of Attribute Editors, under Color, I'll click on the color swatch
01:41and choose Fractal.
01:42I am going to choose high quality renderings, so you can clearly see the pattern.
01:46But you can see the problem right here. The UV seems on the object are very
01:51clearly visible, because of the way it's been mapped to the surface.
01:55If I select the object and choose Window > UV Texture Editor, I am going to
01:59turn off the display.
02:01These are the UVs of the rounded cube.
02:04If I click on the little face icon that shows the texture and you can see how
02:08the texture is just mapped as a 2D texture, and so that's why we end up seeing
02:13these seams here in UVs.
02:14So 3D Textures offer a way around this. So what I'll do is I'm going to select
02:20the Lambert that I created and right click over it and choose Graph Network, so
02:24now we do see this network.
02:25I am going to click on the Show bottom tabs only, so I can zoom in on the
02:29work area of Hypershade.
02:31And in the create area of the Hypershade, I am going to click 3D Textures and
02:37I'm going to choose Solid Fractal.
02:39So this is another type of fractal texture that's very similar to the 2D Fractal
02:44texture, but this is created from the 3D Texture section.
02:47So now what I am going to do is in the Hypershade on middle mouse button, drag
02:52the Solid Fractal texture on top of Lambert and choose Color, and that's to
02:57break the connection from the Fractal Texture and replace it with a connection
03:00to the Solid Fractal texture.
03:02And now if I take a look in the window, you can see I can't see the seams
03:06anymore. They are not obvious.
03:09The reason is, because I have now what's known as a 3D placement nodes.
03:13You see this place3Dtexture node.
03:15This is what's mapping the Fractal texture to the Color channel, as opposed to
03:19the place2Dtexture node, which was mapping the 2D texture to the Color node.
03:25So in the outliner, I can actually select the place3Dtexture node, I am going
03:30to press the 4 key, so that we can clearly see it in the Wireframe view, and you
03:34can see I have this little icon here representing the cubicle mapping.
03:38I am going to press the 6 key, and notice what happens when I start to move
03:42this place3Dtexture node around. You can actually see the texture moving on the surface.
03:48I can scale it up, rotate it, and so on and so forth.
03:58So this gets around the fact that I can see the UV seams on the surface, but
04:02there is one other problem that you have to keep in mind when using 3D Ttxture
04:06nodes, and that is, if I start to move the object around, the texture node is
04:11stationary, so you can actually see the object swimming through the texture
04:14which can destroy the realism if the surface is actually animated.
04:18So there are a couple of techniques you can use to get around this.
04:21For one thing you can actually parent the 3D texture node to the object itself.
04:26So I am just middle mouse button+ dragging the place3Dtexture node on top of
04:30the cube here, in the outliner.
04:32And now as I expand the cube, you can see the texture node is actually parented
04:37to the surface, so the surface is moving around.
04:40Now I don't have that problem, however, what if I actually have the surface animated?
04:45So I'll choose a vertex here in the surface and start to move it around.
04:48So what if the objects are actually deforming?
04:50Well, then I still have the same problem.
04:52That texture is obviously moving around on the surface, which destroys the realism.
04:58So I'm going to back up, just hit Undo a few times, until that place3Dtexture
05:04Node is no longer parented to the surface.
05:07To get around this problem, there's a way to bake the texture onto the
05:11surface, so that you no longer encounter that problem with these surfaces as
05:14it is actually animated.
05:16So I'll select the surface, I am going to go to the Rendering menu set, and
05:21under Texturing, I am going to select Create Texture Reference Object.
05:26When I do this, this creates a secondary object, which is hidden from view, but
05:30it's a reference object that Maya uses, so that it can map the 3D texture to the object.
05:35And so now if I start to move the object around, you see I don't have the same problem.
05:38So you just have to remember that when you're using 3D textures, remember
05:46to create that 3D texture reference object, if the object itself is going to be animated.
05:51There are a number of 3D texture nodes including Granites, Leather, Marble,
05:56Solid Fractal, Stucco, Volume Noise. I am a big fan of the Volume Noise texture.
06:01It's one of my favorites to use, because it has an awful lot of options.
06:05It's similar to the Fractal in that it creates a procedural noise pattern.
06:08What I do is, I just clicked on the Volume Noise button to create the Volume
06:13Noise texture, and on a middle mouse button drag it over the Lambert shader and
06:17choose Color to apply to the Color channel.
06:20And I'll just show you some of the reasons that I like it.
06:22Like the Fractal Noise texture you have, settings like the Threshold, the
06:27Amplitude, you can change the Frequencies and Ratio. Frequency Ratio.
06:32Frequency, you can increase this or decrease it to change the size of the pattern.
06:37But one of these settings that I like is down here under Noise Type.
06:40you can choose various different types of noise for this texture, so Perlin
06:45Noise, Billow, Volume, Wispy, SpaceTime and so on and so forth.
06:50And these can be used, depending which one you are using, you can adjust the
06:52settings and custom design the noise. You see a few more options when you are
06:57using the Fractal textures, so these are some of reasons that I like it.
Collapse this transcript
Using ramp textures
00:00In this movie, I'm going to show you how you can use a ramp texture to increase
00:03the visual interest of the paint job applied to this car model.
00:07So currently, I have just a purple color applied to the car model itself.
00:11You can see the variation in color, because this is part of the car material.
00:15So we have two different colors for the base color, and also the lit color.
00:19The base color is this darker purple.
00:21the lit color is this brighter purple.
00:23What I like to do is I'd like to add in gradients that we have more of an
00:26interesting paint job.
00:27So it looks like we have darker colors moving from the bottom to the top, as
00:31well as the variation in the carPaint material itself.
00:35Looks like whoever created this paint job spent some time on it.
00:38So I'm going to minimize the Render view and I have the car selected.
00:43The carPaint material is here in the Attribute Editor.
00:46I want to add a ramp to the Base Color to create this effect.
00:49So I'll click on the Texture icon to the right of the Base Color slider and this
00:53opens up the Create Render Node palette.
00:55Under 2D Textures, I'll choose Ramp.
00:58I'll see the car goes black because I no longer have the display of the texture
01:03in the Perspective View.
01:04But I can fix this just by selecting the carPaint material.
01:08In the Attribute Editor, I can go down to the bottom.
01:10Under Hardware Texturing, I'll just choose Base Color.
01:14Now I can see that the ramp color is applied to the model.
01:17There is a bit of a problem though, because you can see how the ramp texture has
01:21been applied to this model in such a way so that it's using the UV texture
01:26coordinates to apply a 2D ramp to a 3D object.
01:29I'll select the car body, and open up the UV Texture Editor.
01:34You can see the problem here.
01:35Here are the UV texture coordinates.
01:37So it's like the model has been flattened.
01:39We have the ramp going from the red values to the blue values.
01:43This is just a flat 2D texture.
01:44So it's just being projected down on top of these UVs.
01:48So that means that we can easily see the UV scenes.
01:52There is no 3D ramp texture in here.
01:54So we have to find another way to map this texture to the body.
01:58To do that, we'll just use a projection style ramp as opposed to the normal
02:02UV style projection.
02:05So what I am going to do is I'll open up the Hypershade in Windows > Rendering
02:09Editors > Hypershade, and I'll Graph Material on Selected Objects.
02:16Here is the shader network.
02:17You can see the ramp is connected to the base color of the shader.
02:21What I'm going to do is I'll go into the Create menu and choose 2D Textures.
02:26Down here at the bottom, I'll switch from 2D Normal to 2D Projection.
02:30So this changes the way that the 2D Textures are mapped to the model.
02:34So now I'll choose 2D Textures > Ramp.
02:38This creates a new ramp.
02:40You can see that those are up here.
02:42So let me just move these out of the way, so we can actually see what's going on.
02:46So you can see as opposed to the original ramp that I created, this one has a few extra nodes.
02:53So the original ramp I have is to simply place 2D Texture node connected to
02:57the ramp, and the ramp is connected to the base color of the carPaint material.
03:01In this case, I have a ramp node, place2DTexture node, a projection node, and
03:07place3dTexture node.
03:10This will give me more options for mapping a 2D texture to the 3D object.
03:14So what I'll do is I need to connect the projection node to the base color, not
03:18the ramp, but the projection node.
03:20To do this, I'll just middle-mouse button+drag the projection node over the
03:25carPaint material, and choose base_color.
03:29This replaces the connection.
03:31So now I can see the original ramp is no longer connected and the projection
03:35node now is connected to the shader.
03:39So if I take a look in the Perspective View, it doesn't look like much has changed.
03:42That's just because Maya hasn't done a very good job of updating the color.
03:47So I'll select the carPaint material.
03:50Again, in the Hardware Texturing channel, I'll set the Texture channel to Base Color.
03:54Now it updates.
03:55What I'd like to do now is adjust the projection node itself, so that it's
03:59mapped on the car from the side.
04:01Right now, it's mapped from the front to the back.
04:04So I'm going to click on the 4 key on the keyboard, so that I can see wireframe.
04:07I am going to select the place3dTexture node, so now I can see the actual
04:12projection node here.
04:13I'll press W to switch to Move mode.
04:16Let's just drag this out, so I can see it a little bit easier.
04:20In the Attribute Editor for the place3dTxture node, I'll set the Y channel
04:25of the Rotate to 90.
04:26So now this is projecting from the side.
04:31Then finally what I'd like to do is have this texture here mapped to the car,
04:36based on the size of the car.
04:37So I'll select the projection node and choose Fit To Bounding Box or Fit To BBox.
04:42This just fits the projection nodes to the side of the bounding box of the car.
04:47So now that your ramp is no longer using the UVs to map to the car. Instead it's
04:53using this projection node.
04:55So in this case, I'll choose a view here, maybe something in the back, so we can
05:00do a render, and see how it looks. So there we go.
05:04We can see the ramp is now mapped correctly to the car.
05:07This purple color is just coming from the lit color of the material.
05:10It's not part of the ramp.
05:11We can see the ramp is covering with the car evenly.
05:14There is no difference in the door, and the other parts of the car.
05:16So at this point, we can start to adjust the ramp itself.
05:20So I'm going to select the ramp texture.
05:23I'm going to change this red color to very dark purple. Maybe even a dark bluish purple.
05:33I'll select the green color just by clicking on this little dot here.
05:36I'm going to select the dark purple from the Color History and then just move
05:41the color slider, changing it just a little bit.
05:44Then I'll select the color on the top. Do the same thing.
05:49I'll select that lighter purple from the Color History.
05:54Move this sort of the pink range.
05:59I can actually move the color markers on the ramp a little bit to tighten it up.
06:03Let's do a render and see how that looks.
06:09We'll get a nice view here. So there we go.
06:11It looks pretty good.
06:14I think the colors could be a little bit more obvious.
06:16So I'll store the render in the Render View window.
06:18I'm going to choose the dark purple.
06:21I make it much darker, pulling up a little bit.
06:24There is no reason to be subtle when working with hot rods.
06:29This red at the top is a little bit warm.
06:31So I'm going to bring this back to the cooler side and make it a little bit
06:34lighter, and bring this down just to tighten it up a little bit.
06:39So it's obvious that there really is a painted gradient on here.
06:42It's not just something that's part of the carPaint.
06:45A couple of things I like to notify.
06:46I wanted to change the direction of the ramp.
06:49I can try either changing this from a V ramp to a U ramp.
06:52So that way, the dark colors would start here at the front and move back towards
06:56the back the lighter color.
06:58Another option, of course, would be to select the place3dTexture node and
07:02change its rotation.
07:03I could Rotate it 90 degrees and see, but I like the way it is right here.
07:08So those are two options.
07:09Another thing to keep in mind, of course, is that this car is going to be driving around.
07:13We certainly don't want it to drive away from the projection node.
07:16So you can either parent the place3dTexture node into the car group so that if
07:20the car moves around the node moves with it, or you can go to the Texturing
07:25window and create a Texture Reference Object.
07:28Either way, you want to make sure the projection node doesn't move away from the car.
07:31It looks kind of strange.
07:32So, let me do one last render. There we go.
07:36This is starting to look a little bit better, a little bit more tweaking.
07:38I think I can get it exactly the way I want.
07:40Now that I solve all the major problems of projecting the ramp onto the surface.
07:44You can see that I can just adjust the colors until I get exactly what I want.
07:48So here is one last render that just shows after tweaking the colors in the ramp
07:52a little bit, just changing their position in the colors slightly. I think I've
07:56got something closer to what I want.
07:57Now I think this car is ready to hit the road.
08:01Here is the final ramp.
08:02So I've just moved this up a little bit,
08:04increased the saturation of the color, and just rearranged the position of the
08:08colors in the ramp, so it looks a little bit better.
08:10There we go.
Collapse this transcript
Setting up utility nodes
00:00In this movie, I'm going to show you how you can use some of the utility nodes
00:03to affect the shader networks that you apply to your surfaces.
00:07So I have a teapot here.
00:08I'm going to select this teapot, and just create a blinn material by clicking
00:12on the Blinn Material in the Rendering shelf, just applies the Blinn material to the teapot.
00:17Now I'll open up the Hypershade by going to Windows > Rendering Editors > Hypershade.
00:21I'm going to right-click and choose Graph Materials on Selected.
00:26Here is my blinn texture.
00:28The Utilities nodes are down here under the Maya section.
00:31There is a whole bunch of them.
00:32We can use them for a variety of effects.
00:34I'm going to do just something fairly simple.
00:37What I want to do is I'm going to use a Sampler Info node to change the way that
00:43colors are applied to the surface of this object.
00:46So I'll go back up to Maya 2D Texture nodes and I want to just create a ramp texture.
00:52So I'll zoom out in the Hypershade, you can see the ramp and the samplerInfo
00:55node and the blinn shader.
00:56So I'm going to middle mouse button+ drag the ramp shader on top of the blinn
01:01node and choose Color.
01:02That connects the color of the ramp to the color of the blinn material.
01:05We can see how this looks in our teapot.
01:08Now the problem is, the ramp is being applied based on the UV coordinates of the teapot.
01:12So if I select the teapot and choose UV Texture Editor, this is what I got.
01:17The red areas are mapped down here and they're being spread across the
01:21flattened UV coordinates, which means that I have very visible seams in the
01:25different parts of the teapot.
01:26So what I can do is I can override the way the ramp is placed on the blinn
01:31texture using the samplerInfo node.
01:33So I'm going to middle mouse button+ drag the samplerInfo node on top of the
01:37ramp and choose Other.
01:39This opens up the Connection Editor.
01:40I'm gong to connect the facingRatio here at the bottom of the samplerInfo node
01:45attributes in the connection area editor to the v coordinates of the ramp.
01:51So I want to expand UV Coordinates and choose v Coordinates.
01:55You can see now there is a connection being made.
01:57If I hover over it, you can see samplerInfo1.facingRatio is connected
02:01to ramp1.vCoordinates.
02:04So I'll close the Connection Editor.
02:06We'll do a render and see how this works.
02:08So you can see the blue areas are the areas that face the camera and the red
02:14areas are the parts that face away.
02:16So this is creating this kind of effect.
02:19You can use this kind of technique for a number of things.
02:21For instance, if you wanted to create something like an x-ray shade or
02:24something like you can see in a scanning electron microscope, what you can do
02:28is I'll disconnect the ramp from the color channel just by selecting this
02:31connection and pressing Delete.
02:33I'll middle mouse button+drag the ramp over the blinn texture, and
02:37choose incandescence.
02:39So this is sort of the brightness value, or the glowing value of the shader.
02:43I'm going to pull the Diffuse channel all the way down to 0.
02:46So we'll only see the incandescence colors when I do a render.
02:49The other thing I'm going to do is I'm going to pull the Reflectivity all the way down to 0.
02:53So when I do a render, we get this kind of look.
03:00Now I can adjust the ramp.
03:02We know that the red color at the bottom of the ramp is matched to the edges
03:05that face away from the camera.
03:07So I want to turn that to very light blue.
03:11I'm going to delete the green color by clicking on the box here, the middle of
03:16the ramp to get rid of the green color.
03:17I'll select the blue color at the top, and set the color all the way to black,
03:23and maybe pull this down a little bit.
03:25Now when I do a render, we get this kind of sort of x-ray shading look to it.
03:31If I wanted to, I could set the Transparency fairly high.
03:37So it's going to look at kind of like a little x-ray here.
03:41Kind of an interesting effect, sort of the classic x-ray look that you can
03:44apply to your objects.
03:46That's done with some basic utility nodes.
03:49What I want to show you is how you can also use a similar technique to create a
03:53fresnel type reflection in the blinn texture.
03:56So I'm going to disconnect the ramp from the incandescence channel.
04:00Then I'm going to increase the Diffuse settings, so that we can see the diffuse color.
04:07I'm going to set the Transparency back to 0.
04:08I'm going to bring the Specular Color up to white, and lower the Eccentricity to
04:15have a tighter highlight there.
04:16Now what I'm going to do is I'll go to the Utilities section in Hypershade and
04:20I'm going to click on Remap Value.
04:24So this node is similar to the ramp.
04:26It has a graph that you can use to change the way values are mapped over the
04:30surface of the object, and also a color ramp, which is similar to the Ramp node.
04:35It's a horizontal as opposed to vertical node.
04:37Now, what I want to do is I'm going to connect the samplerInfo node to
04:41the remapValue node.
04:43So I'll just Middle Mouse Button+drag samplerInfo over the remapValue in the
04:47Hypershade and I'm going to choose Other.
04:49Again, I'm going to choose facingRatio.
04:52This time I'm going to select inputValue.
04:54Once I've done that, I'm going to middle mouse button+Drag remapValue on top
05:01of the blinn texture.
05:02I'll choose Other again to pull up the Connection Editor.
05:05I'm going to choose outValue here on the left. So this is the remapValue node right here.
05:11This is the outValue attribute of the remapValue node.
05:16On the right, I'm going to select Reflectivity, which is down here towards the bottom.
05:23Let's do a render.
05:24It's not terribly obvious what's going on right now, but let's take a look at
05:29how we can adjust the ramp to make more of that fresnel type reflection.
05:33So I'll minimize this and I'm going to go here and just start to edit the ramp.
05:39This side of the graph corresponds to the parts of the surface that face away
05:43from the camera, and this part of the graph corresponds to the parts of the
05:46surface that are facing the camera.
05:48So I'm going to make this kind of a stream here and do another render.
05:52Now you can see how we're getting a fresnel type reflection.
05:55The edge is here that are facing away the camera are more reflective than the
05:59parts that are facing the camera.
06:02I can pull down the Diffuse value to make that more obvious and increase
06:11Specular Rolloff and that'll make the reflections more intense, then
06:15create another render. There we go.
06:17Slightly more realistic reflections applied to the surface of the teapot.
06:21That's the idea behind utility nodes.
06:23They're meant to help you expand the capabilities of your shader networks.
Collapse this transcript
Using file texture nodes
00:00In this movie, we're going to talk about how you can use file textures to make
00:03your shader networks look even more realistic and add more detail.
00:07The idea is, is that have two copies of this old man character and you can see
00:11that they both have a subsurface scattering shader applied to them.
00:14But the one on the right has much less detail and does not look very realistic,
00:18kind of looks more like a plastic and the one on the left is starting to look
00:22more and more realistic.
00:23So the only real difference between the shader applied to this guy and the
00:28shader applied to this guy is that I've actually started to incorporate file
00:32textures into the Shading node.
00:34So let's take a look here at how we can do something like this.
00:37So I am going to take the less detailed version of the model.
00:42I'll go to Window > Rendering Editors > Hypershade and I want to expand the work area.
00:50I'll right-click and choose Graph Materials on Selected Surfaces and then we can
00:56open up the Fast Skin shader here in the Attribute Editor.
01:00And for the moment I have decent settings setup, so I've already set my Back
01:05Scatter Radius and Back Scatter Weight and same with Subdermal Scatter Colors.
01:11So I've got some basic ranges for each part of the Subsurface Scattering shader network.
01:16But you can see right now I just have flat colors in here, so just a dark red
01:20for Back Scattering, sort of a yellowish color for Subdermal, and Epidermal I
01:25have pinkish color and Diffuse is also somewhat pinkish.
01:28For Specularity I have a dull grayish blue in Primary Specular Color and a
01:34lighter white in the Secondary Specular Color.
01:38So the secret to get this to look more realistic is to start using file textures.
01:43In other words paint by hand a texture that can have things like veins in it
01:47and areas of different colors and so on and so forth.
01:50To add a file texture to something like the back scattering color I would just
01:54click on the Texture Node here to the right of the slider and choose File and
02:00this would bring up the File node.
02:03And then I can apply one of the textures I've created by clicking on the
02:06folder next to Image Name and in the Source Images directory I have an image
02:12called hatter_backscatter.
02:13It's called hatter because originally this character is going to be the Mad Hatter.
02:18There's no technical reason for using that name.
02:20So if I take a look at this texture, I am going to right-click on it and choose
02:24Test Texture and this will open up the texture actually in the Render view
02:28window, which I need to expand here. Now we can see the actual texture.
02:32So you can see that this texture rather than being a flat reddish color
02:35actually has a lot of variation in color. These correspond like the colors on the face.
02:40So you can see there is sort of a purplish color along the beard line. You can
02:43see where the lips are, the nose, the eyes and the ear and so forth.
02:48It has variation, little bits of white here to break up the color to make it
02:51look a bit more interesting.
02:53So now if I render the scene, it's still a bit strange because right now
02:57I only have the one texture applied but I'll render it, and just to see how it looks.
03:01We can see how the things are starting to change.
03:06It's subtle, but you can see especially in this ear I am starting to get some detail.
03:10You can start to see some of the veins in there.
03:12There is more of a reddish color. There is more variation.
03:15It's subtle because of course it's in the Back Scattering layer and the other
03:18layers are using just simple colors.
03:21What I can do to make this more obvious is I'll select the shader and set the
03:25weights of the other channels to zero.
03:27So Subdermal Scatter Weight I am turning to 0, Epidermal Scattering Weight I am
03:31turning to 0, Diffuse Weight I am turning to 0, and I am going to select an area
03:36here just to render that area, just so you can see it.
03:39So you can see the texture map is now affecting just the Back Scattering.
03:44If I selected this version of the old man, right-click, and choose Graph
03:51Materials on Selected you can see I've actually got a total of six different
03:56texture maps plugged into the various channels.
03:59I have texture map for the Back Scattering, a texture map for Subdermal, a texture
04:06map for Epidermal, a texture map for Diffuse and I have two separate specular
04:12maps that are meant to break up the Specular highlights on the surface and
04:15using texture maps in the Specular channels will really start to sell the look of human skin.
04:20So now you see that using texture maps in the Subsurface Scattering network or
04:24actually any shading network will really improve the realism, it will take it
04:28beyond sort of looking CG and start to bring it into the world of reality.
04:31But the question becomes how did I make these texture maps?
04:34Well, the answer that is simple. A lot of hard work.
04:38There are a number of ways to approach creating texture maps.
04:41You can paint texture maps in Photoshop, which is a long have been the way that
04:46texture artists have worked.
04:48You can also use other programs that allow you to paint it directly on the 3D
04:52model, your various colors.
04:53So for instance, I've personally used Zbrush to create these texture maps by
04:58painting them directly on the surface of the model.
05:00That way I don't have to worry about trying to figure how to paint in 3D in a
05:04program like Photoshop.
05:06Other programs include Mudbox, that will also give you this capability.
05:10But if you're going to use something like Photoshop you don't have access to these programs.
05:13I want to give you some hints as to how you can get a texture started in Photoshop.
05:17So what can do is, I've actually matched the UV coordinates for these objects
05:22and that's the first thing you need is UV texture coordinates.
05:24So I'll select this old man.
05:26It doesn't matter. I could select either one.
05:28Choose Window > UV Texture Editor and currently I have a group selected.
05:35So you're seeing the UVs for the man and also his teeth.
05:38So let me expand the old man and just select the old man shape here.
05:44So I am not selecting the teeth.
05:46So now you can see the UV texture coordinates for just old man.
05:49So you can see where his eyes are, his nose, his lips, the ears and so on and so forth.
05:58So when I have the UV texture coordinates mapped out, what I can do is I can go
06:01to Polygons menu and do UV Snapshot and say I want to make this texture
06:072048x2048. That determines the size.
06:11I am going to choose the TIFF format so I can open it up in Photoshop and then
06:15I'll choose OK and this is going to save it to the Images directory.
06:18So I'll just call this OldManoutUV. Choose OK.
06:25That will save the UV texture coordinates as an image file.
06:29And now I can go into Photoshop and in the images directory of the current
06:35project, the Exercise Files project, I'll choose OldManoutUV.
06:43Now I can see here are the UV texture coordinates and if I am going to paint
06:47something like this in Photoshop, what I'll do is I'll make a copy of the
06:52background layer, I'll create a new layer above the background layer, and fill
06:57this with just a simple color, like if I am going to the back scattering layer I
07:01might do a dark red and I will set the Background copy to Screen.
07:07So now I can see the UV texture coordinates.
07:10And now on this dark layer I'll start to paint the variations of color
07:14corresponding to the different parts of the face.
07:17And I'll show you what these look like in Photoshop, each of these textures, so
07:20you get a good idea of how they work.
07:23So in the sourceimages directory I'll open the back scattering, epidermal,
07:27subdermal, diffuse, and the two specular maps.
07:35So looking at the back scattering, now if you can see I have variations of colors in here.
07:41So this is meant to represent you know muscle, the yellow parts, or you can
07:44just see a little bit of bone, blood vessels underneath the skin, and let me go to the subdermal.
07:50So now you can see in the subdermal layer I have veins and age spots, a
07:55little bit more bone color, some red for their blood vessels again,
07:59definitely lot of veins in the ear.
08:01And then if I look at the epidermal, this is where I start to painting
08:05things like freckles, the lip color, more variations in skin with lighter colors for sure.
08:11And then the diffuse layer has a much lighter version of the epidermal layer and
08:15that's where I also paint a lot more freckles and that kind of things, so this
08:17is the color of the skin.
08:19And then for the specular layers, they are essentially just grayscale textures
08:24and I've added a lot of variation here and this helps to subtly break up the
08:29look of the specular highlights across the surface.
08:32So you can see the dark areas are the parts where it going to be less
08:35reflective, we are going to see fewer specular highlights, and the lighter areas
08:40are going to be brighter areas of the specular highlights.
08:42And then I have a second spec map and this is for the shiny quality and I
08:47just have a little bit on here, so like in the oily parts of the skin, like
08:51within the ears and on the nose.
08:52But that's really the basic idea is to start to use texture maps so that your
08:58shader networks, rather than looking like plastic or just flat materials or
09:02metals and things like that, you can start to use texture maps to break up the
09:06various channels and give them much more realism to your shading networks.
09:11So you can think of other ways that this might be used.
09:13For instance, if you're going to paint like a rusted metal you might want to use
09:17photographs and use them in your file textures to create the look of a rusted
09:22metal spots and that kind of thing.
09:23You might want to create a separate specular layer that has different shiny
09:27parts and duller parts.
09:28You know, on a mechanical object may be the corners are slightly duller than
09:32other parts because they're exposed to wear and tear.
09:35But that's the basic idea.
09:36So the secret is to use file textures to add detail to your shading networks.
Collapse this transcript
4. mental ray Texture Nodes
Applying the turbulence texture
00:00In this movie we're going to take a look at some techniques for using the mental
00:04ray turbulence texture.
00:06So this is a special mental ray texture as opposed to the Maya textures and let
00:10me show you where you can find this node.
00:12Go to Window > Rendering Editors > Hypershade and as you know many of the Maya
00:17textures are found in the Maya section,
00:192D and 3D Textures, but there are additional textures found here under mental ray.
00:24So I'll click on the Textures heading here and you can see some of these
00:28textures. There's quite a few, but I just want to use the turbulence texture just
00:33to show you how the set up between Maya textures and mental textures is a
00:37little bit different and the turbulence texture is a good way to point out some
00:39of those differences.
00:41So, I will create the texture just by clicking on it. You can see it right here
00:45in the Work Area, and I'm going to create mia_material for the teapot, so I'll
00:50Go to mental ray > Materials. I'll use mia_material_x.
00:55Just go to middle mouse button and drag this over the teapot to connect it, and
01:02there you can see it's connected now, and let's start by connecting the texture
01:07to one of the attributes here.
01:09Now, the output of this texture is a single channel as opposed to a vector.
01:14So, for example, many textures such as ramp or any textures that output a color
01:20use a vector, an RGB value, but this texture uses a single one so it's going to be
01:24connected to the channels of the shader that also use a single value.
01:29So, that would be channels just like diffuse Weight, Reflectivity, Glossiness,
01:35Transparency, and so on and so forth.
01:38So let's take a look at how we can connect this.
01:40I'm just going to middle mouse button the mib_texture_turbulence node on top of
01:44the mia_material node and I'll choose Other from the pop-up menu and this will
01:48bring up the Connection Editor.
01:50So here we can see the outputs of the turbulence node right here on the left.
01:56So I want to choose outValue. So this is the output.
01:59You notice when I do this that some of the channels on the mia_material become
02:03highlighted in bold lettering and some become grayed out. So this is giving
02:06you an indication of which attributes will connect to the outValue attribute
02:12of the turbulence node.
02:13So, if it's grayed out, you can't make a direct connection.
02:16And some cases you can expand like the diffuse and connect the out channel to
02:21the R, G, or B value of the diffuse channel.
02:24What I'm going to do is I'm just going to connect this to the diffuse_weight, so
02:28this controls the strength of the Diffuse value.
02:32So, if I have a diffuse color such as this light blue, the Weight is going to
02:37control how much of that diffuse when clor comes through in the final shader,
02:41and you notice right now it doesn't look like much is happening.
02:44In fact if I do a render, the first question you're going to ask is why doesn't
02:48it look very turbulent?
02:49I have the turbulence texture connected to the diffuse_weight but I don't see
02:52any turbulence here on the shader itself, and if I select the turbulence node
02:58and start to mess with these settings, I just see overall light and dark values
03:04changing but it doesn't seem to be doing much.
03:07Well the reason it's not doing much is because this is a 3D texture but it
03:11doesn't have any 3D coordinates plugged in yet.
03:14So we need to make another connection here so that the turbulence texture
03:18understands how to map the turbulence values to the surface.
03:22So this is a little bit of an extra setup.
03:24A lot of times when you use Maya textures, the 3D Texture node is hooked up
03:29automatically but this is not so with a lot of the mental ray textures.
03:32So, what I want to do to create this node. So go down under mental ray and again
03:37under Textures I'm going to click on the mib_texture_vector node, and this
03:44creates a 3D Texture placement node, and now I'll select the
03:48mib_texture_turbulence node and open up its Attribute Editor and what I want to
03:54do is I want to connect this to the coordinate in that section right here.
03:57So I could just middle mouse button drag this all the way from the Hypershade
04:01on top of the coordinate input on the texture node and now you can see we have turbulence.
04:07So now we are in business and in this point it's just a matter of adjusting the
04:12turbulence to get some kind of pattern.
04:14So if I render now, we'll see that we have turbulence on the surface.
04:20We need to make some adjustments here to the node to get something a little
04:23bit more interesting.
04:25Generally speaking when I'm working with something like a noise texture,
04:29the best way to figure it out is just to start to fool around with the values and
04:32see what you come up with.
04:33For instance I'll increase the iterations and so we'll start to get more of a
04:38noise pattern going there and this is the kind of effect that we're getting
04:43now. So we can use this to create some interesting effects.
04:47You increase the Spacing a little bit, something that looks more like a cloud,
04:51and you can use this texture just as an alternative to some of the typical Maya
04:55noise and Cloud and Brownian textures.
04:58It's just another alternative for you to use and create some interesting noise patterns.
05:02What's kind of fun to do is to actually layer some of these textures together.
05:06So, I'm going to create a second turbulence texture by clicking on the
05:10mib_texture_turbulence button here in the Create node and again I'm going to
05:15create a mib_texture_vector. Select the mib_texture_turbulence node, middle
05:25mouse button+drag texture_vector2 on top of the Coordinate section, and this
05:30time what I'm going to do is I'm going to connect this turbulence texture to an
05:34attribute of this turbulence texture. So the second turbulence texture is going
05:37to control some attribute of the first turbulent texture.
05:41So, I'll select this and I'm going to middle mouse button+drag the
05:43mib_texture_turbulence on top of the Strength value just to see how this can
05:49adjust the Strength.
05:50So now we have basically layered noise.
05:53We have two different turbulence textures working together.
05:56Maybe I'll set the Iteration up to 24 just to see how that works.
06:06And now it's just fun to play with the settings in the two different turbulence
06:11textures and see what you can come up with.
06:19So, I'm just increasing the variation over the surface by layering turbulence
06:25textures on top of each other and you could layer more and more textures on
06:29each of the turbulence values to see what kind of interesting patterns you can come up with.
06:34One last thing I'd like to point out here. As you can see we have a very strong
06:38value range here and I'd like a way to sort of tune that a bit so that I
06:42can make the dark values may be lighter or the light values a little bit
06:46dimmer, just a way like a volume knob so I can easily control the
06:49strength of the effect.
06:51There's a number of ways to do this and simple way is to create a Utility node.
06:56So I'm going to create actually the Remap Value node.
07:01So, I'm in the Maya section of the Create tab in Hypershade under Utilities.
07:06I'm going to click on Remap Value, I'm going to close the Render View, and I'm
07:14going to break the connection between the turbulence texture and the
07:18mia_material. I'm just going to select the little connecting line there and
07:21press Delete to break that connection. And in this case I'm going to middle
07:25mouse button+drag Remap Value on top of mia_material and again, I'm going to
07:31choose Other to pull up the Connection Editor.
07:35What I like is the outValue of, oh I'm sorry, I made the wrong connection there.
07:40Sometimes if you have these nodes overlapping, Maya gets a little bit confused
07:43and it doesn't know what kind of connection you're making.
07:45So, let me neaten up the Hypershade Work Area a little bit and try that again.
07:50I'm just going to middle mouse button drag Remap Value on top of mia_material,
07:55I'll choose Other, in this case I want outValue, and again I'm going to connect
07:59outValue of the Remap Value node to the diffuse_weight of the mia_material node.
08:06So that connection has been made, and now I'm going to middle mouse button+drag
08:11the turbulence texture on top of Remap Value and I'll choose Other again.
08:16In this case I'll do outValue of the turbulence texture and I'm going to connect
08:21this to inputValue of the Remap Value node.
08:26So now I'll close the Connection Editor and now what I can do is I can use the
08:31Value ramp here to start to adjust the strength of the turbulence textures.
08:36So I have this little ramp here and you can see I can start to add points to the
08:40ramp by clicking on it and move the points around and if I wanted to change the
08:45Interpolation of the curve, I can just select one of the points in the curve and
08:48change Interpolation to let's say Smooth, and do that for each point on here, and
08:55if you want to see a bigger version of the ramp, you can just click this arrow
08:58button next to it and now I get a nice large version of the ramp. You really
09:03start to create some interesting effects.
09:06This is a good way I think to create something like a marble pattern.
09:09I think it works a little bit better than Maya's 3D Marble node.
09:13It just takes a little bit more work but you get something that looks really nice.
09:16So, I'll render that and this is what we come up with.
09:19So, at this point it's just a lot of fun to fool around with the ramp and the
09:23turbulence values to see what you can get and this could be applied to something
09:27like the Reflectivity or even the Transparency of the mia_material node to
09:32create various different effects.
09:34It's good for special effects and that kind of thing.
Collapse this transcript
Considering the round corners texture
00:00The Round Corners node is a special node that allows you to add the beveling on
00:04the edges of your surfaces at render time within the shader network.
00:09So a common problem with the rendering CG models is that the corners of the
00:14object or the edges tend to be perfectly sharp.
00:17So let's take a look at this cube right here.
00:19This is just an ordinary polygon cube and you can see how the edges are
00:23perfectly sharp, and that tends to make the object look very perfect in the
00:26renderer and thus it creates sort of an overly perfect or overly CG kind of look.
00:32So the solution for a long time has been to actually just model beveled edges onto
00:37the surfaces of your objects.
00:39So I have a cube here.
00:40It's the same as the first one except I've gone in and I actually modeled and
00:44beveled edges on all the edges of the cube, and it's a fine solution. However,
00:48it can be very time consuming on complex objects and it adds an awful lot of
00:52geometry, and it limits your flexibility too, because there's no way to
00:57change the beveling after you've added it into the surface, at least not for
01:00very complex objects.
01:02In mental ray there is a special node called the Round Corners node that is
01:06used to add the beveling in the shader network so they don't have to be modeled in by hand.
01:11Let's take a look at how to add this to a shader network.
01:14I am going to hide this cube because we don't need it at the moment and I'll
01:17bring this one over, and let's take a look at its shader.
01:21I have an mia_material shader applied to it and all I've done is I applied the
01:25Chrome Preset to the shader itself using the Preset options, Chrome, and then to
01:31make it a little bit easier to see
01:33in the render, I've lowered the Reflectivity to 0.5 and I've set the Glossiness
01:37in the Reflection section down to 0.35.
01:41So do a quick render so you can see what this looks like.
01:44So here is our cube and you can see it's very perfect. The edges are
01:47absolutely 100% sharp.
01:49It tends to look very computer-generated.
01:51So I'll keep this image and now we'll add the Round Corners node.
01:56To do this, I am going to go down in the mia_material down to the Bump section,
02:00and you'll see that there are two slots for Bump.
02:02There is Overall Bump and Standard Bump.
02:05So the fact that we have two slots gives you a little bit more flexibility.
02:08You can use the Standard Bump node to put in textures, to create things like
02:11scratches and dents on the surface, using either file textures that you've
02:15painted or procedural textures.
02:17So, it's just like the bump channel in Blinn or a Phong or a Lambert.
02:22The overall Bump slot is meant specifically for the Round Corners node, so that
02:26this means you are going to have a surface that has both round corners and some
02:30kind of bump textures at the same time.
02:32So, I am going to click on the Texture icon next to Overall Bump and under
02:37mental ray I am going to select Textures and I am just going to click on the
02:41mia_roundcorners button, and that adds the mia_roundcorners node to the shading network.
02:48And it's a fairly simple node to work with.
02:50You just have to play with some of the parameters here.
02:53The main Parameter you want to mess with is the Radius. This sets the amount of beveling.
02:57I am going to start by setting this to a low value, something like 0.05, and see
03:02how that looks, and I've stored this render using the Keep image button and now
03:06I am going to do another render and we can compare.
03:08So you can see that without doing any extra modeling I have a nice round corner in here.
03:15If I store this image and then use the slider at the bottom of the render
03:18preview, I can compare the first image with the new one.
03:21So there is the original image with the sharp corners and this is the new one
03:25with the round corners.
03:26So you can see how much it adds.
03:27It's just a little touch of realism to the surface and it can be subtle or it can be extreme.
03:32If we start to make this too high, of course the corners get very rounded and it
03:36starts to look a little bit strange.
03:37So you probably want to keep this at a fairly low value, although 0.1 seems
03:40to work pretty well. It's not too bad.
03:42If I start to bring this at values closer to 1, we get something like this.
03:48So then it starts to look a little bit strange.
03:50If you're going to do an extreme beveling or rounded edge, then you probably
03:54want to consider a solution that involves modeling, but for just a slight
03:57beveling, the Round Corners node works really well.
04:04And there is a bump channel here, so if you're using this in a network with a
04:07shader that only has a single bump channel, something like a Blinn or a Phong or
04:11a Lambert or something that, you can add a second bump texture here within the
04:14Round Corners node and there you go.
Collapse this transcript
Improving skin detail with ambient occlusion
00:00mental ray has a special Ambient Occlusion texture which can be used to add
00:04additional shadowing within a shader network.
00:08As you may know, Ambient Occlusion passes can be created with the render pass
00:12section when you're doing a render.
00:14So we go to Render > Render Settings under Passes.
00:19You can actually create an overall pass that adds Ambient Occlusion shadow into
00:23everything in this scene.
00:24But in this case I don't want to do that.
00:25What I want to do is I want to add just a little bit of extra shadow and detail
00:29to the skin shader applied to my old man character, because as you can see I
00:35have a nice skin effect going.
00:36However, it looks a little flat, and it looks a little plastic.
00:40You can see especially in the ear, this looks kind of very flat to me.
00:43I'm losing some of the detail. I'm not getting as much of the detail here in the
00:47wrinkles that I'd like to have.
00:48So one solution is to use an Ambient Occlusion texture and connect it to the
00:52skin shader network that I have going already.
00:54I'd like to show you how to do that.
00:56So I'm going to store this image, so that we can compare it with subsequent
01:00renders and I'll minimize the Render View.
01:03Let's take a look at this skin network.
01:05This is the misss_fast_skin_maya2 shader that's been applied to the old man.
01:10I'm going to rename this skinShader to make our lives easier. There we go.
01:16I've experimented with several ways of doing this and I've found that for the
01:20types of renders that I like to do, I like to add the Ambient Occlusion texture
01:24to the Overall Color channel of my skin shader.
01:27You can try adding it to the Ambient network, but that's going to start to
01:31brighten the overall look of the surface.
01:33So I use Overall Color.
01:35The way this shader works is you have a Diffuse Color and right now I have a
01:39texture that is creating like that freckles and that kind of stuff on the
01:42surface of the skin and that it's Diffuse Weight that determines the strength of
01:46the Diffuse Color within the network.
01:48Then, on top of this is an Overall Color which you can use as a general volume knob.
01:52If I start to pull this down, you can see how it's lowering the coloring of the
01:55entire shader itself.
01:57Let's set this back up to white and I'll click on the texture icon to the
02:01right of the slider.
02:03This pulls up the Create Render Node window and I'm going to go to mental ray > Textures
02:08and I'll click on mib_amb_occlusions. This is the Ambient Occlusion texture.
02:14This connects it to the network, and I just need to adjust a few settings here.
02:19For one thing the Samples setting will increase the quality and remove some of
02:23the graininess that comes with the shadowing found in the shader.
02:26So I'm going to set this to 32.
02:27Let's just create the rendering with these settings and see what we get.
02:33So here's our resulting render.
02:34Let me store this and we can compare it with the earlier one.
02:37So you can see how the Ambient Occlusion is adding shadowing in the ears here on
02:43these surfaces within the eye and the wrinkles.
02:46However, it's a little bit strong and there's a few things we can do to sort of
02:50tone this down a bit.
02:51For one thing, the blackness of the shadowing I think is sort of at odds with
02:56the nice red color that we're getting out of the SubSurface scattering effect.
03:00They're kind of working against each other.
03:01That's easy to fix.
03:03I'll just click on the Dark color here in the Ambient Occlusion Texture node and
03:08raise this to maybe like a Dark Red, so that will help to be a little bit more
03:13in harmony with the SubSurface Scattering effect that we already have going.
03:16The other setting that I want to change is the Max Distance.
03:19By default, this is set to 0.
03:21As it calculates the shadowing effect, it's going to look at each object that
03:25has the shader applied and see what's close to it, and if this is set to 0,
03:29it's just going to keep looking almost to an infinite distance.
03:33So I actually want to raise the Max Distance a little bit.
03:35I'll set this to 5.
03:36So it's like 5 units to see how far it needs to look.
03:40By increasing this will remove some of the problems where I like the proximity
03:44of the monocle to the skin is causing a little bit too much shadowing.
03:47So let's see how this looks when I create a render.
03:50Now, you can compare it.
03:54That's starting to look a lot better.
03:57It's a little bit more subtle and subtlety is actually what I'm going for here.
04:00So here's without Ambient Occlusion, here's with the default settings, and then
04:05this is after just a little bit of tweaking.
04:07So that's a basic idea.
04:08If I wanted to make a few more adjustments, I can increase the softness of the
04:12shadowing by increasing the spread or the tightness of the shadowing by
04:15decreasing the Spread, and again I can play with the Max Distance to see how far
04:21mental ray has to look in this scene to see the closeness of other objects
04:25before it starts adding shadowing.
Collapse this transcript
Applying reflection occlusion
00:00The Ambient Occlusion texture in mental ray has an option for creating
00:04Reflection Occlusion.
00:05Reflection Occlusion is very similar to Ambient Occlusion in that the parts
00:09of the surface that are in the cracks and the crevices where fewer photons of
00:12lights can reach tend to be less reflective. They're not reflecting as much of the environment.
00:17So in this rendering I have two teapots.
00:19Both of them have just a standard Maya Blinn applied with a very high
00:23reflective value of 1.
00:24So they're almost like mirrors or chrome and the only difference is that this
00:28Blinn texture has an Ambient Occlusion node connected to its Reflectivity
00:33channel and in the settings for the Ambient Occlusion node, I have Reflection
00:37Occlusion activated.
00:39So I am going to show you how to set this up really quickly.
00:41So I'm going to select the teapot on the left and open up its blinn texture.
00:48This is a blinn1 texture, and I'm going to go down to the Reflectivity option here.
00:54I'm going to go down to the Specular Shading section and for Reflectivity,
00:58I'm going to click on the texture box right next to Reflectivity.
01:02That opens up the Create Render Node box, and under mental ray I'm going to
01:05click on Textures and choose Ambient Occlusion.
01:09This pulls up the Connection Editor because Maya at this point is not
01:13exactly sure how you want to connect the Ambient Occlusion node to the
01:16Reflectivity channel.
01:17I'm going to point out a couple of things.
01:20We want to connect the outValue of the Ambient Occlusion node to the
01:24Reflectivity channel here in the Specular Shading.
01:27So if I look in the Connection Editor under mib_amb_occlusion, if I click
01:30on outValue notice on the right side it highlights certain options and grays out others.
01:37Meaning that the grayed out versions can't be connected to outValue.
01:40So if I look down here, I'll see Reflectivity is grayed out.
01:45So what does this mean?
01:46Well the problem is that outValue is a vector.
01:49It has three values.
01:50Red, green, and blue.
01:52So that's three options, but Reflectivity is a single channel.
01:57So you can't connect a vector to a single channel easily.
02:01Maya just doesn't understand how you want to make the connection.
02:04So what you can do is you can use a few utility nodes within the Hypershade to
02:08make this connection to convert the vector into a single channel.
02:11But if you're a little bit lazy like myself you'll take an easier way out, which
02:15is just to choose any one of these values.
02:17So for instance outValueR for the red channel, and then just hook up that to the
02:22reflectivity, and that will work just fine because the outValue, the light color
02:27of the Ambient Occlusion node, is going to be White. All right!
02:31So if I click on the Arrow button to the right of Reflectivity and you can see
02:35here are the options for Ambient Occlusion. The Bright value is going to be white;
02:39the Dark value is going to be black.
02:42And with computer graphics, a white color is the combination of red, green, and blue.
02:46So it's a red value of 1 plus a green value of 1 and a blue value of 1. Same with black.
02:53black as outValue of red is 0, outValue of green is 0 and out value of blue is 0.
02:58So this should work just fine because really we just need one of these channels.
03:01This is just going to be a range of 1 or 0 for the Reflectivity, and
03:05that'll hook up just fine.
03:06So that's generally the way I do it.
03:08Once I have that set, I'm going to increase the Samples just to take out some
03:13of the graininess, and I'm going to increase the Max Distance, because remember
03:18the Max Distance of 0 means that mental ray is going to search for an infinite
03:22amount of space until it encounters any other objects in the scene and those
03:26objects are going to cause the shadowing or cause the reflection occlusion on the surface.
03:32But I don't want this teapot to necessarily determine its occlusion based on
03:36this teapot; I just want the areas and the cracks and the crevices.
03:39So I want to increase this above 0, so it's no longer infinite, but a finite
03:43value. Something like 4 works pretty well for this scene.
03:47The last thing I need to do is turn on Reflective.
03:50That changes the type of occlusion from Ambient Occlusion shadowing to
03:54Reflective Occlusion.
03:55If I turn that on and create a render, the two teapots should now look the same.
03:59There you go, now they look fairly similar, and Reflection Occlusion is useful
04:03because it can make your objects look a little bit more realistic.
04:07If you have an overly reflective object, a lot of the details are going to be
04:10lost in the reflection.
04:11So this is a way to bring back the detail in the surface.
Collapse this transcript
5. Creating Surface Details with Textures
Painting bump maps
00:01In this movie we're going to talk about how to add a bump texture to the mia_ material.
00:06I have a copper pot in this scene and an mia_ material has been applied to it,
00:11and I'm using the Chrome preset.
00:13The only thing I've done to it is I've adjusted the Reflectivity and brought it
00:18down to about 0.662 and I have lowered the Glossiness value a little bit, just
00:24toned down the reflections a little bit so that the pot itself is more visible.
00:28To add a bump texture I just need to scroll down to the bottom here, expand the
00:33Bump section, and I want to add my bump texture to the Standard Bump slot, not
00:39the Overall Bump slot.
00:40The Overall Bump slot is reserved for the round corners node.
00:43I'll click on the checker icon to the right of Standard Bump. That'll pull up
00:47the Create Render Node.
00:49I'm going to choose a 3D texture so that the bmp is applied evenly without
00:53regard to the UV coordinates and I'll use Volume Noise.
00:59When I add a bump texture to a shader generally the Attribute Editor will switch
01:03to the bump 3D node or if it's a 2D texture it'll be the bump 2D node and this
01:10essentially controls the strength of the bump.
01:12So the bump value is connected to the texture itself.
01:15So bump value is connected to Volume Noise, but the bump depth adjusts the
01:19strength of the overall bump.
01:20So I'm going to lower this down to say let's do it 0.1 to start with, and then
01:26I'm going to switch to the VolumeNoise tab and make some adjustments here just
01:31to change the pattern of the noise.
01:32Now the way a bump texture works is a grayscale of texture and the light values
01:38of the texture make the surface appear like it's bumping out; the dark values in
01:43the texture make it look as though the surface is bumping in.
01:46It doesn't actually change the geometry of the surface in any way.
01:49It just creates the appearance of bumpiness in the render.
01:52So what I can do is I'll lower the Amplitude a little bit so you can see I am
01:56getting a little bit more gray in there, and that'll add a little bit variation,
01:59and I can change the Frequency by increasing this, bring it to higher frequency
02:06and lower the Density and you can experiment with the different noise types in
02:11the Volume Noise texture.
02:12It's one of the reasons why I like this particular texture.
02:15But I'm going to put it to Perlin Noise and see how that looks.
02:19Let's do another render.
02:21So you can see now how the surface appears bumpy.
02:25It's a little bit strong so a couple of things I can do to adjust that is I can
02:29bring the Threshold up. You see how the texture is getting lighter when I bring
02:32that up and bring the Amplitude down so this is kind of like adjusting
02:37brightness and contrast.
02:38Let's do a little render region here and see how that looks.
02:43That's looking a little bit better.
02:45I'm going to graph the network, so I'm selecting the mia_material in the upper
02:51portion of the hyper-shade, right- clicking and choosing Graph Network, and now
02:55you can see how the network is connected.
02:57So you can see how the bump3D node is connected to the Standard Bump channel
03:02using the Out Normal attribute.
03:05If you're using a 2D bump then this would be bump2D node as opposed to a 3D
03:09node and then the outAlpha of the texture is connected to the bump node here,
03:15so it's a single connection.
03:16Another thing that's kind of interesting to do is choose the same texture to
03:21control the reflectivity of the surface.
03:23So this'll add variation to the Specular Highlights.
03:26So what I can do is I'll just scroll up in the Attribute Editor, let me minimize
03:31Render View, and I'm going to scroll down to Reflection, and right-click
03:37VolumeNoise over Reflectivity.
03:39Now I have the same texture connected to Bump and Reflectivity.
03:44So let's do a render.
03:47You can see how this is starting to break up the surface as well as the
03:49reflectivity and creating some interesting effects.
03:52Now I'm using procedural nodes for the bump value but you can also use file
03:58textures, so you can actually paint your own textures.
04:01When you create a bump texture if you're painting it in Photoshop, you just
04:04basically want to paint light and dark values and just remember that the lighter
04:07values are going to make the surface look like it's bumping out and darker
04:10values are going to make the surface look like it's bumping in.
Collapse this transcript
Creating normal maps
00:01In this movie, we are going to talk about how to generate normal maps within Maya.
00:05normal maps are very similar to bump maps in that they create a
00:09high-resolution detail on a low- resolution surface or they add detail to a
00:13surface through the shading network.
00:16normal maps are frequently used in games, because the game rendering engine
00:20has to render in real-time and it can't handle objects that are made up of a
00:24whole lot of polygons.
00:25So instead they use normal maps to simulate the detail, making the game
00:30look more realistic.
00:32So common workflow is to take a high- resolution version of the object and
00:35transfer the detail from the high- resolution version to the low-resolution
00:39version via a normal map.
00:41I'll show you how to do this in Maya.
00:44I have a high-resolution version of this moon here, and you can see it's made up
00:49of a lot of polygons.
00:50I'll zoom-in on it, and I have a lower resolution version.
00:56To get the detail from the high- resolution to low-resolution, I am going to use
00:59the Transfer Maps tool.
01:01This is found under the Rendering menu set, under Lighting/Shading.
01:04I will open up Transfer Maps.
01:08So to get this doing what I need to do is I need to select my target shape which
01:13is my moon object or moon1 object.
01:16I'll click Add Selected.
01:18That adds moonShape1 or the shape node of moon1.
01:23This node, and then what I need to do is select my high-resolution object and
01:28click on Add Selected under Source Meshes, and this adds moon_HResShape1.
01:35So the source is going to be moon_HRes and the target is going to be moonShape.
01:40And then I need to select the type of map I want to make.
01:43I am going to choose normal map.
01:47Under normal map, I can use the folder icon to choose where I want the texture to
01:51be replaced once it's done calculating.
01:52I'm going to choose the source images of the current project.
01:57So I will choose the sourceImages directory.
02:01The file format can be chosen. This one is usually to select our Maya IFF or EXR.
02:08I will use Maya IFF.
02:08I am not going to include materials at this point but if the high-resolution
02:13version had a material that had a bump map applied to it for additional details,
02:18you could choose Include Material and it will include that bump detail within
02:22the normal map as well.
02:23I am going to leave this off for the moment.
02:25And then I am going to set Map space to Tangent space.
02:28There are two types of normal maps.
02:30Object space and Tangent space.
02:32Tangent space is used for deforming objects like characters that are
02:37moving around the scene.
02:38Object space is usually used for scenery.
02:41In fact, you can actually use Tangent space for all different types of objects,
02:45so that's what I usually use.
02:46So I am going to select Tangent space, and I have two more normal maps setup here.
02:51I only need to create one, so I am going to click the Remove Map button to
02:55remove the second normal map from being generated.
02:58Finally, I am going to turn on Connect maps to shader so this will automatically
03:03connect the normal map to the shader applied to the low res moon.
03:07Now, the way that Maya calculates normal maps is it actually uses a search
03:11envelope to calculate the difference between the target shape and the source shape.
03:17So the difference between the low- resolution and the high-resolution object.
03:21So I want to make sure that they are in the exact same space.
03:24So the high-resolution object needs to be in the same area as the
03:28low-resolution object.
03:29So I am just going to move that, so that they are overlapping.
03:33This will ensure that the map is calculated correctly.
03:35Finally, I am going to go down to the mental ray Common Output.
03:40I am going to set the map width and height to 2048, so the resulting
03:45texture will be 2048x2048.
03:46I am going to set Transfer in to Object Space.
03:51I'll set the number of samples up to 2.
03:55Leave the normal direction to Surface Front, and I am going to leave the rest of
03:59the settings at their default.
04:01Once I am ready to make the map, I'll click on the Bake button.
04:05At this point Maya is actually rendering using mental ray to calculate the
04:09difference between the low- resolution version and the high-resolution
04:13version, and here we go.
04:16It's finished rendering.
04:17So I am going to select the high-res moon shape and move it out of the way and
04:23now we can see the low-res moon shape.
04:25I am going to select the shape and choose in the Hypershade, Graph Materials on Selected.
04:30You can see the file is connected to a bump map which is connected to
04:34the lambert shader.
04:35Now, right now it's not updating the icons for the file correctly, so I can just
04:40right-click over the File node and choose Refresh Swatch and now we can see the
04:43normal map, and I am going to expand the work area, so we can zoom in and take a
04:49look at the normal map, and it's a RGB image.
04:53It's a color image and the colors in the image tell the Maya how to deform the
04:57surface to create the surface details.
04:59So you can actually preview what this looks like within the Perspective View
05:03just by switching the Renderer to High Quality Rendering and make sure that the
05:06Textured icon in the menu at the top here is turned on.
05:10So take a look at it.
05:11You can see the detail has been transferred from the high-resolution object to
05:15the low-resolution object.
05:16Now, I'll create quick render using mental ray, and there we go.
05:21That's how to create normal maps in Maya.
Collapse this transcript
Applying normal maps
00:01In this movie, I am going to show you how to hook up a normal map to a shader
00:04network applied to a surface in Maya.
00:07Now Maya's Transfer Map tool does a decent job of creating normal maps, but
00:11professionally speaking, I prefer to create my normal maps using a
00:14third-party program.
00:15I personally use ZBrush to sculpt the objects, create the texture maps, and
00:20generate the normal maps because I find it easier to use and the normal maps
00:23generated by ZBrush are superior to those that are created in Maya.
00:27Other artists will use programs such as Mudbox or xNormal or CrazyBump.
00:32They are all good ways to create normal maps for your characters.
00:35So in this case, I've created a normal map and I'm going to apply it to the
00:40surface as a file texture.
00:42So let's start by taking a look at how we can preview the normal map in Maya.
00:46I am going to create a blinn texture for this character.
00:49So I am going to expand the old man in the outliner, make sure I have
00:52oldManShape selected, and I'll click on the Blinn material to assign a new
00:58blinn to the surface.
00:59In the Shading menu, I'm going to turn off Use default material so we can see the
01:04blinn shader on the surface correctly.
01:06I've selected the surface and I am switching over to the blinn3 tab. In the
01:13Bump Mapping section of the blinn3 tab, I am going to click on the little checkerboard icon.
01:19This brings up the Create Render Node window.
01:21Under 2D Textures, I'll choose File, and this is going to pull up the bump2d
01:27attributes in the Attribute Editor.
01:29I need to make sure that Use As is set to Tangent Space Normals, so that it
01:34calculates a Tangent Space normal map correctly, and now I'll click on the icon
01:39to the right of Bump value.
01:41The little arrow, this will switch me over to the File node.
01:44And to cook up the image, I'm going to click on the folder next to Image Name.
01:50Switch to the sourceimages directory of the current project.
01:54I am going to use the file called madHatter 1_NORMAL, and then the last thing I
02:01am going to do is set Filter Type to off.
02:03The filter adds a slight blur to the texture which sometimes can kind of destroy
02:08the detail in the normal map.
02:11Once I have that setup, I am going to go into the Perspective View and turn on
02:15the Texturing Bump button.
02:16This is a little checkered sphere at the top of the Perspective View.
02:19Now, you can also press the 6 key on the keyboard.
02:22I am going to set the Renderer to High Quality Rendering, and now we can see
02:26the normal map, and all the details that I have sculpted into the surface of the skin.
02:30So I have got a lot of veins here and some pores and wrinkles and that kind of stuff.
02:35So now I want to hook this up to my skin shader network.
02:39So I am going to go Rendering Editors > Hypershade and I am going to
02:44middle-mouse button+drag the fast skin shader.
02:48This is the misss_fast_skin_maya shader.
02:51I am going to rename this just skinShader.
02:56You can see under Bump Shader, I actually already have the normal map connected,
03:01but I will show you how to recreate the connection.
03:03So I am going to break the connection here just by right-clicking and go to Textures.
03:07I am going to pull down file4. Middle-mouse button+drag file4 down into the Work Area.
03:12I am going to Shift+Select both of these nodes here in the Work Area. Choose
03:17Graph Input And Output Connections.
03:19So now we can see the graph of the shader is also normal map.
03:24I am going to expand the Work Area.
03:26Then what I need to do is select the skinShader, so I can see its attributes in
03:32the Attribute Editor and I will just middle-mouse button+drag the Bump node on
03:37top of the Bump channel here, and this will hook up the normal map.
03:41So now I will create a render, and I'll see how this looks. Oh!
03:46Yes, I need to apply the shader to the surface.
03:50Still have the blinn shader attached to the surface of the old man, so I want to
03:54select the oldManShape, and then the Hypershade, right-click over skinShader and
03:58choose Assign Material To Selection and now that has been assigned.
04:02Now let's create a render and see how it looks. There we go.
04:05You can see some of the detail here in the lips, and some wrinkles on the
04:10skin, and some pore textures as well as on the some of the veins here, as well
04:15as the detail on the ears.
04:18So why would you choose to use a normal map over a bump map?
04:21One, they have their advantages and disadvantages. You could use a bump map to
04:26create the same kind of detail and the advantage of the bump map is that you
04:31can easily paint them in a program such as Photoshop, because it just uses dark
04:35and light values, and it's very easy to sort of figure out as you're painting
04:39the texture how light values will create little bumps like pimples, and that
04:44kind of stuff in the skin, and dark values can create things like pores and
04:47wrinkles and that kind of stuff.
04:49But a normal map tends to be a little bit more accurate because a normal map
04:53actually uses a vector to change the normal on the surface in order to
04:57create the surface detail.
04:59So it uses a red, green, and blue value as opposed to a simple grayscale value.
05:03So for instance, if I select the normal map here in the Work Area of the
05:08Hypershade, right-click, and choose Test Texture.
05:12this will open up the normal map in the Render View and you can see what the
05:15normal map looks like.
05:16So you see how it is using color values.
05:19Red, green, and blue color values to alter the surface.
05:23This is not something that you could easily paint by hand in Photoshop because
05:27it is very difficult to figure out how these red, green, and blue values are
05:30going to accurately deform the surface.
05:33But normal maps do tend to render faster, their bumps are little bit more
05:38accurate, and the reason that I use them is I tend to sculpt the detail directly
05:43in ZBrush on the surface of the object, because ZBrush can handle objects that
05:49are millions and millions of polygons much more than Maya can.
05:53Then I just basically use their normal map conversion method to convert the
05:58sculpted high-frequency detail into a normal map that I can then use in my lower
06:02resolution object in Maya.
06:04It's kind of a personal preference thing.
06:07You might want to experiment using normal maps, and bump maps, and see which
06:10one you prefer, but that's the basic idea of how to hook up a normal map to a surface in Maya.
Collapse this transcript
Creating displacement maps
00:01In this movie I'm going to show you how to add a little more detail to the texture
00:05in the tires here for this car.
00:07As you can see, I have applied a file texture to create a decal for the side of
00:13the tire, and also a little bit of the tread.
00:16But it's not looking entirely realistic right now, mainly because the tread is
00:20not actually pushing out of the surface.
00:22So it doesn't look like these tires are going to get a whole lot of traction.
00:25So there are several ways that you can fix this problem.
00:27One is to actually model the tread into the surface.
00:31That is very time consuming.
00:33Also, you're going to have to add an awful lot of geometry to the surface in
00:37order to create a nice looking tread but it is one option that you can use.
00:42Another option will be to use a bump texture, a grayscale picture to sort of
00:47bump out the tread surface.
00:49The only problem with that is that a bump texture makes the surface appear as
00:53though it's bumpy, but it doesn't actually change the geometry.
00:56So if you apply a bump texture, let's take a look at what that would look like.
01:01So I'm going to select the tire surface, and scroll down here to the Bump section.
01:10I'm going to connect the bump to the Standard Bump channel with the tireShader.
01:13So I'll click on the checker icon. Pull up the File.
01:17I'll set the Bump Depth to 0.250.
01:20In the file node, and we are going to set the Filter Type to off, and click on Image Name.
01:26I'm going to select tread_bump.
01:30So you can see the tread_bump texture has a light color for the treads.
01:34So this is going to push the tread out, and a light color, very dim color for
01:39the decal, just to add a little bit of bump to the decal.
01:41So I'm going to choose Ope and that will hook up the Bump texture.
01:45I'm just going to select in this region around the front tire, and do a test render.
01:49So you can see that we have a little bit of tread going here.
01:53But the problem with using a bump texture is since it doesn't actually
01:57deform the surface.
01:58As this surface starts to curve away, we can see that the tread is
02:02still actually flat.
02:03It's not actually being bumped out.
02:05It just looks as though it's been bumped out on the parts of the surface that
02:08face the camera because you have this little specular highlight and a little
02:12bit of shadow in there.
02:13So it's a good for faking some amounts of detail.
02:17It's usually bump maps are best for faking like high frequency detail, like if
02:21you wanted to make little sort of a grainy quality to the surface of the tire.
02:25But they're not really good for things like treads, since they don't actually
02:29deform the geometry.
02:30So in this case, what I want to use is a displacement map.
02:33The displacement map is a grayscale texture, just like a bump texture.
02:38So it's another type of texture map that wear light values, push the surface
02:43out, and dark values pushed the surface in.
02:46The difference is that a displacement map actually deforms the surface of the geometry.
02:51So when it pushes the geometry out, it changes the way the geometry appears in
02:55the render so that you're actually pushing out.
02:57It tends to make a much more realistic looking deformation in the render.
03:02So let's see how we can hook up a displacement map.
03:05I'll choose Window > Rendering Editors > Hypershade to open up Hypershade Editor.
03:11I'll select the tire.
03:12You can see it's selected here.
03:14I'm going to right-click in the work area of the Hypershade and choose Graph
03:19Materials on Selected Objects.
03:20Here is our shader network.
03:22So we have the tireShader, which is a mia_material, and a bump connection to
03:28the tireShader, and also the file node connected to the Color channel of the mia_material.
03:35So that's fine.
03:35We can leave that the way it is.
03:37So if you want to connect a displacement map, what you're actually going to do
03:40is you don't connect the displacement texture to the tireShader itself;
03:44you connect to the displacement shader to the Shading Group.
03:47This is the node that is between the tireShader and the actual geometry.
03:52It has a number of slots that you can use for creating specialized texture maps
03:57such as Displacement.
03:58So I'm going to select the mia_material_x_passes2SG node.
04:04This is the Shading Group node.
04:05Let's say we rename that.
04:08I'll just call it tireShaderSG to make my life a little bit easier.
04:14Then under Displacement material at the very top, under Shading Group
04:18Attributes, I'm going to click on the checkerboard icon,. Pull up the
04:23Create Render Node.
04:24Again, I'll just select File.
04:27This brings up the displacementShader node in the Attribute Editor, which I
04:30don't actually have to do anything to this node.
04:32I'll just click on the arrow next to Displacement.
04:36That will switch me over to the File node that's now hooked up to
04:39the Displacement node.
04:41I'll click on the folder next to Image Name.
04:44I have a file in here called tread_displacement.
04:47You can see in the preview that the tread_ displacement looks a lot like the bump texture.
04:53We have light values pushing out the tread, and just a little bit for the logo,
04:58and the other details in the tire, but just enough. I'll choose Open.
05:04I want to set Filter Type to off.
05:06Now before I do a render, I want to point out one thing.
05:11I'm using the TIFF file format, which is a personal habit of mine.
05:16I use TIFF for a lot of pictures.
05:17But mental ray does not always play nicely with the TIFF format.
05:22So what it prefers is a format called the .map format.
05:26There is a way to have Maya automatically convert all your textures into this .map
05:31format, saving your bit of work.
05:34To activate this, go to Windows > Settings/Preferences > Preferences, and under
05:41the Categories, click on Rendering, and turn on, under mental ray Preferences,
05:46turn on Use optimized textures (auto-conversion) and turn this on.
05:52You can choose use Assigned textures only, or All textures. That's up to you.
05:57I'll just put it to All textures.
05:59I'll click on the Update optimized cache textures now button.
06:03Now what this does is this actually creates a separate folder called cache with
06:09all the converted file textures.
06:11So if I look in my project directory in the sourceimages folder,
06:18there is a folder called cache here.
06:22This has basically converted all of my textures in the scene to the .map format.
06:28This is a much friendlier format for mental ray.
06:30It prefers this because TIFF can often crash mental ray.
06:35So it's good to get in the habit of turning on that option in the Preferences.
06:38I almost always have it on.
06:40Now that I have that set up, let's do a test render.
06:44I'm just going to render this region again.
06:46Let's store the current image.
06:48Let's see how it looks.
06:49Okay, so here is our rendered region.
06:53It took a while to render, and we check it out.
06:56You can see that there are a couple of problems here. This is normal.
06:59The Displacement Map is doing exactly what it's supposed to do.
07:02It's displacing the geometry, so you can see that the tread is definitely being
07:05pushed out from the tire and same with the logo.
07:07The only problem is its being pushed out an awful lot.
07:11So we need to adjust this displacement map so that it renders something a little
07:15bit more reasonable.
07:16It's fairly easy to do.
07:17I just need to go into the file node for the displacement map, scroll down to
07:22the Color Balance section and what I need to do is adjust the Alpha Gain.
07:28So the Alpha Gain is, kind of, like the volume knob for the displacement map.
07:32Now what it actually does is the displacement texture, if you look in the
07:35Hypershade, is connected.
07:38The file texture is connected to the displacement node using the outAlpha.
07:43So the Alpha Gain is a volume knob for this outAlpha connection.
07:47So right now, it's set to 1.
07:49Let's pull this down a lot.
07:51Let's try 0.1 and render the region again.
07:55So this is what we get with a value 0.1.
07:58It's a little bit extreme.
08:00Now we're in the realm of monster truck tires.
08:03So I want to cut that in half again to 0.05.
08:08I'm guessing that's going to do the job. There we go.
08:12Here is nice displaced tire tread.
08:14Now as you, no doubt noticed, displacements maps do take a long time to render.
08:17So you must use them with caution, and use them sparingly, because they will add
08:22a lot to render times, because the geometries is actually being displaced.
08:26So be careful how you use them.
08:28As a general rule, I like to use displacement map for a very large surface changes.
08:32Things like this tread, or the logo.
08:34Then, I'll combine that by also adding a bump map into the shading network to
08:39create more high frequency detail like little tiny bumps on the surface of the tire.
08:43But that's the basic workflow for displacement maps.
08:47I'll do a final render of the entire car so we can see both tires displaced.
08:51Okay, there is our final render of the car with the displaced tires.
08:56You can see we have a nice start going here for creating some really cool
09:00effects and some realistic detail.
09:02The challenge of course is to continue working with the shading network, and see
09:05how much more realism you can get into it by combining things like file
09:09textures, and other aspects of the mia_ shader network.
Collapse this transcript
Troubleshooting displacement maps
00:01In this movie, I'm going to talk about some common problems that you may
00:04encounter when applying displacement maps that have been created in other programs.
00:09For example, I'd like to apply a displacement map that I created in ZBrush to
00:12this character that I'm rendering here in Maya.
00:15So, let's take a look at first how we can do this.
00:18Here's is a character right now with his skin shading network almost complete.
00:22I've got a subsurface scattering going, add a little bit of an ambient
00:25inclusion, I have a normal map applied, but to really make the details pop out
00:29and look more realistic,
00:30I'm going to add a displacement map to the surface.
00:34So, the first thing I'm going to do is I'm going to select the surface and I'm
00:38going to create what's known as an Approximation node.
00:40So I'm going to go to Windows > Rendering > Editors > mental ray >
00:45Approximation Editor.
00:47And what this does is the approximation node actually subdivides the surface at
00:53render time allowing for more detail that can be used for displacements, so when
00:57the displacement texture is applied to the surface, so that at render time the
01:02surface is subdivided allowing for more detail to come through from the
01:05displacement texture.
01:06So to create the node, I'll go to the mental ray Approximation Editor and under
01:11Subdivision I'm going to press the Create button.
01:14As long as I have the surface selected here in the scene, it's going to
01:17automatically apply this node to the surface, so I'll just choose Create and
01:21then it creates the node and it opens up in the Attribute Editor.
01:24There are several methods for creating a subdivision approximation. I'll just
01:29leave it at Parametric because that usually works pretty well for me and I am
01:33going to leave N Subdivisions at 2. What this setting basically determines is how
01:37many times a surface is going to be subdivided during the rendering process.
01:41So I actually start with a value 2, and then if I need more, I can adjust it upwards.
01:45So now that has been applied, the next thing I need to do is hook up the
01:51displacement texture to my shading network.
01:53So I'll select the surface and open up the skinShader and what I need to do is
02:00I need to get to the shading group node above the skinShader, so I am going to
02:03Hypershade, right-click over the skinShader, and choose graph network.
02:08Let's take a look at the work area, so I am going to zoom in here and I'll
02:14select the skinShader and choose Graph, Input and Output Connections, and now I
02:18can see there is the shading group node right there.
02:21So, I'm going to click on the checkerboard icon next to Displacement material in
02:26the misss_fast_skin_maya_2SG node. Actually what I might do is rename that real quick.
02:32Let's call this skinShaderSG. There we go.
02:36Now I'm going to click on the checkerboard icon next to Displacement.
02:41I'll choose File. I don't need to do anything here. I'll go to the file node and I'm
02:48going to click on the folder next to Image Name, and I'm going to use the
02:53madHatter1-DM.tif. This is a file that was created in ZBrush, where I also
03:00created the character. So I'll choose Open and this applies it.
03:04I'm going to turn the Filtering to off, and since displacement maps take a while
03:10to render, let's just select a region and render just part of the image.
03:15Okay, this looks pretty good. Let's render the whole image. There we go.
03:18It looks pretty good.
03:20What happens when things go wrong?
03:22Let's take a look at a few things that might go wrong with that
03:25displacement textures.
03:26Now for one thing, if you don't have Alpha Is Luminance checked, this can
03:30sometimes cause problem, so I'm going to deselect Alpha Is Luminance and
03:35render a region again.
03:36So you can see now what we have is something that looks like from a medical
03:42oddities textbook, so definitely a problem, and this is something that you can
03:47frequently encounter when you're rendering with displacement maps especially if
03:51they have been created in other programs.
03:53Now if Alpha Is Luminance is off, then it doesn't know how to interpret the
03:57alpha values to create the amount of displacements.
04:00You want to make sure that Alpha Is Luminance is turned on.
04:03Another common problem can be the settings with the Alpha Gain and the Alpha Offset.
04:07In this case a value of 1 and a value of 0 works just fine.
04:12But depending on how the displacement map is made some programs interpret the
04:17light and dark values of displacement textures differently from Maya.
04:20ZBrush has been updated so that a value of 1 and a value of 0 usually work
04:26fine, but if you're using an older version of ZBrush, you might also encounter
04:30a similar type of bloating when you render even when Alpha Is Luminance is turned on.
04:35So in this case, what you want to do is set the Alpha Offset to minus one-half
04:40of the Alpha Gain, so this would be - 0.5 and this would be a value of 5.
04:46In this case, it's working just fine, so I don't need to adjust those.
04:49So that's another frequent problem that you have. You might want to check how
04:53your program interprets displacement values.
04:56The way Maya works is that a value of black, in other words a zero value, means
05:02no displacement. A positive values means displacement outward, so lighter values
05:08means displacement outwards and negative values mean displacement inwards.
05:12Some programs create displacement maps where a value of gray is no
05:16displacement, values lighter than gray displays outwards, and values darker than
05:22gray displays inwards.
05:24So in this situation if you're using a displacement map created in a program
05:28such as this and this is how ZBrush used to interpret displacement maps, you'd
05:32have to adjust the Alpha Offset so it's minus one-half of the Alpha Gain.
05:36Therefore I'm putting adjusting the values so that they go into the negative range.
05:40The other thing you need to look out for is a displacement map is affected by scale.
05:44So in other words, if this is a character that I needed to scale later on for
05:49some reason, like let's say it decided to grow really large in scene or I
05:52needed to adjust to scale to fit him into another scene, you'll need to adjust the Alpha Gain.
05:57An easy way to do that is to set the Alpha Gain equal to the scale X of the object.
06:04So in other words the object itself is called oldMan. This is the name of the
06:09character in this version of the scene.
06:11So what I would need to do is go into the file texture used for the
06:16displacement, this texture right here, and one way you could do this is I
06:23could type in =oldMan.scaleX;.
06:30And you can see this turns purple, meaning there is an expression. So that means
06:34that if I start to scale the oldMan up or down, the displacement texture
06:40automatically updates.
06:41So now that the oldMan is scaled up to 1.77 in X. The Alpha Gain is adjusted as well.
06:48So that's something that you need to be aware of.
06:52And then finally if you've find that your displacement map is lacking the detail
06:56that you think it should have, you can adjust the number of subdivisions, so I
07:02can pump this up to 3 and do another render. This will add to render time so you
07:07have to be careful, and if you make the value too high it can also cause mental
07:11ray to crash, so be careful when you start to crank that up.
07:15And there's the final textured and displaced character and it looks pretty good.
07:19I frequently get this warning here that says Failed to open texture file
07:23displacement map.tif.
07:25I believe this is mental ray.
07:26It does not like the TIF format, so you get this warning because it's having a
07:30hard time creating a little preview icon for the displacement map.
07:34However, you know if I get this warning, usually displacement works just fine,
07:38especially if you remember to go into Settings/Preferences and under the
07:43Rendering menu activate Use optimized textures.
07:46If you turn this on then displacement map should work just fine, even if you
07:49do get that warning.
07:50There you have it, a nice textured looking character, and he probably could go
07:55for some animation at this point.
Collapse this transcript
Conclusion
Goodbye
00:00Thanks for joining me.
00:01I've enjoyed presenting this course and I hope you've enjoyed following along
00:04and I hope you got a lot out of it.
00:06I wanted to point out that there are places online you can go to find more resources.
00:11One of the best web sites for Maya resources is the area which is put together
00:16by Autodesk, and under the Downloads section, if you search under Maya, you can
00:21find things like additional shader presets as well as information scripts and online forums.
00:28Thanks once again and I hope you have a good time creating realistic
00:31renders for your scenes.
Collapse this transcript


Suggested courses to watch next:

Maya 2011 Essential Training (9h 8m)
George Maestri

Photoshop CS5 Essential Training (11h 15m)
Michael Ninness



Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 98,695 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,899 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked