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