navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Creating Shader Networks in Maya and mental ray

Creating Shader Networks in Maya and mental ray

with Aaron F. Ross

 


Dive deep into the Hypershade window and shader creation with Maya and the mental ray rendering engine. In this course, author Aaron F. Ross shows how to create materials and shaders for 3D objects, characters, and landscapes, with reflectivity, transparency, and amazing texture. Become more comfortable building shader networks and open up a lot of new possibilities for creative surfaces in Maya.
Topics include:
  • Getting familiar with Hypershade
  • Making and breaking connections
  • Using mental ray materials
  • Adding reflectivity with ray tracing
  • Rendering refractions
  • Mapping translucence
  • Adding surface relief detail
  • Adjusting and combining textures
  • Constructing a stylized non-photoreal shader
  • Working with math and utility nodes
  • Rendering ink and paint with Maya Toon

show more

author
Aaron F. Ross
subject
3D + Animation, Rendering, Textures, Materials, Visual Effects
software
Maya 2013
level
Intermediate
duration
5h 28m
released
Mar 01, 2013

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

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



Introduction
Welcome
00:00(music playing)
00:04Hello! I'm Aaron F. Ross.
00:05And welcome to Creating Shader Networks in Maya and Mental Ray.
00:09In this course we will examine Maya's Hypershade Material editor in depth.
00:13We will customize core material attributes, such as Diffuse Color and
00:16Specular Highlights.
00:18I'll show you how to achieve commonly needed material effects, including
00:21glossiness and reflection, transparency and translucence, and surface relief or roughness.
00:27In the Hypershade, we will see how to work most efficiently by duplicating nodes
00:31in constructing branching networks.
00:32The Mental Ray renderer offers many advanced features not found in the standard
00:37Maya software renderer.
00:39I'll show you how to leverage its power by employing Mental Ray
00:42Specific Materials and Maps.
00:44Additionally, we'll take a look at constructing non-photo real materials for
00:48stylized artistic looks.
00:50The course concludes with an introduction to Maya Toon. Maya's feature set for
00:54building Shader Networks is deep and powerful.
00:57I'm looking forward to sharing my knowledge with you in creating Shader Networks
01:01in Maya and Mental Ray.
Collapse this transcript
Setting up the course project
00:00We will need to set up a project folder for this course, and in fact, basically
00:04you will always need to set up a project folder in Maya.
00:08And the reason that you need to do that is so that all the links to the various
00:12files, such as textures are preserved, regardless of where your files are.
00:19Maya relies upon the project folder structure at all times.
00:23So you need to observe that procedure always.
00:26If you don't have access to the exercise files and you're not a premium
00:30subscriber to lynda.com, then you'll need to create your own project folder.
00:36Let's do that first, I will show you how to create a project folder.
00:39Go into the File menu and choose Project Window. This will tell you what your
00:45Current Project is and where it is.
00:48I have just got the default project in the current users documents Maya Projects folder.
00:53I'll create a New Folder by clicking on New.
00:56And I will just put it in the same location here, just in that default location
01:00on the C drive, but I will give this a new name here.
01:04And let's call it shader_networks_Project.
01:10Then we'll simply click Accept. Two things have happened now; a series
01:14of folders have been created for the various types of assets; and Maya is now
01:19pointing at that folder as it's sort of root or home-base.
01:23So let's take a look at that.
01:24If minimize Maya, you'll see here is the folder that I just created. It's in My
01:30Documents maya projects.
01:33And there is shader_networks_Project.
01:35As you proceed through the course, you will want to save scenes into scenes.
01:40When you build textures, you will need to put your images inside of the
01:45source images folder first, before you build the textures.
01:49So that's if you need to create one from scratch.
01:53If you are premium subscriber and you can use the exercise files that come with
01:58the course, then I've already set that up for you. Here is the exercise files
02:02folder, I have just got that on my Desktop here.
02:05And you can see if I open up Scenes, there's a whole bunch of scene files inside there.
02:10And if open sourceimages, likewise, you will see that there's a lot of texture
02:14files inside there currently.
02:15So I will go back to Maya, just hitting Alt+Tab to go back to Maya.
02:20And if you just want to point to an existing project folder, go to the File menu
02:25and choose Set Project.
02:28And then you just need to navigate to wherever that project is. That's going to
02:31be, in this, case on the Desktop. Click on that and just select the root of that
02:36exercise files folder and click Set.
02:39And now, if you choose File>Open Scene, it'll take you directly to the
02:44current project scenes folder, and then you can go ahead and open those
02:48scenes. I will close that.
02:50One last thing I would like to mention is you might notice that I'm using a
02:54different interface in Maya than the default user interface.
02:59The default user interface in Maya currently is white text on a black
03:04background, and I'm not a big fan of that, frankly.
03:08I think it causes eye strain and it's harder for me to my work done.
03:12I really prefer the old-school black text on a white background.
03:16And you do that by modifying the shortcut to Maya.
03:20I am not going to cover how to do that in this course. If you're interested
03:24in using a Maya interface other than the default, you can set that up.
03:29I covered that in a different course, which is Maya 2011 Creating
03:34Natural Environments.
03:35And I talk about how to do that on both the Mac and on Windows.
03:40We have setup our project and we are really ready to begin now
03:43with Creating Shader Networks in Maya.
Collapse this transcript
1. Hypershade Interface and Workflows
Creating a reference to save disk space
00:00Before we really get started in earnest in Creating Shader Networks in Maya,
00:05I want to talk a little bit about referencing files.
00:09This is a method whereby you can load one scene into another scene, and it's
00:13very useful in cases where you're basically just reusing the same data multiple times.
00:20That's what we do in this course, in fact.
00:23We've got almost 90 movies and the sample scene that I'm providing is 30 MB in size.
00:31I really don't need to save that out 80 or 90 times, that would be
00:36unnecessary and redundant and it would increase the download time significantly.
00:41So to save disk space and to save you the trouble of having to download
00:45gigabytes of data, I'm using referencing in almost all of the scenes in this
00:50title, in this course.
00:51So here is how referencing works.
00:54You've got a blank scene or a scene that maybe has stuff in it, but you're going
00:57to link to another scene that's external to the current scene.
01:02Do that by going to the File menu and choose Create Reference, click on that.
01:08Now I get a dialog that's very similar to the Open File dialog.
01:12I want to scroll down in the Options here to show you something, Namespace Options.
01:17There is a very important switch here that's new in Maya 2013, and I want to
01:23make sure that it says Merge into selected namespace.
01:27What that's going to do is it's going to bring the referenced data in and it's
01:32not going to mangle the names of the nodes.
01:36In the past what would happen is it would prefix the referenced file name on
01:42each and every node, making it very, very difficult for you to figure out what
01:47you're looking at, because every single node would have a name that began with
01:52the filename that you're referencing in.
01:56But now we have this wonderful switch, which is on here, meaning that it's not
02:01going to do that anymore, it's just going to bring the referenced data in and
02:05it's not going to mangle the node names. So that's good.
02:08Let's scroll down here and the one I want to bring in is called
02:11still_life_master_reference, and that's the one that I'm using throughout
02:15almost all of this course.
02:17Click on that and click the Reference button.
02:21And now you'll see we get a whole bunch of data in here;
02:24we've got all these geometry and cameras, and there's no shaders in here, there
02:32are no materials in here currently to speak of.
02:34Press the 5 key so we can see the Shaded View.
02:38So that's just the process of referencing.
02:41If we go back into the File menu, we can choose the Reference Editor,
02:48open that up, and this shows me which references are currently in the scene
02:54and whether they're loaded or not.
02:56If I tick this little checkbox off, it just basically unloads the reference
03:02from memory, but it doesn't remove the link proper, and I can just click this
03:07again and reload that reference.
03:10If I wanted to completely delete that reference, I could select it and press the
03:14Delete button up here, Remove that reference.
03:17Or if I wanted to add another reference, I could also do it through this dialog.
03:21I could click to Create a reference.
03:23For example, I can load in my lights. I've got another reference here that says
03:28still_life_lights_interior_01, go ahead and click to reference that in.
03:34Now you'll see I've got some area lights in my scene.
03:38If I press the 7 key, we'll see that lighting.
03:42You don't really have a lot of control over the referenced data.
03:47In other words, I can do things like move stuff around, or maybe change some
03:52attributes, but that's not really a good practice.
03:54Basically you want to leave that reference alone.
03:58You can assign shaders to it, or you can change some attributes if you want,
04:02but it's best practice to not make major changes to the referenced file data
04:08or the referenced models.
04:10And sometimes you'll try to do stuff like that and you'll get a warning,
04:14Maya will say, sorry you can't do that on a referenced file.
04:18So that's just the basic process of referencing.
04:20Again, I'm doing that throughout this course to save disk space.
04:24If I save this out now, let's save it as,
04:28we'll call this 01_01_reference_finished.
04:39That's going to be a very, very small file. To prove that to you I can go
04:44into Windows Explorer, or I could just go into the Open Scene dialog,
04:50just to show you this file size here,
04:51reference_finished has a size of 85 KB, t's a tiny, tiny, tiny file.
04:58Scrolling down to the bottom and you'll see the file that's been referenced in
05:02the master scene is 33 MB. In fact, almost all of these that you see here
05:09are referencing that 33 MB scene file.
05:13So instead of having 80 or 90 scene files that are all 30 MB in size, I've got
05:19just a few that are very large and then the rest of them are using referencing
05:24to keep the file size down.
05:26As you can see, these are 0.1 MB in size.
05:30Okay, so that's just basically how referencing works in Maya.
05:33I'll be doing that throughout this course.
Collapse this transcript
Getting familiar with the Hypershade
00:00Let's spend some time getting familiar with the Maya Hypershade.
00:04Hypershade is a window that allows you to create and edit materials.
00:10You'll see that in this scene I have no objects. There is no geometry currently
00:15in the scene, but I've got lots of materials actually in the Hypershade that
00:19I've created previously.
00:21That's actually an indicator that a Maya scene file can include lots of things.
00:26It could have objects, meshes; it could have animation;
00:30or it could just be only a material library. And that's what this particular scene file is.
00:35Let's open up the Hypershade, let's go to Window>Rendering Editors>Hypershade.
00:43Let's maximize that to get a little bit more screen area.
00:46The Hypershade is made up of three main areas.
00:50You've got the tabbed areas up here, and this will show us all of the materials
00:56and other shading nodes in the scene.
00:59I could click here, for example, on Textures and we'll see all the textures in
01:03the scene, or Utilities, we can see all the utilities.
01:07There are other things too;
01:08for example, Cameras, those can be displayed up here as well.
01:11If I had lights, they would be shown here too.
01:15So this is our main area of the Hypershade interface.
01:19Then below that is the work area, and this is where you will graph networks
01:23and make connections.
01:24Over here on the left you have a section where you can actually create
01:29different shading nodes, and you'll see that there are lots of them here.
01:33This is all of them listed.
01:34If I scroll down here you'll see that there are many, many, many, many
01:39different options here for shading nodes.
01:42And at first, this might be a bit intimidating.
01:45I have to admit that the first time I opened up the Hypershade I was left a bit
01:50perplexed, because I didn't even know where to begin.
01:53I saw that there were so many possibilities here that I was frankly a bit intimidated.
01:58But the reason that these things are all here is because it gives us the freedom
02:02to create what we need to create. We're not limited.
02:06It's better to have more choices than fewer, especially in a professional 3D program like Maya.
02:12So as you work in Maya and you get familiar with the Hypershade, you'll kind of
02:16build up a tolerance to the sort of overwhelming nature of it; and over time
02:22it will become second nature. You become accustomed to that.
02:26You'll see also that there are categories here. I could click on each one of these
02:29and that will just filter the list here so we only see those types of shading nodes;
02:34for example, like a Surface Material or 2D Textures.
02:39That's the basics of the Maya Hypershade interface. We're going to learn how to
02:43create shading nodes and connect them in subsequent movies.
Collapse this transcript
Creating shading nodes
00:00Let's create a shading node and apply it on to this tablecloth object.
00:05I will go ahead and open up Hypershade, Window>Rendering Editors>Hypershade.
00:12And you can see here now in this version of the scene, I've got nothing in here
00:16except for three default shading nodes.
00:19You will see lambert1, particlecloud1 and shaderglow1.
00:25Those are Read Only nodes that exist in every Maya scene.
00:30You cannot really do much to these.
00:33You can't rename them, you can't delete them.
00:36They're there as the defaults for new objects.
00:39So when you create a new mesh object or NURBS object, it's going to have the
00:43lambert1 material assigned to it. Or, if you create a new particle system, then
00:49when you choose a cloud particle, you'll get this particle cloud shader
00:53assigned automatically.
00:54So these are the default shading nodes.
00:57We want to create a new shading node and apply it on to the tablecloth.
01:02And there are two main ways of doing that;
01:04one is from the Hypershade.
01:06And all you've got to do is just click on one of the nodes over here to create it.
01:11So for example, if I wanted to create a shader that did not have any
01:15highlights, I would click on Lambert here.
01:18That's a material that doesn't have any highlights.
01:21That's lambert2 currently.
01:24What I want to do is actually open up the Attribute Editor and change the look
01:29of this lambert2 material.
01:32With that node selected here, I can hit Ctrl+A to open up the Attribute Editor.
01:36I can just change the color for example.
01:38Maybe I would open up the Color Picker here, and change it to some other hue,
01:47lavender color and maybe rename it while I am at it.
01:51Maybe I will call that lavender_lambert.
01:54I strongly recommend that you always rename everything immediately after you make it.
01:59Otherwise, all your scenes are going to have everything named lambert2,
02:04lambert3, lambert5, and you'll have no idea what you're dealing with.
02:07I very strongly recommend that you rename everything as you go, and hit the
02:11Enter key in there too to make sure that, that actually takes.
02:14So now I can assign the material and close the Attribute Editor.
02:18There's numerous ways of assigning the material to an object.
02:23One way is to simply drag and drop.
02:26But to drag and drop, you'll need to use the middle-mouse button, and this is
02:29pretty common throughout Maya.
02:31You can't just use the left-mouse button to drag and drop.
02:35You will need to hold down the middle-mouse, and then drag over on to the object.
02:40Now that's actually assigned. Let's minimize the Hypershade.
02:44In order to see that, we'll need to select one of these panels and press the 5 key.
02:50And when I press the 5 key, of course, I'm going into a Shaded mode.
02:54Now we can see that in fact that is assigned.
02:57We've got that lavender_lambert assigned.
02:59I will tap the spacebar and just make that bigger.
03:02There is another way that we can assign materials.
03:04If I go back to the Hypershade, we make a new material, a second one.
03:08I will click on let's say Blinn, that will give me some shiny highlights, and
03:13now I got a new Blinn material.
03:15Once again opening the Attribute Editor and renaming this.
03:18Let me call this one crimson_blinn or something like that, and change up this color.
03:26Give that a dark red color, and then assign it to the object.
03:33I can assign it a different way.
03:35I can just go ahead and select the object and then right-click on the
03:40Shader node, and I get the Marking menu, which is the context-sensitive right-click menu.
03:47You will see one of the options is Assign Material to Selection.
03:51And as soon as I do that, it's assigned.
03:54This is helpful because, for example, I could select a whole bunch of objects in
03:58my scene and then right-click and assign them all at once.
04:02I can also assign from this Materials section up here.
04:04I don't have to be in the work area.
04:07If I select my object, I can go up here and right-click and choose Assign
04:10Material to Selection, and that does the same thing.
04:13So that's one way I can create shader nodes and assign them to an object.
04:18There is an even quicker way of doing that which is directly in the viewport you
04:22can select your object and right-click, and you will see Assign New Material
04:28or Assign Existing Material.
04:30If I choose Assign New, it's going to create the new shading node and
04:34additionally assign it in the same action.
04:38So when I release my mouse button, I get a dialog it opens up, and it looks
04:42just like that Create section we saw in the Hypershade.
04:45This is the Assign New Material dialog.
04:48Let's make it a Lambert material.
04:49I will click on that.
04:51It's assigned and the Attribute Editor opens automatically, so that's convenient.
04:56And then I can go ahead and play around with color for example, or give this a new name.
05:01I'll call it green_lambert or something like that.
05:03I can play around with the color here, assign that.
05:09But the thing is that while the object is selected, it's going to be
05:13highlighted and it might be difficult to tell what you're doing because the
05:18color of the shader is going to kind of fight with the wireframe color here.
05:23Selected objects in Maya are always lit up in a Wireframe mode, and either in
05:29white or in green depending upon whether it's the most recently selected object or not.
05:34So that's kind of problematic.
05:35But I am going to show you how you can kind of work around that.
05:39If you want to continue making adjustments to your Attribute Editor, what you
05:43can do is you can copy the Attribute Editor off to its own tab down here.
05:47I will click on Copy Tab.
05:50Now green_lambert is in its own window, and I don't even need the Attribute
05:54Editor anymore, and I can even close it.
05:56I can deselect the object.
05:58Now I can see what I'm doing.
06:03So that's how you can create and assign shading nodes.
Collapse this transcript
Using the Hypershade with the Attribute Editor
00:00Let's look at how to integrate the Hypershade and Attribute Editor panels.
00:06I'll assign a new material to my tablecloth here;
00:09select it, right-click and choose Assign New Material.
00:13I'll make it a Blinn material, which will have shiny highlights, click on that.
00:16And I'll rename it, and I'll call this one tablecloth_blinn.
00:23As always in Maya, you can't use white space, you've got to put an underscore in, and press Enter.
00:28Now I want to add a map to this particular shader here.
00:33So a map of course is some data that's going to vary a material property across its surface.
00:39For example, we could assign a defuse color map to change the color of the
00:44object so that it's a different color in one place than in another.
00:48We can of course use different types of maps.
00:51Let's use a file map because that's the most common.
00:55One way to do that is directly from the Attribute Editor.
00:58I can click over here on one of these little checker icons, and that will create
01:02a new shading node, and connect it to that material attribute.
01:07I'll click here to add a render node, and I get a dialog popping up, Create Render Node.
01:14And let's make it a file texture.
01:15I have got some files already in the exercise files folder.
01:20So I can create a File node.
01:23So I'll click on File, and the Attribute Editor opens to that file node's
01:28properties, and I'll need to browse to load that file in.
01:33I'll click on the little Browse Folder button.
01:35It takes me directly to my current project source images.
01:39Here it is, Exercise_Files>sourceimages.
01:42It's of critical importance that you've placed your images in your current
01:48project source images before you get to this point.
01:52If you start navigating around to try to find your files somewhere else on your
01:56hard-drive, then to put it bluntly, you're doing it wrong.
02:00You cannot do that in Maya.
02:02You need to keep all of your images inside the current project source images.
02:06That's the only safe place to put them.
02:09If you link to a file that's somewhere outside your current project,
02:13then it's almost guaranteed that later on that link is going to get broken.
02:18It's very, very important that, again, you've placed all of your images inside
02:22source images before you get to this stage.
02:26So let's see if we can select one of these.
02:28Let's try, I've got pattern_seamless_victorian_black_and_white.
02:34Click on that, and click Open.
02:36Now that's actually been assigned, but I won't see it in the viewport currently
02:41because I'm only seeing a shaded view.
02:43I want to click in the viewport and press the 6 key, and now I can actually see that texture.
02:50So of course, 4 is wireframe, 5 is shaded without texturing, and 6 is shaded and textured.
02:58So that's one way that you can use the Attribute Editor to create shader nodes.
03:04Let's look at that through the Hypershade, and we'll do it again in Hypershade.
03:08Go in Window>Rendering Editors>Hypershade.
03:12And let's make another material.
03:15I'll create another Blinn, click on Blinn. Then if that's selected, then I
03:20can change its attributes over here, and I'll call this one tablecloth2_blinn.
03:29I can follow a similar process except I can create the nodes from here in the
03:34Create panel of the Hypershade and then I can drag them over to wherever they
03:39need to be in the Attribute Editor.
03:42I'll create a file map, and that's in the category 2D Textures, click on that,
03:47and then click File and it creates the File node.
03:51I can back out here a little bit using either the wheel, or the Alt and
03:56right-mouse button. I can move these around a little bit with a left-mouse button.
04:02You can see that not only was a File node created, but also a Placement node.
04:07That just allows us to control the tiling and other attributes of how this
04:122D file is going to appear on the surface.
04:16So I'll click on File, that File node and I want to browse for a file.
04:21It takes me back to my current project source images, and let's try something else.
04:26Let's do this masonry.
04:29This is going to look a little bit interesting with masonry applied to that,
04:32but it's just a demo.
04:33So you'll see now I've got file2, it's got something in it, very good.
04:38Then I can select the shading node so that I can see it displayed in the
04:43Attribute Editor, and then to connect this, I'll middle-mouse+drag the File node
04:49onto the color of the material, middle-mouse+drag-and-drop.
04:55And the safest thing to do is to drop on to the actual name.
04:59Sometimes when you do this in the Attitude Editor, if you drop it on to some
05:03other area, it might not take.
05:05You just need to make sure that you see a dashed line outlining the attribute
05:08that you want to map. I'll middle-mouse+drag and release and that
05:12connection has been made.
05:14Now I just want to assign that to the tablecloth.
05:18So again, I can middle-mouse+drag-and-drop, and there you go.
05:22I've got masonry on my tablecloth.
05:25That's the basics of how you can integrate the Hypershade with the Attitude Editor.
Collapse this transcript
Setting viewport render options
00:00In order to see what you're doing in the viewport, you will probably need
00:03to change the options for the Viewport Renderer or the Display mode for the viewport.
00:10And you will find that certain modes may support certain material types or
00:15texture types, and other modes may support other material or texture types.
00:20So you kind of have to feel your way through this.
00:23If what you see in the viewport doesn't look right to you, you can choose one of
00:27the other viewport rendering modes.
00:29A good example of this would be a procedural texture like a fractal noise pattern.
00:36A procedural texture is one that's generated internally by the 3D program, by
00:41Maya in this case, and that's not referring to an external file like a bitmap.
00:46So let's create a new procedural material here.
00:49So I'll select my tablecloth, and right-click and choose Assign New Material.
00:55I'll make it a Blinn material, and I'll rename this, and I'll call it fractal_blinn.
01:02And then in the color channel, I'll click to create a new render node, and it
01:06will be a 2D Texture called Fractal.
01:10Now that's been assigned. I won't see it in the viewport unless I actually give
01:15focus to the viewport and press the 6 key.
01:17So I want to click in the view and then press 6.
01:21So that looks kind of fuzzy, it doesn't look so good.
01:24I know actually, that my texture looks a lot better than that, and I can test
01:28this by doing render here.
01:30I can click to render the current frame by clicking on this clapboard.
01:34So I know that in fact it's a lot better looking than what we see in the viewport here.
01:38What I'll do is I'll change the Viewport Renderer.
01:41Within each panel, you've got a panel menu, and one of those items is Renderer.
01:49You'll see I have three choices;
01:50Default Quality is the safest one but also the lowest quality.
01:55It's really compatible with almost everything, but as you can see, it's
01:59looking pretty fuzzy here.
02:00Let's try High Quality Rendering.
02:02So that's much better.
02:04That's a much better approximation of what we would expect to see.
02:08If we dolly in really close with Alt and right-mouse, we can see that it's still
02:12a little bit fuzzy however.
02:14We can improve that quality by going in to the High Quality Render Settings,
02:19going into those options.
02:20I'll go to Renderer>High Quality Rendering, and click on the Option box, get that open.
02:28The most important thing here is the Color Texture Resolution.
02:32Let's see if I bring it down to only 256 pixels and press Apply, you can see
02:40that I didn't really change much.
02:41But let's try cranking that up to 1024 and press Apply. There you go!
02:47So you can see that, that really came into focus there.
02:50So this is a really low number like 256.
02:53Then it's going to be fast in the viewport, but it's going to be fuzzy.
02:57If it's a high value here, it's going to be a better quality, but it will also be slower.
03:02In other words, it might impact your performance.
03:05What's happening behind the scenes here is that the fractal noise texture, which
03:10is a procedural pattern, is being rasterized.
03:14It's being down-sampled before it gets sent out to the video card.
03:18The value here determines the resolution of that texture that gets sent to the video card.
03:23It does really need to be a power of two value, in other words 256, 512, 1024, and so on.
03:32If I move this slider here, I'm allowed to choose random values, but I
03:36really don't recommend that.
03:37It really should be powers of 2.
03:39Now you might be tempted to crank that resolution all the way up to its maximum
03:45of 2K or 2048 pixels.
03:48But if you do that, you may experience performance issues.
03:52It actually took a moment for Maya to think about that.
03:56It had to actually calculate behind the scenes, and in this case, I've got a
04:01pretty trivial scene, and I've got a pretty fast computer, so I am not noticing
04:05a lot of performance degradation.
04:07But I just want to mention I don't recommend that you really ever turn that up to 2048.
04:13I think the sweet spot is 512 or 1024.
04:18So those are the options for a High Quality mode.
04:20There's a third mode in here in the Renderer menu here, and that's Viewport 2.0
04:27and I'll activate that.
04:29Viewport 2.0 is a newer Viewport Renderer, and it can also be used for offline rendering.
04:36In another words, you could do a batch render that looks just like what you see
04:40in the viewport, and that's a very fast renderer.
04:43The Viewport 2.0 options will control the quality of the texture and also
04:48things like anti-aliasing.
04:50If you look really closely around the edges here, you may notice some
04:53stair-stepping or some jagged edges.
04:56We can improve that.
04:57We can go into the Renderer menu to Viewport 2.0, and choose the options there,
05:04and we've got for example the Color Texture resolution once again.
05:10So I can crank that up to let's say 1024, and getting closer, we can see the difference.
05:15I'll click the button that says Re-bake All Textures.
05:19By baking what is meant here is, again, it's simply down-sampling or
05:23rasterizing that texture before it gets sent out to the video card, or the GPU.
05:29I'll click on Re-bake All Textures, and it thinks about it for a second and now
05:34we've got a better quality display there on that color texture.
05:38Then also the other thing to look at is anti-aliasing.
05:41So you can see there's a little bit of jagged edges around here.
05:45What I can do is go into a section in the Hardware Renderer 2.0
05:51Setting>Multisample Anti-aliasing, open that up, and I can enable it.
05:57What that does is it basically smooths out the edges of objects.
06:02I could increase the Sample Count too, and that would really produce a very smooth result.
06:07That would be perfect in fact if we wanted to render this out using a batch render.
06:12Well, those are our display options for the viewport.
Collapse this transcript
Using the Render view
00:00As we work on Shader Networks, we will need to do lots of test renders.
00:05For that reason, we will need to get more familiar with how the Render View works.
00:10Our options for rendering the current viewport are found up here on the Status
00:15Line and we've got several different variations on this clapboard.
00:19The one on the far-right is the Render Settings window.
00:22It's got two little dots next to it.
00:24They are supposed to represent radio buttons.
00:26When I click on that, it opens up the Render Settings.
00:30Here I can choose which renderer I want to use such as Maya software, and I
00:34can choose things like the quality.
00:37I will just leave that at Preview Quality currently.
00:40Lots of other options in here, such as whether Ray Tracing is turned on,
00:44that we will be able to calculate reflections and refractions.
00:48I want to leave that off in this case.
00:50So that's the Render Settings dialog, and it includes things like, in the Common
00:54Tab, if you want to save out a file, what file format, and which camera, and
01:00what resolution and so on.
01:04To do a test render of the current view, you can just click on the clapboard
01:08that has nothing on it.
01:09I'll click on that, and we'll get a rendering, and that was pretty quick.
01:14In that Render View, one of the most useful things you can do is store the
01:18current image in memory.
01:20To do that, I can click here, Keep Image.
01:23Once I click on that, now I get a little bar down here, and I can keep doing
01:29that when I render a new image.
01:30I can keep it and click on Keep Image.
01:33I can sort of move through the different versions of my rendering and compare them.
01:38To illustrate that, I am going to assign a different material to my tablecloth.
01:44So I will click on it to select it, and then right-click, and choose Assign
01:48Existing Material, one of these ones that I've already got. Let's do crimson.
01:52So now that new material has been applied.
01:56I can do another rendering.
01:57In the Render View here, I can just click the clapboard.
02:01Now I've got a crimson version, and if I want, I can store that by clicking Keep Image.
02:07Now down here at the bottom, I've got the little slider, and I can move that
02:11back and forth to go through the different renderings that I've created.
02:15Notice by the way, that I've got two Crimson ones here.
02:19This is just a little bit unexpected. What you're seeing here is that once you
02:24click Keep Image, you will actually have two copies of that image.
02:28The one that's visible when the slider is on the very far-left is actually one
02:34that's not really stored in RAM.
02:37It's sort of stored in RAM, but not really.
02:39So that's why you have sort of two of them here.
02:41It's a bit confusing.
02:42If I do another material, I can right-click and choose Assign Existing Material,
02:47and go to the fractal_blinn, and do another rendering.
02:52Now you'll see that I don't have two crimson ones anymore.
02:56The one on the far-left is the most recent rendering.
02:59Every one that's to the right of that is one that's actually been kept or stored.
03:04So if I want to keep that, I will click on Keep Image.
03:07So that's how you can use the Render View and compare different versions.
03:12We can also use the Render View to create what's called an Interactive
03:16Production Rendering, and that will use the current settings in the Render
03:21Settings dialog, and it will re-render the current image interactively.
03:27That way, I can make changes to my material and lighting and be able to see
03:31those changes reflected immediately in an almost perfect representation of what
03:36it will look like when we do an actual batch render.
03:40Let's close the dialog, and I'll reassign one of my other materials.
03:44It will just be faster performance if I use a material that doesn't have a map.
03:49I will choose Assign Existing Material.
03:51I will go back to the green_lambert material.
03:54I want to do an interactive production rendering.
03:57So I can click here on the clapboard that's labeled IPR, click on that.
04:03If I'm using Maya software, it will render the entire frame, and then I've
04:08got a select part of the frame to update.
04:11You will see it says Select a region to begin tuning.
04:14I will need to drag a rectangle to select the area that I want to re-render as I make changes.
04:21So I will go back over into the main viewport, and make sure that I've selected
04:25my tablecloth and press Ctrl+A to open up the Attribute Editor.
04:29If you don't see the Shading Node, which is green_lambert, you might need to
04:32select one of these other tabs here as you can see there are lots of them.
04:36So you might need to tab over to find the Shading Node.
04:40So if I make changes here such as the color, you can see that, that's updating
04:44immediately in the Interactive Production Renderer. Very useful!
04:49If you've got textures, you're probably going to want to disable textures in the
04:54viewport, or, if you've got complicated shader or perhaps if you're using High
04:59Quality mode, I would recommend that you set your viewport to a Wireframe mode
05:05while you're doing an interactive production rendering.
05:09So I could click over here to give focus to that, and press 4 to show just
05:14wires in that view, and reselect the object.
05:18That's just going to give me faster performance in the Interactive Production Rendering.
05:22I can also create an IPR render directly from here.
05:25So I can click in the Render View.
05:28The same process applies;
05:29I drag a rectangle and then I can make adjustments.
05:33The Maya Software IPR does not support Ray Tracing.
05:38So if you've got ray traced reflections or refractions or ray traced shadows in
05:43your scene, then in fact, the IPR will not work at all with Maya software.
05:50That is a major limitation in IPR.
05:52However, the workaround is to use mental ray.
05:55I can choose a different renderer from here, or from within the Render Settings dialog.
06:00If I choose mental ray, and click IPR, then it's actually better additionally
06:07because it doesn't have to render the entire frame first, it just shows it in
06:12wireframe, and then I get to draw a rectangle and that will update now
06:16as I make these changes.
06:18Mental ray IPR does support ray tracing.
06:21So if you've got reflections, refractions or ray traced shadows and you want to
06:27test them out in IPR, then you will need to use mental ray to do that.
06:32One final note, we can open up the Render View without actually executing a new render.
06:38Sometimes renderings will take a really long time, and you don't want to create
06:42a new render, you just want to open up the window.
06:45You do that by clicking on this clapboard that's got a box around;
06:48that's supposed to represent the dialog box itself.
06:51I will click on that and it simply opens the Render View without doing a new rendering.
Collapse this transcript
Graphing networks
00:00To work in Hypershade you'll need to graph the networks of your materials.
00:06Let's go ahead and open up a Hypershade.
00:08Window>Rendering Editors>Hypershade.
00:11You will see in this scene I have got lots of materials.
00:14You will notice by the way, that some of these are in red and that's an indicator
00:19actually that those materials cannot be rendered using the current renderer.
00:24In fact, these are all in this case, mental ray materials and my current renderer
00:30is Maya software and these are not renderable in Maya software.
00:36That's why they're highlighting in red.
00:38So don't let that disturb you.
00:40It's not going to affect our lesson here.
00:42In fact, later what we'll do is we'll put those into their own bins.
00:45So we can filter the view here so we don't see those if we don't want to.
00:50So let's graph a network.
00:52There's multiple ways to do that.
00:54One way is to simply select a material in this tab here and graph the network
01:01directly by right-clicking and choosing Graph Network.
01:06Now you can see all of the shading nodes that make up that shader.
01:11It's got a texture placement, it's got a procedural texture, a bump node that
01:15creates the roughness, and then the material itself.
01:19That's one simple way to graph a network.
01:22We can also graph networks on selected objects in the scene.
01:27If I select the tablecloth for example, and then in Hypershade I can go up here
01:33and there is a button that says Graph materials on selected objects.
01:39I can do that from the menus up here, too, Graph materials on selected objects.
01:44But I usually use the button, because it's much quicker.
01:47So I will click on that.
01:48Now we see the Shader Network for the tablecloth and it's a little bit more involved.
01:53By the way, we will learn all about how to build these networks and what all
01:57these nodes mean later.
01:58So don't panic just yet.
02:00It's not really necessary for you to understand at this point what all these things are, what they do.
02:05We just want to learn first how to graph networks.
02:08So that's another way we can graph a network.
02:11We have got stuff here in our work area.
02:14If I selected a node here and deleted it to clear the graph out, I would
02:19actually delete the node from my scene.
02:22So if I press the Delete key on the keyboard here now that's broken my scene.
02:27The tablecloth turns this sort of forced green color and that's actually a
02:32visual indicator that the object has no material assigned to it.
02:37As such it's not renderable at all.
02:40So I don't want to delete nodes from the work area here.
02:44Let me undo that, and instead of deleting, if I need to clear this out I have got
02:50a button up here, Clear Graph and I just wipes out the work area without
02:55deleting any of those nodes.
02:56Let me maximize the Hypershade so we can have a little bit more space.
03:02You can also graph networks on multiple materials at the same time.
03:09For example, if I select the tablecloth and then Shift+Select this lemon
03:13material, I can go up here and I can click on this button here, Input and
03:20output connections.
03:22What that's going to do is it's going to show all of the nodes that are
03:26connected to those selected materials.
03:29So click on Input and output and now we see all of this.
03:34We can move these around, we can select these and move them and just organize this.
03:42Sometimes things will get a little messed up.
03:45You can just clear this up and tidy it up by clicking up here on Rearrange Graph.
03:52I will click on that and now everything's been made neat and tidy once again.
03:57If I want clear that out again, I can just click Clear Graph.
04:02So I can select multiple materials at once and see all of their shader trees or
04:08shader networks by clicking on Input and output connections.
04:13For example, I can click on apple_blinn here or I can click on this drapery.
04:19I can Shift+Click to select those both and then display both of their graphs.
Collapse this transcript
Understanding shading groups
00:00Maya collects all of the objects that share a single material into something
00:06called a Shading Group and you just need to understand what that is.
00:11So let's open up the Hypershade and take a look at it,
00:14Window>Rendering Editors>Hypershade.
00:15Now the apple_blinn material here is currently assigned to both of the apples.
00:24If I select that and then graph its network by right-clicking and choosing
00:30Graph Network, you'll see all the shading notes including once again the
00:35texture placement, the fractal noise and some other cool stuff you'll learn about
00:40later in the course.
00:41But these are all the material shading nodes that go into this shader network
00:46or composed at shader tree.
00:49But when we graph the network in that way, we don't see the Shading Group.
00:53And to see that Shading Group what I can do is I can click on the material here
00:59in the tab and then click on Input and output connections on the Hypershade
01:06toolbar, click on that.
01:08And it graphs the same network, except this time we see something that says blinn2SG.
01:14That's a Shading Group;
01:16SG stands for a Shading Group.
01:18It says blinn2 because I didn't rename it. I renamed the material but the
01:22Shading Group doesn't rename itself automatically.
01:26So that's a collection of all the objects and materials that are shared, in
01:32other words all the objects that have a certain material applied to them.
01:36Let me just minimize this material tab a little bit so we can see a bit better.
01:43What I am going to do is, I am going to select the blinn2SG node and I'm go
01:49back up here again and click on Input and output connections because what
01:54I want you to see when I click that is that a Hypergraph and Hypershade are
02:01actually really the same thing. You might be familiar with Maya's Hypergraph,
02:05it lets you see connections between all the nodes in your scene or something
02:10called the Maya Mantra, it's a saying that goes Maya is a network of nodes that
02:16are interconnected.
02:18So everything in Maya is a node and everything in Maya is a node that's
02:22connected to some other node; there's no standalone node that's just naked and
02:26not connected to anything.
02:28When we graph the input and output connections on a Shading Group in the
02:33Hypershade, we can see things that are not materials.
02:37For example, the apple object is listed here, it's a NURBS surface shape and here
02:44is the other one apple_02.
02:46You'll see it's also connected to something called a light linker and
02:49something called a render partition.
02:52So the Shading Group in Maya is kind of like a clearinghouse, it's a way of
02:57collecting all of these things and putting all these different node types into a
03:02single container. That allows us to assign the material to multiple objects
03:08and have it be lit by lights in the scene; that is a Shading Group. If you go to the Shading Groups tab, here you'll see them all listed here.
03:18So for each material I've made I have got a Shading Group.
03:22That's all we need is see here. We just need to understand what a Shading Group is.
03:27It becomes important later on if you want to work with displacement mapping and
03:30other advanced techniques.
03:32We'll look at that later in the course.
03:34But for now it's sufficient for you to understand that a Shading Group
03:38is a collection of all objects and materials that are shared in your scene.
Collapse this transcript
Making and breaking connections
00:00We've seen how to connect shader nodes and texture nodes by middle-mouse
00:05dragging into the Attribute Editor.
00:07We also need to know how to do that from within Hypershade itself.
00:11Let's go in to the Hypershade window. I'll create a new material for the
00:18tablecloth here; click on Blinn, and let's rename it. I can do that from the
00:24channel box or the attribute editor. I'll just call this tablecloth_new_blinn.
00:31I'll create a texture node. I will go into the 2D textures and let's try a
00:37Cloth texture, click on that and that's a procedural texture.
00:41I'll rearrange the graph, clean that up.
00:43I'll use Alt and middle-mouse to navigate and Alt and right-mouse, just like you
00:49would have in the viewports.
00:51I want to connect the color of this cloth texture to the diffuse color of my shader here.
00:58To do that in the Hypershade we want to use these little arrows down here at
01:02the bottom of each node.
01:05On the right-hand side is the output and on the left-hand side is the input.
01:11To make the connection I'll go to what's going to be the input node,
01:14the think that's going to be feeding.
01:16So in this case the cloth is going be the input node relative to the material.
01:24I'll go to the lower right-hand corner to its output and right-click and
01:29choose the attribute that I want to send.
01:32In this case it's going to be the outColor.
01:35I am going to choose outColor>outColor.
01:38That's all three red, green, blue color components in one.
01:43When I release my right mouse button and move the mouse around I get a wire and
01:48it's not connected to anything yet.
01:49Then I want to go to the Destination node and left-mouse click on the lower left
01:56hand corner of the Destination node and that's its input.
01:59So I'll left-click on that and choose the property that I want to map and in
02:05this case it's going to be the color or the diffuse color.
02:09When I release the mouse that connection has been made.
02:12I can see that if I'd been middle-mouse drag the material onto the object,
02:17and you can see now I've got a cloth texture on there.
02:21That's how we can make a connection.
02:23Now let's talk about breaking connections. We can break connections by just
02:27selecting the wire itself.
02:30If it's not selected the wire will show in green if it's a single connection.
02:36If it's a multi-connection like we see here, if I hover my mouse over that, it's
02:41showing that you have multiple connections.
02:42It's showing as a thicker line in Orange. That's an indicator that that's
02:47more than one connection there.
02:49This thin one here is a single connection.
02:52So if I want to delete that I'll select it to highlight it and press the Delete
02:56key on the keyboard.
02:57I want to make sure that I don't have the node itself selected when I press
03:02Delete, of course, because then I'll blow that node away.
03:06Now we can also break connections in the Attribute Editor too.
03:10Let me select that material node and go to Ctrl+A Attributes and I rebuild that
03:16connection like I did before; right-click, outColor>outColor, left-click and
03:22connect that to color and now the connection has been made.
03:26I can also break the connection from the Attribute Editor.
03:30If I go over to any one of these mapped attributes, I can right-click on the
03:34name, not the swatch and not this button, not the slider, but the name.
03:40I'll right-click on that and choose Break Connection.
03:45That's the same as if I deleted the wire over here.
03:48It's important to realize that when you break a connection through the Attribute
03:52Editor, you're not deleting the map.
03:54You are not deleting the texture that's feeding into the Attribute that you just broke.
04:00So the cloth node still exists in my scene and it can still be accessed from the
04:06Hypershade and it can still be reconnected in the same way that we have done
04:11before, either using the right-mouse button here or using the middle-mouse
04:15button and dragging to the Attribute Editor. That's how we can make and break
04:20connections in a Hypershade.
Collapse this transcript
Using the Connection Editor
00:00Another way to make connections is to use the Connection Editor and sometimes
00:06you'll need to do that.
00:07So let's open up the Hypershade and take a look at how to make connections using
00:13the Connection Editor.
00:16So I've got that simple table cloth material that I made previously. I can
00:22right-click and graph it's network down here. Let's just minimize some of these
00:26other panels so we can kind of focus in on this.
00:30And another way that I can make connections is through the Connection Editor.
00:34If I delete this connection here I can select that wire and press Delete.
00:39Now there's no connection currently.
00:41Sometimes when you left-click on your Destination node the attribute that you
00:45want to map to isn't found.
00:47The ones that I want are all here right now, but for the sake of argument
00:52some times you will not be a will find what you want here, it's just not listed.
00:56In that case you want to choose Other.
00:59When you release the mouse on that, the Connection Editor opens
01:03automatically and it loads those two nodes in.
01:07On the left is the Source or the Input node and on the right is the Destination.
01:15We can make connections here.
01:18What I want to connect is just the color, like we did before, and this is called
01:23outColor in this case.
01:25Some of them by the way have sub attributes within them, if you click on the
01:29little (+) plus sign you'll see. If I wanted to I could connect just the red,
01:34green or blue, but in this case I want to connect all three so I'll click on the
01:38root of that outColor.
01:40As soon as I do that a lot of stuff over here on the destination side is
01:44grayed out, meaning that it's not possible for me to make that connection over here.
01:50I can only connect an outColor to another attribute that has three values.
01:57In Maya that's called a vector attribute. It's got three components, in this case a
02:02red, green and blue.
02:03Over here I want to connect to just to color.
02:07Again, if I open that up you will see I have got color red, green and blue.
02:11Again, those are not legal to make connections to because this is a
02:15three-value attribute and these are one-value attributes.
02:19But if I click on color here now, that creates the connection and you can see it here.
02:25So in Maya, in a lot of these editors like the Connection Editor, the way that
02:30you make connections is by simply clicking on the attribute and that creates the connection.
02:37You don't select it and then press a button to make the connection.
02:41The selection is the connection.
02:45If I click again, then I break that connection.
02:48You can see it happen here in the Hypershade window.
02:51Once again, I'll just select the outColor over here and click on Color on the
02:57Destination node and that creates the connection.
03:00Again, if click again, that will break the connection.
03:04Now I could connect to multiple attributes at ones, it's not a one-to-one correspondence.
03:10I could take the outColor and connect it to multiple things.
03:13For example, I could connect it to the straight up color which is the
03:17diffuse color, I could also connect it to transparency as well, and you can
03:20see transparency here.
03:23Reading this out I can tell that outColor is currently connected to both color
03:28and transparency and if I don't want that, again I can click on it to break the connection.
03:35You can also launch the Connection Editor separately.
03:38We could go into Window>General Editors>Connection Editor.
03:44But when we do it this way it won't load the nodes in and we will need to do that by hand.
03:49So I can select what I want to be the source node and then click Reload.
03:56I can choose the node that I want to be the destination and click Reload over here.
04:02Now I can go ahead and make or break those connections.
04:05By the way, you can see that this is in Italics and that's an indicator that some
04:10connection is made here in this node.
04:13In order to find out what that connection is we have to select it and then the
04:18thing that is actually connected will be highlighted.
04:22Once again I can go back to making and breaking by simply clicking.
Collapse this transcript
Organizing material libraries with bins
00:00When you build up a material library as I've done here, you might want to
00:05consider organizing your library using bins and the Hypershade.
00:09So open the Hypershade, Window>Rendering Editors>Hypershade, and as I mentioned
00:15previously, you'll see that there are a lot of these that are in red, those are
00:19mental ray materials, we just maximize the Hypershade.
00:24These mental ray materials will only render in mental ray and if I know that
00:28I'm not going to use any of those it might be a good idea for me to put them
00:33into their own bin.
00:34You can use bins to organize your materials by whatever category you want.
00:38Over here on the left-hand pane of the Hypershade we've so far only been
00:42using the Create tab. We can go to Bins and this is basically a way of filtering
00:49the display of the main tab over here.
00:52So everything is in the Master Bin.
00:54Let's just make this a little bit wider here.
00:58If I click on Master Bin I don't see any change here because everything is in the Master Bin.
01:03Well let's make a new bin.
01:06So we can go ahead up here, so we can just click to create an empty bin for example.
01:10So I'll click on that and give it a name I'll call that one mental_ray, and now I
01:18have got a sub bin inside the Master Bin.
01:21I can just middle-mouse drag materials over into here, so I can middle
01:25mouse drag this, boom!
01:27So now, that molding material has been placed into the mental_ray bin.
01:32If I click on the mental_ray bin, it's going to filter the display over
01:37here and that's important that you understand that; that the bins are just a way
01:42all of choosing which of the materials you want to see. It's not actually
01:49removing them from the scene or putting them into any kind of container.
01:53It's really just a display filter.
01:55Now if I click back on Master Bin we will see all of them.
01:59If I want to add the rest of these mental_ray materials, I can hold down
02:03Shift and select all these that have a red border and then middle-mouse drag
02:08those into the mental_ray bin.
02:10Then click on mental_ray bin and you can see that they're all included.
02:14Go back to the Master Bin and maybe I'll make a bin that only includes the
02:19Maya software compatible shaders.
02:22So I can do that in one fell swoop by selecting all of these with the Shift key
02:27and select everything that's not displayed in red here, those are all the Maya
02:33compatible materials.
02:35I can create a new bin including the selected nodes.
02:39So I will click Create bin from selected and then give that a name, and I'll call
02:45that one Maya shaders.
02:47So I know those ones will render in Maya software and click OK.
02:52Now to filter the display to see only the Maya compatible shaders, I can
02:57just click on the maya_shaders bin and there you go.
03:01Now that doesn't mean that I don't have any mental_ray nodes here in my material
03:06library. It just means that I have temporarily hidden them and I am only
03:10displaying the materials in that current bin.
03:13That's the basic introduction to how you can use the Hypershade interface
03:20to make/break connections and organize your work.
Collapse this transcript
2. Essential Techniques
Introducing the Node Editor
00:00In this chapter we'll look at a lot of essential techniques for building and
00:04editing shader networks.
00:06Before we leap into that I just want to show you a very cool, newish tool in MAYA
00:13called the Node Editor.
00:15It could be used instead of the Hypershade, if you prefer.
00:19Let's go into the Node Editor, it's under Window>Node Editor, open that up.
00:25By default its going to be blank. I can create nodes in here.
00:30I have to know the name of the node first.
00:32So if I want to create a node I can press the Tab key and I've got to actually
00:36type in the name of the node I'm looking for.
00:38If I want to create a Blinn node, I can type in b-l-i and there it is Blinn.
00:45I select it and press the Enter key and the Blinn Shading Node is created
00:50and you'll see there is also a shading group created.
00:53Likewise, if I want to make a file Node, I could press the Tab key and type in the word file.
01:00You could see here there's different types of file I want a texture files so
01:03click on file (Texture) and press Enter.
01:07Now just as we had created file textures in the hyper shade we've now got a
01:13file texture here, in the Node Editor. Its created text replacement node, too.
01:17If want to browse for a file, I could select that node and open the Attribute
01:21Editor with Ctrl+A, and then choose the File.
01:25For example, this masonry file, and click Open.
01:29Now I've got a few nodes in the Node Editor.
01:31I can connect them pretty easily.
01:34You'll see these circles here, these ports that can use to connect different attributes.
01:41In order to see more clearly what I'm doing, I want to expand the display of the Nodes.
01:46So I can for example, select these two Nodes here and click up here on the
01:51toolbar to change the display.
01:54I can click on this middle button here, and that shows me a lot of the attributes.
02:00I click on this third button, now I cam see pretty much all of the attributes.
02:05If I want to connect the color of this file to the color of the Blinn, I'll just
02:10left-click on Out Color here, and then drag over to Color on the Blinn node.
02:16Now that connection has been made.
02:18Even if the nodes are minimized, I can hover the mouse over the connection.
02:23I should be able to see a little Tool Tip;
02:26that tells me what that connection is.
02:29I can clear the Graph and that won't delete these nodes, they're still going
02:33to be in the scene.
02:34Let me just go ahead and click on Clear the Graph here and that'll just clean that up.
02:39If I want to edit an existing Shader Network, I can, for example, select an object
02:45in the Viewport, and then in the Node Editor right-click and choose
02:51Graph Materials on Viewport Selection.
02:54Anything that's currently selected will be graphed in the Node Editor. And there you go.
02:59There is a shading network for the table cloth.
03:03The Node Editor is very flexible tool. It can be used for making and
03:08breaking connections between all sorts of nodes, not just material Nodes.
03:14That's a basic introduction to the Node Editor.
Collapse this transcript
Creating a matte painting with the surface shader
00:00One of the most basic things you'll need to do in terms of Building Materials in
00:04Maya is to construct a Matte Painting.
00:06And a Matte Painting is usually a flat backdrop that represents something more complex.
00:12In other words, it would be difficult for me to build an entire scene with lots
00:16and lots of foliage and mountains and trees outside the window here.
00:21To save myself the trouble of having to build all that I can just use a photograph.
00:25In order for that to work right the Matte Painting has to be fully self
00:30illuminated, it can't be affected by the lighting in the scene.
00:33And it also needs to perfectly face the camera so that we don't get any
00:37perspective distortion on that Matte Painting.
00:41We're going to do a little bit of non-Shader work here to make that happen.
00:44We're going to create a plane in the front viewport. Go to Create menu and choose
00:49Polygon Primitives>Plane, and draw that out in the front view.
00:54I already know the aspect ratio of the image that I've chosen to place onto the surface.
00:59I made a panorama that has an aspect of 2.26 to 1.
01:04So that my material doesn't stretch funny across the object here, I want to make
01:10that object the same aspect ratio as the image.
01:13I will give it a width of 226 and a height of 100 here in those polyPlane
01:21Shape Node Attributes.
01:22Now it's the right shape, I just want to scale it up a bit, so that's the
01:27right size, scale that up equally, and then I just want to move it back so that
01:33it's outside the window.
01:34So that's basically positioned.
01:37Before I put any kind of material on this however there is a quirky little
01:42attribute, we'll need to deal with over here back in the INPUT node.
01:47It's the Create UVs attribute.
01:49By default what Maya does is it stretches the UVs on your object,
01:55in order to assume a square aspect.
01:58In another words, Maya assumes that the texture that I am going to place on here is a square.
02:04However as we know, it isn't square. My image is an aspect of 2.26.
02:10For that to stretch properly across that surface, I'll need to change the
02:13Create UVs option here to Normalization off.
02:18If normalization is on, it will stretch the UVs to a square. If Normalization is
02:23off, it will stretch the UVs to fit the object. So that's good.
02:28Now I also want to cause the Matte Painting to face the camera, and to do that
02:33I'll use an Aim constraint.
02:35I'll select the camera first, and then Shift select the matte painting. I want to be
02:41in the Animation menu set, and go to Constrain>Aim>Options.
02:48Now I am going to just choose the default options here but I will need to change
02:53those up in the Attribute Editor in a moment.
02:55I'll just show you what happens if I use the default options and click Add.
02:59Now the plane is facing towards the camera, but it's not the axis that we want.
03:04We actually want the local Z axis of the plane to point at the camera.
03:08I'll go to the Attribute Editor to change up those Aim Constrain attributes;
03:12Ctrl+A, go to the Aim Constrain node and in the Aim Constrain Attributes I want
03:19to set the Aim vector to a value of 1 in Z, I'll set the X value to 0 and Z
03:27value to 1, and then additionally just to be sure that this works right,
03:32I want to set the World Up Type to Scene Up.
03:35That probably fine in this case, but I just want to make sure.
03:38Good, so now that's facing towards the camera and you'll see if I move it,
03:44it's always going to make the.
03:45We won't get any perspective distortion through this camera's lens.
03:48So we got our Matte Painting in there, and now we are just ready to add the material.
03:53This is a really simple one it's a Surface Shader.
03:56The Surface Shader in Maya does not react to light, and it's perfectly self
04:00illuminated, and if you use the default Maya software renderer the pixel
04:04brightness of the Surface Shader will be exactly the same brightness as
04:09your original texture.
04:11I'll right-click on that plane and choose Assign New Material, and I want to
04:17chooses Surface Shader. In the Attitude Editor I can go to the Out Color here,
04:23click on the Create Render Node button and its going to be a File node. Click on
04:28File in the create Render Node dialog.
04:32Now I've got the File attributes and I'll need to browse for that file by
04:36clicking below folder icon.
04:37And here it is, pointLobos_panorama1, go ahead and click Open.
04:43Now that Surface Shader is applied and if we're seeing shading in our main view port
04:48we'll see that there's some image there.
04:50Remember 4 is wireframe frame, 5 is shaded and 6 is shaded and textured.
04:58We haven't dealt with the quality here but we will do that in another movie.
05:03We're just going to change that quality so we can see that little the better.
05:06Before we wrap up this movie however I just want to do little a bit of cleanup,
05:11I want to rename plane here, I'll call it mattePainting.
05:14Finally I want to save to a new file name. The one I've currently got open
05:18is still_life_geometry_only, but now I've added the mattePaintings so I just
05:22want to save to a new version. File>Save Scene As and I'll call it
05:27still_life_geometry_and_mattePainting so I know that one is a different version.
05:38So we have got our matte painting in there and in a while we will adjust the quality in the viewports.
Collapse this transcript
Controlling hardware texture quality
00:00We've got a Matte Painting here in our still life scene.
00:03As you can see through the camera view here, we're not getting very good quality
00:08to the texture in this shaded and textured view.
00:12Of course, I can change the Renderer in the Viewport and that'll probably give me
00:15a better approximation of what that texture really looks like.
00:19I can go into Renderer>High-Quality.
00:21You can see that looks quite a bit better or if I go into Renderer Viewport 2.0, that also looks okay.
00:30However you can't always use those display modes, sometimes you actually need
00:34to be in default mode.
00:35I want to go back to Renderer Default Quality Rendering.
00:39Let me just show you how to change the quality of the Hardware Texturing on a per shader basis.
00:45You can select your object and go to the Attribute Editor Ctrl+A. And in that
00:52shading node here in surfaceShader1, you'll see there's Hardware Texturing.
00:55Let me open that up.
01:00I can change the texture resolution here to the Highest Quality.
01:04Now we're getting a much better approximation, even in the default Render mode.
01:10Now I can actually see that through the window, I can line up my Matte painting,
01:15so that it looks good from the camera's point of view.
01:19That's all there is to adjusting the Hardware Texturing options for the Default Render Quality.
Collapse this transcript
Lighting the scene
00:00It's difficult to evaluate the quality of your Shader work if you're just using
00:05the default lighting.
00:06What I like to do is set up my lighting at least a basic first pass of the
00:10lighting, before I start working on the materials.
00:14That way I kind of know what the materials will look like in the final shot.
00:18What we will do here is just create some area lights to light the interior of a
00:23little still life tabletop.
00:25And then we will save those lights out to their own scene files so that they can
00:29be referenced in, or the reference disabled if needed.
00:32We are going to Create menu and choose Lights>Area Light.
00:38The Area Light is created at the origin, but it's very small.
00:42I will need to scale it up.
00:44I got my Scale tool and scale up, in this case, to a factor of about 80. I just
00:52want to in position it, grab the Move tool, and move it up, move it back and
00:57tilted at angle so it's facing towards my shot.
01:02Then I want to of course enable lighting in the camera view, you can
01:06activate that and press the '7' key to see the lighting then as I rotate my Area
01:12Light around we can see the effect.
01:13If we want to better approximation, of course, we can go to render
01:18high-quality rendering, that will actually show us a better idea of what it
01:23will look like when it's rendered.
01:26That's one Area Light that will be my key light.
01:28I am going to set its Intensity down a bit, because I just know it's going to be too much.
01:33So I'll set that Intensity down to about .25.
01:38It looks kind of dark here, but if I do a quick render, you just see that
01:44it's actually considerably brighter.
01:48I just want to duplicate that so select that and just hit Ctrl+D to get
01:53another one, move it over. That will be my fill light, and rotate around.
02:01So it's facing basically downward onto the scene. Since that's the fill
02:06light it doesn't need to be as intense.
02:08So I set this Intensity down to, let's say .01; go back to my high-quality
02:13rendering here, still looks a bit dark, but again if I do a render, it's about
02:18the right Intensity now.
02:21Now I also need a light that's shining through the window that represents the
02:24light coming from outdoors.
02:26Go ahead and select one of these, Ctrl+D to do another one, make a new
02:32duplicate, move that around and I want to rotate that, in fact, I want to make sure that
02:38the arrow is pointing towards the scene here.
02:43So now that I kind of know what that's going to be, I can set the rotation
02:47values properly, I know that rotate x wants to be -180, and looks like rotate Z
02:55also wants to be -180.
02:59Now it squared up to my scene, and I want to just Scale it so that it's about the
03:04right size for that window.
03:07I'll set the Scale-X and Z to about 80, but Scale-Y let me set that to about 100,
03:13so it's taller, I just want to make sure that it kind of fits through the
03:17window, get a little bit closer there.
03:20So that's the light that's coming through the window now.
03:24So when I rotate value 0 here, and then the Intensity on that one, I don't know
03:31exactly what that's going to be, but I'll leave it at .01 right now.
03:35Give that a shot; see what it looks like when I render.
03:39So without any shadows it's kind of difficult to evaluate but we have got the basics in here.
03:44Go back to this light and I want to enable Ray Trace shadows.
03:48We go down here to use Ray Trace shadows and turn that on, type in a 1.
03:52Probably I want to do the same for all these actually, they should all cast shadows.
03:57Do another quick rendering, it's going to be bit grainy, because with the
04:09AreaLights I need to increase the quality of the shadows.
04:13Additionally if you do render and you don't see those shadows, remember that you
04:16will need to go into your Render settings window under Maya software and just make
04:21sure that Ray-tracing is turned on.
04:26So back to my attributes; I just want to select one of these hit Ctrl+A to get
04:31the Attribute Editor open.
04:32Go into the Shadows section here, and under Ray Trace shadows just
04:37increase the Shadow rays to about 20.
04:40That will fight that graininess, just want to do that for all three of those.
04:47Maybe we reduce the Intensity of the key light a little bit while I'm here,
04:51set that down to maybe 0.2 instead of .25.
04:56Go ahead and render that and you will see that it takes longer with the Shadows,
05:01but they will be much higher quality.
05:03Okay, that's finished rendering. It actually took about one minute to render with
05:07those Ray trace shadows, but it looks okay.
05:09I am going to go-ahead and now save those lights out to their own scene file.
05:13I want to select those three lights. I want to create a layer for them, my layer
05:19Editor. Go ahead and click on create layer with the selected objects; there is
05:25my new layer, I'll double-click on that; I'll change this and we'll call it,
05:29lights_interior layer.
05:32So I probably have a setup for exterior lighting later.
05:35Lights_interior_layer, that's good. They're still selected and I want to go ahead
05:40and save those out to their own file.
05:42File>Export Selection and I want to call this one still_life_lights_interior_01,
05:52because I might have more than one version.
05:55I am saving that as in Maya ASCII scene file. Click on Export.
06:03Now finally, and somewhat unexpectedly, I am going to delete these lights,
06:08because I have saved them out to their own scene file now and I can load those
06:12in as a reference later. That way I can swap out different lighting setups really easily.
06:19So I will go ahead and actually press the Delete key to delete those.
06:22That's it. I don't need to save my scene. I haven't made any changes to
06:26stil_life_master_reference.
06:28I have just created by new lighting setup.
Collapse this transcript
Choosing a diffuse color and amount
00:00We have got our scene laid out and we made some basic lighting.
00:03Now we're ready to start actually building our Shaders in earnest.
00:06I want to load that master scene in as a reference. We go to the File menu and
00:11choose Create Reference, still_life_ master_reference is the one we created that
00:15has the matte painting in it.
00:17I just want to double-check my Namespace Options. I want to make sure that
00:23that's set to, Merge into selected namespace.
00:25So that I won't get super long names on all my notes.
00:29Go ahead and click Reference, and there you go, I have got my scene loaded in.
00:34Then a little bit closer here, hit 5 key to see shading.
00:39I'll go ahead and add a material to this lemon, so I have got it selected, and
00:44then I'll right-click and choose Assign New Material.
00:48I want that to be a Blinn material, because it will need to have highlights.
00:54So click on blinn, and I want to rename it of course.
00:59So I'll call this one lemon1_blinn and press the Enter key.
01:04What I really want to show you here is just the diffuse color and amount.
01:08The diffuse color is the main color of the object. Go ahead and click on that.
01:15That's the color that the matte finish of the object will reflect.
01:21So let's give that a bright yellow maybe not quite so bright, let's reduce the
01:25saturation just a little bit.
01:27The other important aspect of diffuse color is down here, it's the Diffuse amount.
01:33This is little bit tricky in Maya, in fact, by default, colors are dimmed
01:38down to only 80% of their full brightness.
01:42So you'll see as I reduces this Diffuse amount, this color does not have any
01:47effect when the Diffuse amount is 0.
01:51So diffuse amount is a multiplier for the Diffuse color, and it is set to about
01:5680%, or 0.8 by default. That's going to have the effect of actually kind of
02:01desaturating all the colors slightly.
02:04That's actually a good thing. In fact you usually don't want to have
02:08fully saturated Diffuse colors, because that lends a kind of plasticky fake
02:12look to your rendering.
02:14It was actually pretty wise of the Maya developers to set the Diffuse amount
02:18down a little bit, but in my opinion it's a little bit too low.
02:23For most of Maya scenes I will set the Diffuse amount up to about 0.9 or perhaps 0.95.
02:30But really, I almost never set it up to the full amount of one, because again,
02:34that's going to produce a kind of fake or plastic look.
02:38That's the basics of working with diffuse color in Maya.
Collapse this transcript
Understanding ambient color
00:00Let's work with Ambient Color.
00:02I'll select my lemon and go to the Attribute Editor, Ctrl+A it's not already
00:07open and increase the Ambient Color a bit to about half.
00:11You can see the effect here in this Sample Swatch in the Attribute
00:16Editor, but with the default rendering in the viewport we can't see the
00:20effect of Ambient Color.
00:22However, if you choose a different renderer you'll be able to see it.
00:26I'll choose high-quality rendering and now we can see the effect of that Ambient
00:29Color as I increase that.
00:31What is Ambient Color doing?
00:33Essentially, it's setting the black point for the Diffuse Color.
00:38If the Diffuse Amount here is the white point then the Ambient Color is the black point.
00:44In other words if this is set all the way down then an area that's in shadow
00:50is going to be black, assuming there's no other lighting. But if I increase the
00:55Ambient Color up to about half,
00:57what I am saying is I don't want the Ambient Color to ever be darker than this
01:03color multiplied by the Ambient Color.
01:07Regardless of lighting, it's essentially biasing up the black, increasing the
01:13brightness, if you will.
01:15So if Diffuse is the contrast, or the white point, than Ambient Colors here is
01:23the brightness or the black point.
01:26I actually don't tend to use it much.
01:29I would prefer to get that effect by adding more lights in my scene,
01:33because I think that that's more realistic.
01:35But that's how Ambient Color works in Maya.
Collapse this transcript
Bump mapping
00:00Because we can't have infinitely detailed surfaces in CG we have to use maps to
00:07stimulate surfaces. A bump map is a way to stimulate the roughness of a
00:12particular surface, whether it's got dents and bumps in it.
00:15So I will add a bump map here at to my lemon. Go ahead and select that lemon.
00:21I want to go to the Attribute Editor, and go to that lemon1_blinn shading
00:25node, and you'll see Bump Mapping here.
00:28I could add the bump map through the Hypershade, it's just a little bit more
00:32convenient to do it here in the attribute editor.
00:34I'll go a head and click on Create Rendered Node. Now I can use any node as a
00:40texture map in other words I could use a file or any one of these.
00:44In this case I'm going to use 3D Texture called Leather, and that's going to
00:49create a pattern based upon something called Cellular Automata, go ahead and
00:55click on that leather.
00:56Now I won't see the result in the Viewport right away unless I'm in High-Quality
01:01Rendering mode, and I have hardware texturing turned on.
01:05We can do that from the Shading menu here, or I can just press the 6 key on the keyboard.
01:11There is our bump map. Get in a little bit closer on that.
01:16You see that it's quite strident, it's a very strong effect here with
01:19the Bump Depth of 1.
01:21I'll reduce that Bump Depth a little bit to let say .2 and you'll see that
01:27looks a bit better.
01:28If I do a Rendering of that just click on Quick Render you'll see that it's even
01:34more subtle in the rendering.
01:37The Hardware Texturing here is going to give us a rough approximation of what it will look like.
01:43So now let's adjust some of these leather attributes to get the look that we want.
01:47I'll go to the Leather node here.
01:50A bump map works on the basis of the brightness of the texture.
01:54If you got a white pixel that's going to cause a texture to bump upward,
01:59and if you have got black, then it's going to recess downward.
02:03In this case I want to cell color here to be black.
02:07So I'll produce little circular dents in this surface and then the crease color here,
02:11I'll set that to white, you can see that that's a stronger even now.
02:17Now I don't really need the creases themselves I just need a white
02:20background behind the cells.
02:22So I can turn the Creases off.
02:24I can play around with some of these attributes here, you can see Spottyness
02:28and so on, Randomness. Basically I want to have a low threshold here, I don't
02:36wanted to actually be clipping off.
02:37I can play around with this a bit.
02:43Maybe reduced the Density, so I will have fewer of those little dots.
02:50If you start having performance issues here in the View then of course you can
02:55always switch your Hardware Texturing back off and just focus in here on what we see.
03:04That's a very simple introduction to a Bump Map.
Collapse this transcript
3D texture placement
00:00We've placed a bump map on this lemon, now I want to show you how to adjust
00:04the placement in the size of that bump map.
00:07Let's go to the Hypershade for that.
00:09I'm going to close the Attribute Editor and go to
00:12Window>Rendering Editors>Hypershade.
00:16I want to graph the network of this lemon shader, right-click and Graph the Network.
00:21You can see there is a place3DTexture node that's feeding into the texture.
00:25That's determining where is that texture is going to land on the
00:29surface of the object.
00:30I'll select that place3DTexture node and minimize the Hypershade and go out to
00:36the front view, I'll tap the spacebar. You can see that we've got this
00:40little green box highlighted, that's the place3DTexture node selected.
00:45If I move that around it's going to change the placement on the lemon here as we see.
00:52So as I move that I'm changing where that texture is going to land on that surface.
00:57More importantly, in this case, is the scale.
01:01If I scale that texture up and down, I can change the size of the texture on the lemon.
01:08I can even stretch it as well.
01:12If I wanted a non-uniform look, I could stretch it in different dimensions.
01:16Well in this case I do want to have it be uniform in all dimensions.
01:21The 3D texture placement node could be parented to an animated object, if you
01:25want to make sure that the texture is locked onto that surface.
01:28In this case it doesn't matter.
01:29I can just leave it as it is.
Collapse this transcript
Defining specular shading
00:00The diffuse component of a material is the light that's reflected back from the
00:05object if the object has a rough surface or a matte finish.
00:11So almost all materials have a diffuse component and here we've got a yellow
00:16diffuse component for the lemon.
00:19Some objects also have a specular component. They've got a shininess aspect to them.
00:25The lemon is a case where we do need a specular highlight.
00:29That's why I assigned a blend shading node to the lemon when we first added the material.
00:33If I'd used the Lambert then we would have no specular components or no highlights.
00:38I just want to show you the specular attributes in the blend shading node.
00:42I'll select that lemon, go to the Attribute Editor and go to the shading node here.
00:46You'll see if you scroll down below the common material attributes, you'll
00:50see the specular shading section.
00:52Let's talk about what these attributes do and what they mean.
00:55First you've got the eccentricity, and if you adjust that, what you'll see is it
00:59changes the spread of this shiny highlight.
01:02Essentially this is the glossiness or the spread.
01:04If it's a very low value, then you're going to get a very small intense highlight
01:09as if it were a metal shader; and if I reduce that Eccentricity down all the way
01:14to 0 then, it essentially makes that highlight so small it disappears.
01:19Eccentricity is the spread or the glossiness. Then you've got the Specular Roll Off,
01:23which is the intensity. If I reduce the Specular Roll Off, essentially
01:27that's just going to dim down the specular highlight.
01:31If I give it a full strength of 1 then you are going to get a nice shiny highlight.
01:36Turn that back down to the default of about .7.
01:39Additionally, you've got the Specular Color this is the color of light that's
01:44reflected back to the camera and is defaulted to a neutral gray.
01:49What that means is that if you shine white light onto this object,
01:52it will reflect back essentially white light.
01:55As you see however, it's not quite that simple because it's kind of mixing with
02:00the diffuse color a bit.
02:02If I increase the Specular Color up to a value of 1, or fully intense, then
02:08you can see that we're getting shiny white highlights now.
02:11If I do a quick render of that you'll see it even more clearly.
02:15It's even blasting out a little bit, this kind of over exposed a bit.
02:19The Specular Color, in most cases, wants to be a neutral gray.
02:24If you were doing certain types of materials like a gold shader than you
02:29might change that Specular Color to be similar to the diffuse color.
02:33What that would result in is, instead of having white highlights, you could have
02:37colored highlights.
02:38Just to illustrate that if I just quickly change my Specular Color to maybe an
02:44orange, give a little bit more saturation there.
02:48We can kind of see that we're getting a different result here now.
02:52I do a render, so now we're getting intense highlights but they're not showing
02:57as white. They're showing as this yellow, orange color.
03:02Finally you have the Reflectivity here and that's a very important attribute.
03:06If I wanted to mirror reflections on a surface, then I would what a non-zero reflectivity.
03:13The default reflectivity in a Maya Blend Shader is .5 and currently I have
03:19Raytracing disabled in my scene.
03:21So I will not see a reflective image. In other words, I won't see a mirror
03:26reflection now unless I turn on Raytracing.
03:29Let's see what that looks like if I do that. I'll go into the Render Settings, to
03:34the Maya Software tab, scroll down a bit and turned Raytracing on, its found in
03:38the Raytracing Quality section.
03:40I'll turn that on and I'll do another quickie render and it'll take a little bit longer.
03:47But you can kind of see it's a bit subtle, but you are getting a mirror
03:50reflection in the surface now and that's actually not desirable.
03:55What I would recommend is, when you create a new blend material that the first
03:59thing you would probably do is turn that Reflectivity down to 0.
04:03Unless you explicitly wanted a mirror reflection. The problem in Maya is that
04:07all the blend shaders will start out with a reflectivity of .5 and then, if
04:12you simply just turn on Reytracing, all blend shaders will start reflecting the environment.
04:18Again, I recommend that you turn the Reflectivity down to 0 just by default,
04:22unless you're planning to make a mirror reflection.
Collapse this transcript
Duplicating networks
00:00To create variations on a theme for your shaders, you can duplicate nodes.
00:05We can do that in various ways from the Hypershade.
00:10Open that up. I'll graph a network for this lemon by clicking Graph Network.
00:16You can see that it is composed of these four nodes.
00:18I can duplicate these in various ways.
00:21First of all I can use just straight up duplicate, which is, as you probably know, is Ctrl+D.
00:27Now there is little bit of a quirk in Maya around this.
00:31If I select for example these three nodes and hit Ctrl+D, then I'll get
00:35three new shading nodes.
00:37I've got a new leather, a new lemon and a new bump.
00:41They are not connected, but we got duplicate copies of those, so that kind of makes sense.
00:46Let me show you this though, let me delete those and if I select all four of
00:50these, including that place3dTexture node and hit Ctrl+D, then just strangely
00:57I only get a copy of the place3dTexture node.
01:00So Maya is giving precedence to that selection and it is overriding the
01:04selection of these other shading nodes.
01:06Don't let that bite you, that's just a quirk of the program, delete that.
01:12We can also accomplish that same result by using the menus, instead of the hot key.
01:17I can select a shading node and go to the Hypershade menu, and in the Edit
01:23menu there is a cascading submenu here that says Duplicate and we have a few options here.
01:29If I choose Duplicate>Without Network, that's the same as hitting Ctrl+D on the keyboard.
01:36If I select Multiple nodes and do Edit>Duplicate>Without Network, then once
01:41again, I'll get three new nodes here, but they won't be connected.
01:45I'll have to connect them manually.
01:48Well, I can duplicate the entire network, if I want to create a different
01:53version of this lemon shader, I can select the root level of the network, in
01:57other words, the material shading node and then in that Hypershade menu I can
02:02choose Edit>Duplicate>Shading Network.
02:06That's not just going to duplicate the blinn node but it's going to
02:09duplicate all four of those.
02:12In order to see what we're doing a little bit better, I can just select
02:16all of these, and click up here to Graph the Network, show the input and
02:21output connections.
02:22There we go, so I've got two versions here now.
02:25I can move that around, as you can see, I've duplicated the entire shading network.
02:30These are all independent nodes.
02:33That way if I want to, I could change for example, color of one lemon
02:38without affecting the other.
02:39Or I could change the pattern of the leather 3D texture without affecting
02:44the other one as well.
02:45By way of example, I could just select one of these and hit Ctrl+A,
02:51get up the Attribute Editor and may just change this color a little bit, so it's not
02:55exactly the same, maybe give a little bit of variation, there we go.
03:00Then I can assign that to one of these other lemons.
03:03Select it and then right-click on the Shading Node and choose Assign Material To Selection.
03:09So as you can see here we've got two slightly different colored lemons.
03:13And likewise, if I change any of these other attributes, they are
03:16completely independent.
03:17If I select this leather node here, go to the Attribute Editor, Ctrl+A, as you
03:21see, I can change the Size of that or the Density or whatever.
03:25And it's only affecting that one object, because they have got two completely
03:28separate shading networks.
Collapse this transcript
Building branching networks
00:00We've seen how to duplicate shading networks.
00:03Now let's talk about Branching Networks.
00:05Which are very useful and very efficient.
00:07You can choose to have multiple Networks in which some of the nodes are shared
00:13and some are unique.
00:14Like for example, if I wanted to have two lemons that were different colors
00:19but still had the exact same Bump attributes, let's do that.
00:23I'll go ahead and graph the network on this lemon here, as you can see once again
00:28I've got these four nodes.
00:30And what I want to do is just duplicate only the material node and that's the
00:33last one in the chain here or the root level of the shader.
00:37I've got that one selected and I'll go back into my Hypershade Edit menu and
00:41choose Duplicate>With Connections to Network, click on that.
00:46Now I've got a new material node its called lemon1_blinn2, I'll tell you
00:52what, I'll just rename that, call that one lemon3_blinn.
00:59And let's change its attributes too.
01:01I'll go to Ctrl+A and change this up so that we can see the difference here,
01:06I'll choose a lime green color maybe.
01:08Both of these Shader are sharing the same texture placement node, the same 3d
01:15texture and the same bump amount.
01:19I'll go ahead and assign that material to one of these other objects, right-click
01:23and Assign Material To Selection.
01:25And if change any of the attributes that are upstream from these nodes,
01:31then that change will be reflected in both of the objects.
01:33For example, if I select the bump3d node and go to its Ctrl+A attributes,
01:39I can adjust the Bump Depth.
01:40And as you can see, its affecting both of those shaders equally, cool!
01:46I'm at back down to .2.That's a pretty simple case of a branching network. Let's
01:51look at a slightly more involve case, in which you've got multiple shared node.
01:56Let's say you want the branching to happen earlier in the data flow here.
02:01Let's say, I want to have one placement node, but then have duplicate texture and bump nodes;
02:09so that we could have different parameters on these, but yet they could still be
02:12driven by the same texture placement.
02:16So to do that, I want to select the nodes that I wish to duplicate, which will be
02:20these three. I go back up into that hyper shade edit menu, and once choose
02:25Duplicate>With Connections to Network.
02:29I'll just rearrange the graph I'll click up here to just clean up the graph.
02:32Now you can see this didn't actually give us precisely what we wanted.
02:37What we got was kind of a weird version of that, in which we've got multiple
02:45new nodes, but what's happened is that they are all only connected to the
02:49immediate incoming Node.
02:52So you can see here that this placement is feeding into my leather2 and
02:58that's what we want.
03:00But then leather2 is now branching and we don't actually want that to branch at this point.
03:06So we just need to rebuild some of these connections.
03:09So basically, I just want to get organized here and figure out what I've got.
03:13So this is lemon1_blinn2, this is lemon1_blinn and that's lemon3.
03:19So this is the duplicate here that I just made I'll call that lemon4_blinn.
03:25I just want to reconnect all of these.
03:30So here's Bump3d2; that wants to be applied to this lemon4.
03:37So I'll middle-mouse drag that into the bump slot and that's connected.
03:42Likewise I want to feed this leather2 into this new bump node, so I'll
03:46select the bump node and drag that leather with a middle-mouse button on to the bump value.
03:52Now this is very important that you connect to the bump value and not the bump depth.
03:57The bump value is your texture and the bump depth is the amount.
04:01So now we've got a branching network, which is what I was trying to achieve.
04:05So now I've got one placement node that's feeding these two sort of
04:10parallel shading networks.
04:12I'm going to assign this lemon material to one of these other objects.
04:17Select the object, right-click and assign, and to illustrate now I can
04:22choose let's say, the leather2 texture node and change some of its attributes,
04:29like reduce the density, and you can see that that's effecting just this one
04:34object; change that up.
04:38Likewise, if I choose the shading node or material node, if I adjust that color
04:43it's only affecting that one object.
04:47However, they are sharing a placement node.
04:51So if I select that placement node,
04:53I can go and for example, change its Scale, we can do that just directly in
04:58the channel box here.
04:59So if I change this Scale to let's say 3, that's going to affect all three of those.
05:04These two have a shared network, in as much as they share everything except for
05:09the blinn material node.
05:12These two have a shared network, in which they share only the texture placement.
05:18So that's the only thing that is shared among these two.
05:21So if I change that you'll see those both update.
05:27That's really the essentials of building a branching networks in Maya.
05:32This is a very helpful technique.
05:33You would use this for example, if you had a file node that you needed to have
05:38instance multiple times and multiple shaders.
05:41That would save you time if you needed to swap out the file for example.
05:44Because you wouldn't have to go into a million different file nodes and change them all.
05:49You would just change one, and then all of the downstream nodes that were
05:52connected to that, would assume that change.
Collapse this transcript
Exporting and importing networks
00:00Once you've built up a Shading Network, you might want to actually save that
00:04out to its own file so you can get access to it easily in the future, without
00:09having to load up an entire scene that's got a lot of geometry or animation in it.
00:13Hypershade Shade makes it really easy for you to do that.
00:17You can select one or more shading nodes here. Hold down Ctrl+Shift and
00:22select these, and then simply go up to the File menu within the Hypershade
00:27window and choose Export Selected Network.
00:30It will not just export just those three material nodes, but it will also
00:35export any of the upstream nodes, that are feeding into these.
00:38I just want to save it into my scenes folder. It saves it as a Maya
00:43ASCII scene file so there's no special file format just for materials.
00:48Let me just call this one lemon_shaders.
00:51That's actually the process for building up Material libraries in Maya,
00:56is simply selecting the material nodes that you want to export and issuing that command.
01:02Let's make a new scene now and re-import those.
01:05File>New Scene and I can just simply go to the File menu within the Hypershade menu and choose Import.
01:14I want to find it, here it is lemon_shaders.ma, click Import and there you go.
01:19We've got our shaders. It's a totally blank scene here now.
01:23You'll notice by the way, that does include the 3D texture node so that
01:27did actually come in on the import.
01:31You can see that it's got the namespaces here with little colon in front of that.
01:38That's a simple introduction to how you can import and export shading networks
01:42in Maya, and that concludes our chapter on Essential Techniques.
Collapse this transcript
3. mental ray Materials
Setting up the mental ray renderer
00:00In this chapter, we'll look at basic materials for mental ray.
00:05Mental Ray of course is the alternate renderer from Maya that has a lot
00:08of advanced features.
00:10We want to set that up now.
00:12I'll begin by referencing in my still life scene, go to the File menu and
00:16choose Create Reference, still_life_master_reference.ma is the one I want.
00:21I want to bring that in.
00:23I need to make a few changes to the Render Settings.
00:26But I need to do that here in this parent scene rather than in the scene that
00:30I just referenced in, because when you reference a scene, the Render Settings
00:35are not carried over from the reference.
00:38Here in the parent scene, I want to the go to the Render Settings dialog.
00:42I want to choose my Renderer, Render Using mental ray.
00:46The main thing that we want to look at here is couple of things.
00:50Well, first of all, I just want to scroll down in this common tab.
00:54I'm just going to change the Width and Height of the rendering; let's give it
00:57a Height of 360 pixels. I also want to just change the quality of the renderer itself.
01:04I'll go to the Quality tab here and you'll see there are some presets here and
01:08it's set to Draft by default.
01:10I could crank that up to Production Quality. That does change a few options
01:15here, the most important being the Anti-Aliasing options here.
01:20Basically what mental ray does is it tries to detect if there's a lot of
01:25contrast between neighboring pixels.
01:27If there is a high contrast there, that means there's probably an aliasing
01:31artifact or a jagged pixel or pixilation artifact.
01:35In those high contrast areas, then mental ray will subdivide the sampling and
01:42basically recalculate those pixels more than once and find their average.
01:46That's what this does when I change these Sample Levels.
01:49So this is the Adaptive Sampling mode, and that's probably going to work
01:53best in most cases.
01:55You'll see that there are a bunch of other options down here as well,
01:59such as Raytracing and so on.
02:00We won't really need to play around with these settings very much in this course.
02:04But in general practice, in production, you will probably need to go in here
02:09occasionally and change the number of reflections and the number of shadows cast, for example.
Collapse this transcript
Lighting the scene for mental ray
00:00When lighting a scene in mental ray there are a few special considerations.
00:04The first thing I would like to mention is that there are couple of light types
00:09that work in Maya software that don't work in mental ray because there is no
00:13mental ray equivalent of them.
00:14If you go to the Create menu and look under Lights you'll see that there are six
00:18different types of lights.
00:20The Ambient Light and the Volume Light do not work in mental ray, again, because
00:24there is no mental ray equivalent of those.
00:26It's not a problem though;
00:28it's not like your restricted by that because you can still get amazing
00:32renderings by using just the Directional, Point, Spot and Area Lights in mental ray.
00:38Let me import the lighting setup that I created.
00:41I am not going to reference the lights in this time, I am going to directly
00:46import them because I will need to make some changes to the lights.
00:49If you make changes on nodes that have been referenced, then things get a
00:54little bit murky and that's not a good practice.
00:57Things that get referenced in shouldn't really be changed.
01:01In this case I am going to import my lighting setup.
01:03File>Import and stil_life_lights_interior_01 and scroll down.
01:12I can just choose Merge into selected namespace and that way I won't get the issue of
01:16super long node names.
01:20So I've imported those three lights now. If we do a render of this now in
01:25mental ray let's see what it looks like.
01:27I'll highlight that Camera View and do a Quick Render and we've set our renderer
01:32up to be production quality.
01:35But you'll see that it doesn't really look quite right in terms we expect the
01:39shadows to be softer, we're not really getting a good sort of modeling across
01:44the surface like we might expect. It's almost looking like these are point light sources.
01:49That's because in fact there is a special option in the Attribute Editor
01:53that you need to enable for Area Lights in order to get good results with mental ray.
01:57I'll select one of these Area Lights and go to its attributes and what you
02:03are looking for is there is a section that says mental ray. So let's find it,
02:07it's here mental ray.
02:09Area Light, Use Light Shape, that needs to be on and I'll do that for all of
02:14these; got three Area Lights.
02:18What that's going to do is going to treat the Area Light as a complete light
02:22source, in other words light will emanate from every point on that Area Light.
02:27If that switch is off then only the shadows are going to be area shadows and the
02:32light source, in fact, would just be a Point Light source.
02:35But now I have enabled Use Light Shape on all three of those and let's go back
02:40to my render window. Let me store the image that I rendered previously and do a new rendering.
02:46What we'll see here is that the Light Intensity has diminished.
02:51That's not an error, it's not a mistake. It's just the behavior of mental ray.
02:55To compensate for that, I'll just increase the Intensity of those Area Lights.
03:00And so I don't have to keep doing renders over and over again, I am going to do an IPR;
03:05Interactive Production Rendering.
03:07So I'll click here to save that image and then I'll also do an IPR and draw a
03:13little rectangle around a representative area.
03:16Now I can make adjustments to my lighting in shadows and that will be
03:20updated in real time.
03:22Select one of these lights here. We just need to increase the Intensity.
03:26I am going to go to that shape node here and turn the Intensity up a bit like
03:30let's say 0.8 for the key light, which is on the left.
03:34I've got my Fill Light here, maybe I'll increase its Intensity as well;
03:38areaLightshape2, Intensity of let's say 0.5, that maybe a bit too much.
03:44I'll bring it back down to 0.3.
03:46Then I've also got the light coming from outdoors.
03:50This is for light shining through the window.
03:52Once again go to it's Shape node and increase it's Intensity a bit.
03:59Now that's looking better and I can do a full render of that.
04:02However, we'll notice that the shadows are kind of grainy. We did improve
04:08the shadow quality for the Maya software version of this lighting setup,
04:12but there is a slightly different workflow for doing that in mental ray.
04:16I'll store that image., I'll go back to the Attribute Editor for these, Ctrl+A.
04:23Let's do a little IPR while we are at it.
04:26I just want to correct those shadows.
04:30The option that I'm looking for here to increase the quality of those shadows is
04:34here in the Area Lights section High Samples. I want to turn that up to let's
04:40say 64 and that's going to increase the lighting quality overall including the
04:44shadows. Do that for these others as well.
04:52Now I should have pretty clean shadows throughout.
04:55Good, so I'll do a full test render, see how that looks.
04:58It will take a moment to calculate that, because I've got pretty high quality settings.
05:03But again we need to have pretty good lighting in a shot in order to properly
05:08evaluate whether the materials are doing what we want or not.
05:11Well, we've got a basic lighting setup here in mental ray and now we can move on
05:16to actually digging into the mental ray material attributes.
Collapse this transcript
Using mental ray shading nodes
00:00Mental ray has many advanced shading notes that we can employ to achieve all
00:05sorts of different effects.
00:06We won't have time to make an exhaustive survey of all the different shading
00:11nodes in mental ray.
00:12But as we go through the course, I'll introduce you to the most important ones,
00:16and the ones you will use most commonly.
00:18Before I do that, I just want to mention that in this version of this scene,
00:22I've actually reverted all those fancy lighting changes that I did previously.
00:28In other words, my area lights, I've disabled the Use light shape option and
00:33I have turned off all the shadows. The reason for that is the render times
00:37were just too long.
00:38So I have turned all that off and we'll be able to just focus in on just the material.
00:43I am going to assign a material called DGS to the candelabra here.
00:48DGS is a really good material shader for metal.
00:52Go ahead and select that candelabra and right-click and choose Assign New Material.
00:58It's a mental ray material and it will only work with mental ray.
01:02When you go to the mental ray>Materials section here, you'll see all of these.
01:07These will not work in any other renderer other then mental ray.
01:10Here we go, dgs_material. Go ahead and click on that to assign it.
01:15In the Attribute Editor here, now I'll go to that material shading node.
01:18I am just going to rename this, I'll call it brass_dgs.
01:24DGS stands for Diffuse Glossy and Specular.
01:29The Diffuse component of course, is the scattered light component.
01:33When light hits a rough surface or a matte finish, the light gets scattered.
01:37You don't have a coherent reflection.
01:39For brass and other metals the diffuse component is going to be minimal.
01:44In fact we can just start out by bring it down almost completely to black,
01:49almost no diffuse component for metals.
01:51Now we have got the glossy and specular components here.
01:55The glossy component is the highlights and the specular components are the mirror reflections.
02:02We are getting closer here. I'll just do an interactive production render on this.
02:11Click IPR, drag a little box around the base of our candelabra.
02:19You can see that we're getting some shiny reflections there, and that's because Glossy
02:24and Specular have non-zero values.
02:27If I bring those down to zero, then we won't get much.
02:31Glossy is the specular highlights and Specular are the mirror reflections.
02:38But in fact, you will be hard-pressed to tell the difference between these.
02:42If you just increase them up, they looked very similar, I can't really tell
02:46much difference there.
02:48The difference comes into play when you start playing around with this Shiny
02:52attribute here. What that does is increase or decrease the glossiness factor.
02:58This attribute here is the color of the Glossy highlights and the Shiny
03:02attribute is essentially how polished the surface is.
03:07If I reduce that Shiny attribute down to a very low value in single digits,
03:12what we'll get is a nice effect here.
03:14We are getting this very interesting soft glossy effect, where it's not quite
03:19fully polished. Then of course, we have got the Specular component here and
03:24that is the mirror reflections.
03:26Once I unable that, you'll see we are getting mirror reflections in addition to
03:30the Specular highlights.
03:33For brass, what I want is an orange or yellow color to this Glossy component.
03:39Go ahead and click on that and dial in a kind of orange color, maybe reduce the
03:45value a bit, a little bit more yellow there.
03:54Then I do want some reflection; so I can increase the Specular highlight,
03:59and when I do that, you see that it kind of desaturates the Glossy component.
04:03So there is a combination effect between these two.
04:07So I might have to ping pong back and forth between these a couple of times to
04:11get the result I want. Maybe a little bit more value to that Glossy highlight.
04:17Just play around with the shininess a little bit. Maybe I can make it a
04:21little bit more of a coherent reflection; or if I want it to be a kind of dull finish,
04:27I can reduce that shininess amount.
04:29All right. Well, that's a basic introduction to the DGS material.
04:34As I said, mental ray has lots and lots of shader nodes.
04:37This is just one of them that you will use very commonly.
Collapse this transcript
Choosing mia_material_x presets
00:00The DGS material is designed really for metals.
00:04It's a single-purpose shader.
00:07Now let's look at mental ray's mia material, which is an all-purpose shader that
00:13can be used for almost anything.
00:15I want to assign that mia material shader to the bowl here and try out different presets.
00:22Select the bowl and right-click and choose Assign New Material, go to
00:26mental ray>Materials and I am looking for mia, mia_material, mia_material_x,
00:32mia_material_x_passes; what does all this mean?
00:36Well, MI stands for mental images, which was the company that developed mental
00:42ray before they were acquired by NVIDIA.
00:44Mia material just means it's a generic material.
00:48mia_material_x is the improved version.
00:51You could think of that as version 2.0 of the mia_material.
00:54The old version is preserved here for backward compatibility with old scenes.
01:00Likewise, you will see one here that says mia_material_x_passess and that's a
01:05version of the mia material that is designed for render passes.
01:09If you want to render out for example, the reflections separately from the
01:12diffuse component, you'd need to use mia_material_x_passes.
01:17In fact I always use mia_material_x_passes, just in case I might need to use render passes later.
01:24I'll go ahead and click on that and I will go to that material node.
01:29Let's do a test render just to see what it looks like with just default attributes.
01:34Go ahead and go up to my Render view, click on that.
01:38When that's finished rendering, what you will see is you're getting a gray
01:41diffuse color with a little bit of shiny highlights and that's the default
01:45behavior of the mia_material.
01:47Let's go ahead and store that image in the Render view and now we can play
01:52around with some of the presets here.
01:55Mia material has lots of useful presets over here.
01:59Any node in Maya can have presets associated with it, this one has a bunch there
02:04set up from software developers.
02:06If you click and hold on that, you get some options.
02:08For example, if I want this to be just a matte finish, I would go down to
02:13MatteFinish and choose Replace.
02:16That's going to just overwrite all the values that we currently see in the
02:20Attribute Editor now. Click on that and you will see we get no highlight now.
02:24I could do a region render of this or I could do an IPR render.
02:29I want to recommend that you only use the IPR interactive production renderer
02:35when you're changing single attributes.
02:37I have experienced Maya crashing when I was trying to change the presets with IPR running.
02:45What I recommend is if you're changing presets then you just do region renders instead of IPR.
02:50Now there are no shiny highlights there.
02:53As you can see there are lots of presets to play with, for example we can
02:57choose a GlazedCeramic preset; and then for example we could change up the base
03:01color here, giving that a little bit of a terracottish color; and do another region render.
03:10My recommendation with mia_material is that you start by choosing one of the
03:14presets and get in the ballpark region of the look that you want and then adjust
03:19the individual attributes to fine-tune the look.
Collapse this transcript
Exploring mia_material_x
00:00The mia material is a monolithic shader that has lot of controls,
00:04many attributes that you can play with.
00:06Let's look at some of the most important ones.
00:08I will select my object that's got the mia material on it.
00:12You can see here that I have got lots of stuff. It's similar to what you'd see in a Maya Blinn shader.
00:18To help you get familiar with what these attributes are the, the developers have
00:22provided you with extended tool tips. If you hover your mouse over the name
00:27of any attribute, you'll get information about what it does.
00:31This is the diffuse color here and the next one down where it says Weight,
00:35that's the amount of Diffuse.
00:39So I can increase the Diffuse Color, brighten that up; I can reduce the
00:43Weight and that's going to dim it back down again.
00:47You will notice that we don't see the change here in the viewport.
00:50We will have to do a proper rendering to see that change.
00:53But I can do an IPR, track a box around that.
01:00You can see if I reduce the weight here, I am reducing the amount of diffuse
01:06component, that's being added to the material.
01:09We still have reflections here.
01:10You can see Reflectivity, we can turn that off.
01:14Now I have got almost nothing.
01:17Turn the Weight for the Diffuse Channel back up again.
01:23One thing that the Maya Blinn Shader doesn't have is this Roughness attribute.
01:27This is really helpful for things like unfinished unglazed ceramic.
01:33If I have no roughness, then it acts just like the Blinn Shader.
01:38But if I increase the roughness up, what we will see is it starts to lose its sort of shininess.
01:45It says if we've sort of pumped up the amount of diffusion or increase the
01:52scattering of light that comes off that surface.
01:56Cool, so that's Roughness.
01:58Moving along down here you will see there's a section for Reflection.
02:02Unlike the Blinn material in Maya, both Specular Reflections, in other
02:08words specular shiny highlights and mirror reflections, are both dealt with it once here.
02:16They're not considered to be two separate things like they are with the Blinn material.
02:20We have got the amount of reflection here to increase that Reflectivity and
02:25that's going to impact the mirror reflections as well as the Shiny highlights.
02:33If you only want Shiny highlights and no mirror reflections, then you can turn
02:37on the switch that says Highlights Only, turn it back off again.
02:42Another fun thing that you can do here with the Reflections section
02:47is to play around with the glossiness.
02:49If you have got a glossiness of very low value, then it's going to give you kind
02:55of blurry reflections, but only if you increase the glossy samples here.
03:00I've reduced the glossiness down to .15, but I don't see a lot of change in
03:05the reflectivity here until I increase the number of glossy samples.
03:09Wait for that to update.
03:12With Glossy samples set up to 15 now, we're able to see that our reflections
03:18being sort of blurred; maybe get a little bit more glossiness there. Cool.
03:22So now we are getting the sort of shiny highlight as well as a reflection,
03:30but it's not a shiny coherent reflection, in other words it's not focused; we got a
03:35defocused reflection, very cool.
03:38Those are the most basic attributes of mia_material.
03:41In other movies, we will delve deeper into advanced reflections and refractions and so on.
03:47But that's a good start to looking at the power of mia_material.
Collapse this transcript
Bump mapping in mia_material_x
00:00Bump mapping for mia material works just the same as it does for standard shading nodes in Maya.
00:06However, there is more than one Bump channel. You need to add your Bump map
00:11to the correct channel, let's take a look at that.
00:13I am going to select my object and go to the mia_material shading node here in
00:17the Attribute Editor.
00:18Scrolling down, scrolling, scrolling, scrolling you will see there is a
00:23section for Bump, you are going to open that up.
00:25You'll see that there is an Overall Bump and Standard Bump.
00:30Admittedly, when I saw this I was confused and I didn't know what to do here.
00:35Overall Bump is for a specialized mental ray bump nodes.
00:40If you just want to add an ordinary plain vanilla Maya Bump, then you want to
00:44add it to the Standard Bump channel here, just like you would with any Bump Map.
00:49Let's do another 3D texture.
00:52I really am a fan of 3D textures because I don't have to worry about tracking
00:56bitmap assets and so on.
00:58Let's try like a Volume Noise.
01:02I want to reduce the Bump Depth because that's always too high with a value
01:05of 1, bring it down to let's say .1. Normally, I would go to High Quality
01:11rendering mode in order to see that effect of that bump.
01:16But as you can see, mental ray materials don't work in High Quality mode,
01:20so that's kind of problematic.
01:22You could try Viewport 2.0, but as you see we still have problems.
01:28I'm only getting the specular component currently.
01:31What that means, of course, is that we will have to do IPRs, go ahead and click on IPR,
01:35drag a rectangle around the object.
01:42We do have a Bump Map in here. It actually is effective right now,
01:46it's just that the scale of the noise is probably too large.
01:50Let's increase the Bump Depth up a bit to .5.
01:56In fact actually, it's the opposite of what I said. The scale of the volume noise
02:00is too small for us to see terribly well.
02:03I could go the Volume Noise attributes and play around with those.
02:07There is a lot going on in here, it's kind of complicated.
02:10The main thing is the Frequency, that's just the scale of the noise.
02:14I could increase the Frequency to make the noise smaller, or I could decrease
02:19the Frequency to make the noise larger. There you go.
02:24That accomplishes basically the same thing as if I had scaled a 3D texture
02:29placement node, but in this case I'm not going to bother with that.
02:33So there is Bump Mapping with mia_material_x.
02:36Really, the only thing to keep in mind is you want to add your bump to the
02:40Standard Bump channel and not the Overall Bump channel.
Collapse this transcript
Adding ambient occlusion to mia_material_x
00:00Perhaps one of the most valuable tools within mental ray is something called Ambient Occlusion.
00:08This is a way of achieving greater realism because in the real world
00:14ambient light that's scattered around in all directions doesn't reach into the
00:19cracks and crevices between things as well as it reaches flat surfaces that are sort of exposed.
00:26What that means is that things like drapery will look much better if you use Ambient Occlusion.
00:34There are many ways of implementing Ambient Occlusion.
00:37What I am going to show you now is how it's built directly into mia material.
00:43I'll select this piece of drapery because that's actually a really good example.
00:46I will go ahead and assign a new material. Right-click and Assign New Material,
00:50mental ray materials that will be mia_material_x_passes. Let me rename that.
00:56I will call it drapery_mia_material_x.
01:02I will just choose a preset, just a matte finished preset nothing fancy.
01:08I'll give it a red color, just give it a pretty bright red.
01:13Now if I just render this now it's not really going to look like much.
01:18Go ahead and do an IPR rendering of that.
01:21It's just a standard CG rendering, it doesn't look like anything special.
01:26It doesn't really catch my eye either. It doesn't read to me as being terribly realistic.
01:31All I have got to do now is go to that material node, drapery_mia_material_x,
01:36and scroll down until you find the section that says Ambient Occlusion.
01:43You can go ahead and turn that on.
01:45But you won't see anything happen just by turning it on.
01:48The way that this particular implementation of AO works is it adds a non-physical light to the material.
01:58That's what this ambient light color is here.
02:00With an ambient light color of black essentially we get no effect.
02:04I will turn the ambient light color up to about half way.
02:09We still don't see much here and it's actually kind of blasting out my diffuse color.
02:14If you do use Ambient Occlusion with this method you'll have to decrease the
02:19diffuse color accordingly.
02:22Turn this ambient light color actually up all the way and I'll reduce the
02:27Diffuse Color down to let's say, maybe half.
02:31We are starting to see the ambient occlusion effect, scrolling back down again.
02:37The other important attribute here is the Ambient Shadow Color. I would
02:41usually set that to black and that's just going to increase the contrast.
02:45Now I'm ready to increase the distance here. This is basically a scale effect
02:50With the distance of four we won't see much.
02:53I'll try a distance of let's say 20 cm.
02:56There we go, now we are starting to see that Ambient Occlusion effect; maybe a
03:00little bit more distance, maybe I will give it a 50.
03:03That increases the effect maybe up to a 100 which would be a full meter.
03:09Didn't seem to change that much up from 50, so I will take it back down to 50.
03:14I will also want to increase the number of samples because you might notice
03:17that that's looking older grainy there.
03:19Increase the number of samples to fight that grain factor.
03:22If I bring it way down to like one sample, it's going to look extremely grainy.
03:28That's very unmistakable.
03:30Usually about 32 or maybe 64 is a good value for that.
03:34So that's pretty cool actually, I mean consider the difference, if I turn
03:38Ambient Occlusion off versus on, it's pretty dramatic actually.
03:44So now there is one other cool trick that we can play here with Ambient Occlusion,
03:48which is we can get color bleeding in the mix.
03:53On the wall next to the drapery, I would like to see a little bit of red splash
03:58bouncing off the drape and landing on the wall.
04:01Currently I don't have that now.
04:02I want to select that wall and if you're not sure if it's selected or not you
04:07can use the Outliner, Window>Outliner, back_wall is the object.
04:13I just want to, once again, right-click and assign a new material,
04:18that will be mia_material_x_passes.
04:23I'll give it a diffuse color, let's choose a preset of
04:28MatteFinish and I'll just leave the color at 50% gray.
04:34Then go back down and enable Use Ambient Occlusion.
04:37Turn the light color up all the way, turn the shadow color down all the way.
04:42Give it a distance that's similar to the other, about 50 let's give it.
04:47Now we are ready to test to see what we got. I'll do another interactive production rendering.
04:54We are getting some Ambient Occlusion here. That's not a shadow actually.
04:58I have disabled shadows.
04:59That's actually just the Ambient Occlusion effect.
05:02Maybe I can reduce the distance a little bit.
05:06You'll see that, we can bring it back up again.
05:09Give it some more samples so it's not so grainy.
05:12Then finally turn on under Use Detail Distance, turn on With color bleed.
05:20You will want to probably do that for both of the objects. I did see a
05:24little bit of change. I got a little bit of red splash there, but I can go back
05:29to my drapery and turn on color bleed on that as well.
05:32You can see here now it's actually bleeding onto itself, the red light
05:36that's bouncing off the drapery is landing on the drapery.
05:40We could maybe play around with this a little bit more and get a better result,
05:43but that's the essential process of achieving the Ambient Occlusion effect directly within mia material.
Collapse this transcript
Using ambient occlusion nodes in shader trees
00:00Ambient Occlusion is a very helpful tool that can be used in any shader network
00:06or shader tree for a mental ray rendering.
00:09It's not just for the mia material.
00:12There is a stand-alone Ambient Occlusion node that you can use to for example,
00:17give the effect of light being blocked to dim the color of a surface. Let's do that.
00:23I am going to create a new standard Lambert shading node for this piece of molding here.
00:30Go ahead and select that and right-click. I can use any kind of material.
00:35In this case I am just going to use a Lambert and give it a diffuse color of maybe a lavender color.
00:44I will go ahead and do a render of that so we could see what that's going to
00:49look like without the Ambient Occlusion shape.
00:51So we got Ambient Occlusion here on the wall, but we do not have any here on this piece of molding.
00:57Go ahead and store that. I'll open up the Hypershade and grab my Lambert, that
01:07I have created here as lambert4, why don't we give that a name, call that molding_lambert.
01:16Go ahead and graph that network and as you see it has no network.
01:19It's just a standalone shading node.
01:22I want to add the mental ray Ambient Occlusion node now.
01:26I'll find that under mental ray textures and you're looking for MIB Ambient Occlusion.
01:33I will click that and it's created.
01:37What I want to do is I want to connect that to some attribute on this shader.
01:42It is a three-point value, this Ambient Occlusion node puts out what's known in
01:47Maya as a vector attribute; it has three components red, green and blue.
01:52I really am not able to connect that to the diffuse amount of a material.
01:57If I select that material node you'll see Diffuse and it's not a color swatch.
02:03When I middle-mouse drag this over here what's going to happen is the connection
02:07editor is going to pop open.
02:09So I'll middle-mouse dragging that and releasing it and I see the connection editor.
02:13Again the reason I'm saying this is because the output of the ambient
02:17occlusion node is a vector which has three values.
02:21The thing that I drag it onto this diffuse amount is only a single
02:27floating-point number.
02:28Maya doesn't know which of the three red, green and blue channels should be
02:33connected to the diffuse input here.
02:37In the connection editor I'll just choose the green channel.
02:40Open up outValue here on the left and select outValueG and I want to connect
02:45that to the diffuse amount here, which is just listed as the diffuse,
02:50go ahead and click that.
02:51I know that's connected because you can see this is highlighting in yellow
02:54indicating there's an incoming connection. We also see the icon here to take us to the input node.
03:01So that connection has been made, go ahead and close my Hypershade and go back
03:07to the Render View, which I have got minimized here.
03:10Let's do an interactive production render on that.
03:13Go ahead and click IPR, and drag a rectangle around that.
03:18It is working, it's just that we need to adjust the values on the Ambient
03:22Occlusion node; go over there and select that.
03:25What have we got? We have got the Bright, the Dark; those are basically
03:28already set the way we want them. There will be a maximum occlusion in the
03:34crevices here because Dark is set to Black.
03:38We've got the Max Distance, that's really the most important one here. It's not
03:42the spread, it's the Max Distance that controls how far that Ambient Occlusion
03:47effect will spread across the surface.
03:51That's a bit misleading. Spread and Max Distance are kind of confusing.
03:56Max Distance is actually the spread.
03:58It's actually how far the effect will spread across the surface.
04:02If I reduce that you'll see the effects.
04:04So Max Distance of 10 or Max Distance of 20 that's going to increase the effect,
04:10where Max Distance of 100, that's too much. Let's give it back to something like 30 or whatever.
04:18So that's all there is to that. The spread is actually something different.
04:22Spread is in fact, how it's going to look around at other surfaces in what
04:28direction it's allowed to look.
04:31You can increase that up to one if you want, it just increases the contrast slightly.
04:36I'll need to increase the number of samples to get a better look here,
04:39maybe 32 or 64 samples.
04:42So I have got an Ambient Occlusion effect happening on that surface.
04:47Again, it's just a standard Lambert shader, nothing fancy.
04:51You can use the Ambient Occlusion node for lots of things. In this case, it's a
04:55lighting effect, but you can also use it for things like a dirt map in which
05:00crevices are a different color than the sort of outer surface of an object.
05:05Really, there's a lot of options with Ambient Occlusion. It's all based upon
05:09distance. It's just looking at whether there's a nearby surface. If there is
05:14a nearby surface within that Max Distance, then the Ambient Occlusion node will output a darker color.
05:21So that's a little bit about Ambient Occlusion. That concludes the chapter on Mental Ray materials.
Collapse this transcript
4. Glossy and Reflective Surfaces
Mapping specular color
00:00In this chapter, we'll be looking at glossy and reflective surfaces.
00:05The first thing I would like to share with you is how to achieve a
00:09non-uniform specularity, in other words, so that an object will not be uniformly
00:14specular or not have a constant highlight across the entire surface.
00:18We're going to map the Specular component.
00:22To do that, I'll add a Blinn Shader to the tablecloth here; select it,
00:26right-click and choose Assign New Material and I'm going to assign a
00:31Blinn material node and in the Attribute Editor, I just want to rename that tablecloth_blinn.
00:38To make it a little bit easier for us to see what we're doing, I'm going to copy
00:42the Attribute Editor off to its own tab.
00:44I've got the tablecloth_blinn node visible and I'll click Copy Tab.
00:49The reason I'm doing that is because, now I can deselect the tablecloth
00:54so I don't have the selection highlighting and I can still work on the shading gear
01:00and close the Attribute Editor.
01:01So what do we want to do in here?
01:04Well, I want to just give it a Diffuse color, first of all. Click on Color and
01:09give it a lavender color and maybe increase the Diffuse amount a little bit as
01:13I always do and scroll down to refresh your memory, how specularity works in this
01:19Blinn Shader here. Eccentricity is the spread of the highlight and Specular Roll
01:24Off is the intensity of the highlight.
01:27We won't always see all of those effects here in the viewport unless we have a
01:32different rendering mode.
01:33I'm just in the default quality of rendering mode here.
01:36For this exercise, I'm going to use Viewport 2.0. That will give us a better
01:41approximation of what we'll see when we do a proper render.
01:45Now I want to map the Specular Color.
01:49In Maya, the Specular Color attribute is the one that we want to map if we want
01:53to vary the specularity across the surface.
01:57I'll go to the Create Render Node button, click on that. I've got a File
02:01node that I want to create, click on File and I want to go to the file
02:06attributes. Since I've got this tab open here, I'll need to click to open
02:11the Attribute Editor once again. I've got my file attributes visible and I
02:16can browse and then, I just simply want to choose this one here, I've got in my
02:22sourceimages folder already, pattern_ seamless_victorian_black_and_white_invert,
02:28click and open that.
02:29Now in order to see the texture in the Viewport, of course, I'll need to press
02:33the 6 key. There you go, we have got specular mapping. You'll notice that
02:39as I navigate around and tumble around in my scene, the specular highlights are
02:46changing as we looked at it from different angles having to do, of course,
02:51with the lighting and if I press the 7 key to see the lighting that I've created in
02:56this shot. Now we get an even better idea of what this will look like, cool.
03:01So all that remains here then is to play around with the Eccentricity and
03:05Specular Roll Off to get a believable result.
03:11If I want to tile that texture across the surface, I want to go back to the
03:15Attribute Editor and I want to go to place2dtexture node and increase the Repeat
03:22UV value to may be let's say, 3 and 3.
03:25So I've mapped the intensity of the specular highlights.
03:29This particular map is monochrome.
03:31If the map had a saturation, then we would see that in the specular highlights as well.
Collapse this transcript
Adding reflectivity with raytracing
00:00To get a mirror reflection or a reflective surface in the Maya software
00:06renderer, you want to add a material that has a Specular component like a Blinn
00:11Shader. You'll also need to enable Raytracing in the Render Settings dialog.
00:16I'll go ahead and add a Blinn material to this candelabra base here.
00:20I'll right-click and choose Assign New Material and from the Assign New Material
00:25dialog choose Blinn and here I've got the Attribute Editor open.
00:29I'm just going to reduce the Diffuse Color a bit.
00:32This will make it a little bit clear for us to see what's going on.
00:36If I do a rendering now, it will just look black.
00:40We don't have any mirror reflections yet.
00:43But if you look in the material attributes, if you scroll down to Specular
00:47Shading, you'll see reflectivity has a value of 0.5, but I don't currently see
00:52any mirror reflections there.
00:53Let's get in a little bit closer, so we can see that a little bit more clearly.
01:00I'll go to the Render Settings dialog and go to the Maya Software tab and
01:04scroll down. You're looking for the Raytracing Quality section. You'll need to
01:08open that up and enable Raytracing. That's going to globally enable
01:13Raytracing which will achieve reflections as well as Raytrace shadows.
01:19I want to mention in passing that just changing the Quality setting up here will
01:24not enable the Raytrace engine.
01:26In other words, it doesn't matter which anti-aliasing quality preset you choose,
01:31the Raytracing Quality options are dealt with separately.
01:36So Raytracing is now on, we do have another rendering, we should start to see
01:40some mirror reflections in there, and there you go.
01:42You see some mirror reflections in that surface.
01:45Reflectivity is enabled for all Blinn materials in Maya. That might bite you,
01:51if you're not careful.
01:53You don't always want a mirror reflection in a Specular component.
01:58For example, my tablecloth here is currently reflecting the environment.
02:02If you look closely, you'll see that there's a little bit of a change in the
02:06specularity here, or if I tumble around to a different point of view, we might
02:11be able to see that a little bit more clearly, that the tablecloth is actually
02:15mirroring the environment. That's simply because I did not turn Reflectivity
02:20off for the tablecloth.
02:23You can see the reflection kind of dimly here, but it is there.
02:26I'll store that image, go back to the tablecloth, back to its shader,
02:33tablecloth_blinn, and turn the Reflectivity down to zero. So that's turned off.
02:40I'll do just another render, so we can see the difference there.
02:44In this rendering, Raytracing is enabled. We can see there's a mirror
02:48reflection here in the candelabra.
02:49But we don't see a reflection here in the tablecloth because I have disabled
02:55Reflectivity locally on that material.
02:58If I go back to a previously saved image, you can see the difference there.
03:01We have mirror reflections in the tablecloth versus no mirror reflections.
03:07That's the basics of how reflectivity works with the Maya software renderer.
Collapse this transcript
Setting raytracing depth
00:00When working with reflections, it's important to pay attention to the raytrace depths.
00:05That's the limit on the number of times a light ray is permitted to
00:10bounce back and forth between reflective surfaces.
00:13If the raytrace limit is too high, then you will have a slow render.
00:19If the ray trace limit is too low, then you might see black spots on surfaces
00:25or just missing reflections in general.
00:27This setting is controlled in two places.
00:30First, in the render settings, and then second in each of these shading nodes themselves.
00:36Let's go into the Render Settings first.
00:38I'll click on the Render Settings window button, go to Maya Software tab, scroll down.
00:44You are looking for Raytracing Quality and open that up and you'll see
00:48Reflections has a value of 10 and that means that a light ray is permitted to
00:53bounce 10 times back and forth between surfaces. That's actually a really high value.
00:58In practice you'll never really need 10 reflections, usually 5 or 6 is all you'll ever need.
01:06However, you can leave this at 10, because you can simply limit the number of
01:10rays on a per material basis.
01:12I'll select one of these guys and hit Ctrl+A to open up the Attribute Editor.
01:17I've assigned this chrome blinn material to the candelabra and the bowl.
01:24Go into raytrace options here and you will see the Reflection Limit is currently
01:28set to 1, and that is the default.
01:31Let's see what that looks like if I render it.
01:34Here we see the result with a Reflection Limit of 1.
01:38The surfaces are permitted to reflect their environment, but they're not able to
01:43reflect themselves and they are not able to reflect one another.
01:46Let me store that and increase the Reflection Limit to 2 and do another rendering.
01:55If we move between these two renders, we can see the difference here.
01:59I'm moving the little scrollbar here at the bottom of the render view.
02:03This is with a Reflection Limit of 1 and that's a Reflection Limit of 2,
02:09and you can see the difference here.
02:11These reflective surfaces are able to reflect one another and they're also able to self reflect.
02:18Store that and I'll set the Reflection Limit up to 3 and give it another render.
02:26Now you see with a Reflection Limit of 3 and then that's a Reflection Limit of 2
02:32and Reflection Limit of 1.
02:34Once again, that's 1, 2, and 3.
02:372 and 3, look very similar.
02:40All we saw was a little bit of reflection here and that was really the only difference,
02:44may be a little bit there.
02:48As you can see, we really don't need to push the Reflection Limit any higher than this.
02:51I said earlier that a value of 5 or 6 is all you'll ever need.
02:56That's especially if you've got lots of reflective objects.
02:59In this particular scene I'm okay with the Reflection Limit of only 2.
03:04Pretty much I wouldn't be able to tell the difference between a value of 2 and
03:08anything higher than that.
03:09That's how you set the Reflection Trace Depth for the Maya Software Renderer.
Collapse this transcript
Shaping anisotropic highlights
00:00For some kinds of reflective surfaces, a Blinn Material is really not going to
00:06give you a really good shiny highlight.
00:09This is especially true for curved surfaces or certain types of reflective surfaces like hair.
00:16In those cases you want a streaked highlight and the blinn shader is not capable of providing that.
00:22A blinn material will always give you a round highlight.
00:26By the way of demonstration, I'll select the candelabra base here and assign a
00:30new shader to it, just a blinn material, just to illustrate my point.
00:35You'll see I've got a round highlight there. I'll increase the Specular Roll
00:40Off and Color to make it stronger and reduce the Eccentricity a little bit.
00:45Do a render with that and we've got Reflectivity in the mix here. I'm just going
00:50to turn that off, just make a little bit clearer.
00:53What you're seeing here are round highlights on that surface. It would look
00:58much better actually if we had a highlight that kind of followed the contours of the
01:03surface and that's called Anisotropic Highlight.
01:07Isotropy means round basically, and Anisotropic means not round.
01:13I'm going to create a new material. That's going to be in Anisotropic Shader.
01:20It's very similar to the blinn shader, except it can give you non-round highlights.
01:24I'll click on that and you can see in the sample slot here already I am getting
01:30an interesting kind of swirly look there to that highlight.
01:34I want to reduce the reflection amount, so we can just see the highlights.
01:38To do that I'll turn this switch off, the one that says as Anisotropic Reflectivity.
01:42I'll turn the Reflectivity down all the way and turn
01:47the Specular Color up all the way, so we can see the effect very clearly.
01:51Open up my Render View again, store the previous image, this is the one with the
01:57blinn material on it, and we'll do a new rendering.
02:00So we get a streaked highlight now. That's the blinn material and that's the end
02:06Anisotropic Material.
02:08I can just adjust some of these values here, maybe I'll just bring the
02:12color down to make it even clearer what's going on. You see there are Spread
02:16X and Spread Y, and Roughness, and Fresnel Index.
02:21Spread is basically how focused the highlight is in each of the two dimensions.
02:27If a low Spread Y and a high spread X, I should see a pretty strong highlight.
02:34There you so, so that's a bit too strong, but that does illustrate my point.
02:39May be I'll reduce the Spread X a little bit.
02:43The Fresnel Index, it's named after a famous Physicist by the name of Frenel,
02:48and that's basically the intensity.
02:51If I reduce that down, you'll see we don't get much.
02:56Do a quick render of that, maybe we'll just do a region render.
03:00See you can see with the low Fresnel index, we're just getting a kind of a blurry highlight.
03:07That's also interacting with the Roughness factor here. If I reduce that roughness, then it will bring that highlight better into focus.
03:18All of these will interact with one another.
03:20You just want to try to feel your way through using the sample swatch up here to
03:26give you a general idea of what it might look like, and then do a proper render.
03:32As you can see the Anisotropic Highlights look a lot better than the standard Blinn Highlights.
03:38Let's go back to that blinn image. All I would need to do is really adjust
03:44these values until I can kind of get it artistically the way I want it.
03:53That's how you work with Anisotropic Highlights in the Maya Software Renderer.
Collapse this transcript
Creating brushed metal with a bump map
00:00To achieve the effect of brushed metal, what you want to do is use up a bump map.
00:06We are trying to simulate the look of micro-fine scratches in the surface of the metal.
00:13Here's what my rendering looks like without the bump map.
00:16I'll go ahead and open up my Render View. This is just the Anisotropic Shader
00:21with no bump map on it. I want to store that image to compare it.
00:26Select the object, go to the Attribute Editor, Ctrl+A, if it's not already open
00:31and go to the shading node.
00:33I just want to add a bump map to this.
00:36I'm going to click to create a New Render Node.
00:38In this case, I want to use a 2D procedural texture.
00:43The reason that I want to use a 2D texture is that it will follow the UVs of the model.
00:49I've done the UV layout on these objects.
00:52In other words, the texture coordinates are done on this and if I used a 3D texture,
00:58then it would be more difficult for me to make the brush pattern follow
01:03the contours of the surface, because a 3D texture operates in basically in world space,
01:09rather than in UV space.
01:12That's why I want to use a 2D texture, instead of a 3D texture, in this case.
01:17Click on 2D textures and I'm just going to use a 2D noise texture, for the bump map.
01:22You can see it's got a Depth of 1, that's obviously going to be way too strong.
01:27Let's take a look at what that looks like if I do a quick render.
01:32That's what we get from the noise texture by default with a Bump Depth of 1.
01:37The first thing I want to do actually here is of course reduce the Bump Depth.
01:41Let's set that down to may be .2 and do another rendering.
01:47Now that doesn't look like brushed metal, but all we need to do is adjust the tiling
01:52and play around a little bit with the noise texture to make it look better.
01:57To get to the tiling, I want to go to the 2D texture placement node, and that's
02:02one of the inputs here. That means one way to get there is just by clicking on
02:08go to the input node here, that's going to take me up the shader tree, until I finally get to a leaf.
02:15In other words, one of the original input nodes.
02:18place2dTexture is here, and I've got Repeat UV, and I'm going to set the repeats
02:26here in order to stretch that bump map across the surface.
02:31I'll leave the U Repeat value at 1. I'll set to the V value way down to,
02:36let's say .01, do another rendering, see what that looks like.
02:42Now it's stretched, and you see I've got it stretching up and down.
02:46If I want to stretch in the other direction, of course, I can set these values the other way.
02:51I can set Repeat U to .01 and repeat V to 1, do another render.
03:00We're getting there, it's looking pretty good.
03:02All I really want to do now is play around with the noise texture a bit, because
03:05I think that we're getting too much variation.
03:08I'll go back to the output nodes here and there is my noise texture.
03:13I just want to reduce the Amplitude a little bit and based upon this Sample
03:17swatch here, I can determine whether I'm getting the right contrast or not.
03:22Additionally, what I would like to do is have finer lines and to do that,
03:27one way I can do that is to increase the Depth Macs, what that's going to do is
03:32reiterate the noise algorithm more than once and we'll essentially get lines
03:37inside of lines with a higher Depth max. Do another render, and I think we're where
03:44we want to be with the actual texture. I just think I need a little bit less of a Bump Depth.
03:50I'll go to the Output Node here, here is my bump2d and I'll just reduce that down to .1 or so.
03:55That's our brushed metal effect using a bump map.
Collapse this transcript
Controlling the bidirectional reflectance distribution function (BRDF)
00:00To get the best results from metal materials, you want to simulate an optical phenomenon
00:05known as BRDF and that stands for the Bidirectional Reflectance Distribution Function.
00:14A bit of a mouthful, but all it is, is just a representation of how shiny
00:20surfaces react to light in the real world.
00:23When you look at a shiny object, whether that be metal or even water or glass,
00:29the reflections will actually be stronger on the edges of that object and the
00:35BRDF effect is stimulated in Maya in various ways.
00:40The simplest way for us to do that is with the mia material shader with mental ray.
00:46I'm going to open up my Render Settings and choose mental ray as my renderer.
00:53I'm going to select the object, right-click and assign a new material and
00:57I'll just use the mental ray mia_material_X_passes;
01:04go to that material and I'm just going to choose a preset here;
01:09the Copper preset works well in this case.
01:12I'll replace all those attribute values with those from the copper preset and
01:17let's do a rendering of that.
01:21Here it is with just default values. I'm going to go ahead and save that image.
01:27Let's go and play around with BRDF section here in themia_material_x_passes shader.
01:34What you'll see here, is a 0 degree reflection and 90 degree reflection.
01:39That means how reflective is the surface, whether it's pointed towards the view
01:44or at 90 degrees to the view.
01:48It will be a lot easier for us to see if I go back up into the Reflections
01:53section and set the glossiness up all the way. I'll do another rendering.
01:59With the default BRDF values, we won't see a huge difference.
02:03You can kind of see it's a little bit brighter on the edges.
02:07Let's scroll down and we'll really exaggerate this by reducing the 0 degree reflection down to 0 and render.
02:15Now what we see here now is that the faces that are pointed towards the
02:22camera are rendering as nearly black, because there's almost no diffused component here.
02:28Any edges are highlighted; and that's the BRDF effect.
02:33I can play around with this curve to accentuate that or reduce the effect.
02:40So if I have a low value to the BRDF curve, what we'll see is it's going to kind of spread out more.
02:47We're seeing more of a spread here. If I have a high BRDF curve value,
02:53essentially, we're just going to only highlight the extreme edges.
03:00To that point we can barely even see the effect.
03:03So you can do this by hand, manually, and play around with this and get the look that you want;
03:11that's one approach.
03:14The other approach is to use some sort of physically accurate and automatic
03:19version of BRDF and if you to do that you'll enable the switch that says Use Fresnel Reflection.
03:26When you enable that, these manual attributes are disabled.
03:31Let's see what that looks like by default with Use Fresnel Reflection turned on.
03:34You'll see it doesn't look like much.
03:37The secret here is that the Fresnel Reflection relies upon the index of refraction for the material.
03:46That seems a little bit non-intuitive, but it's there so that the material
03:51will be physically accurate for both glass and metal.
03:57The index of refraction is the amount that light is bent as it moves from one
04:02transparent medium to another. That's going to be found actually in the
04:06Refraction section up here.
04:08Index of Refraction is set to 1.4 and that's somewhere between the refractive index of glass and water.
04:17To get a metal effect, what I want is actually a fractional Index of Refraction.
04:24If the IOR was set to a value of 1, that would behave like air.
04:29If it has a value less than 1, then it will behave like a metal.
04:33In fact, I would just actually reduce the IOR down to as low as it will go, value of 0.1.
04:38With Use Fresnel Reflection turned on, we should see a physically accurate result to the metal here.
04:49It is more reflective on the edges and less reflective in the center.
04:54That's how you use BRDF for metal materials, using mental rays' mia_material_X.
05:02That's our chapter on glossy and reflective surfaces.
Collapse this transcript
5. Transparency and Translucence
Rendering refractions
00:00One of the most essential techniques in shader network creation is building a
00:06working glass shader. We are going to learn about that in this chapter.
00:11That will apply actually to other software besides Maya because the principles are all the same.
00:16I'll start by a assigning a Blinn material to my martini glass, select it and
00:22right-click and choose Assign New Material, that will be a Blinn Shader.
00:25I just want to change up a couple of these attributes, so let me rename this.
00:30I'll call it glass_blinn and just play around with some of the basic attributes first.
00:37The color should be almost black.
00:40I am going to bring that Diffuse Color down to nearly nothing.
00:43Glass doesn't really have a diffused reflection, because it's very highly polished.
00:50Transparency, I want to increase that up to maybe about .9 or something like that.
00:54Then I want to just give it a little bit better highlight here, a very
01:00small, but intense highlight. I'll reduce the Eccentricity and increase the
01:05Specular Roll Off up to a value of one.
01:08I'll render it out and see what it is looks like.
01:11Here it is, with no refractions.
01:13Refractions are the bending of light as it passes through a transparent medium.
01:20Currently we have no refractions and so we don't have a very good look to our glass shader just yet.
01:26We'll need to turn Refractions on, scrolling down a bit and I can turn
01:32Refractions on, but if I render, I still won't see the refractions.
01:37The reason is, once again, that the Raytracer is globally disabled by default in Maya.
01:43I want to go into the Render Settings window, the Maya Software tab and under
01:48Raytracing Quality just enable Raytracing.
01:51While we are here, we can see the trace depth limits.
01:54We are only able to get one reflection by default, where we are getting
01:59six refractions, that means a light ray is able to bend six times through a transparent medium.
02:04I am just going to bump the Reflections up to two. I'll leave Refractions at 6 and that should be fine.
02:09Let's see what we get when we rendered now.
02:13We are still not seeing refractions, we get our reflections.
02:16You can see there is a little bit shiny reflection on there, but we are still
02:19not seeing the refractions because the final part of this is we need to play
02:23around with the Refractive Index.
02:26That's the amount that light is allowed to bend as it travels through a transparent medium.
02:32A Refractive Index or index of refraction of one corresponds to air.
02:39What that means, in this case, is that the light is not bending at all because the
02:45material is being considered to be the same density as air.
02:50What I am going to do is increase the Refractive Index or index of refraction.
02:55The index of refraction for normal glass is 1.5; go ahead and do a render of that.
03:02There we are getting our refractions.
03:04Now if you want to spend a little bit more on our martini glasses, we can
03:08actually use leaded glass and that would actually have some greater Refractive
03:12Index of about 1.7; see if we can see the difference here.
03:18That's a refractive index of 1.5; you see here and 1.7, which just means it's a
03:25little bit denser and I think it looks a bit better.
03:28That's how we can add refractions in the Maya Software renderer.
03:33We'll also play around with the reflectivity based upon face angle.
Collapse this transcript
Finding the facing ratio with Sampler Info
00:00We have got a pretty good start on our Glass Shader here.
00:03We have got reflections and refractions.
00:06What I would like to do is to modulate the reflectivity to simulate the
00:12BRDF phenomenon, which is the Bidirectional Reflectance Distribution Function,
00:17in which surfaces are more highly reflective on the edges than they are in the center.
00:26Now I can do that of course with mia_material_x in mental ray, but now we are
00:32going to do it in Maya Software using a couple of utility notes.
00:36The first thing I'm going to do is find the facingRatio of the surface with the
00:41Maya utility node, called Sampler Info.
00:44That's going to pass the angle of the face to the shader. In other words, if
00:50the face is pointing towards the camera, one value will be passed to the shader
00:55and if the faces are pointed at 90 degrees away from the camera, a different
00:59value will be passed to the shader. All right.
01:02So we'll do this in Hypershade window, rendering editor is Hypershade,
01:09Here is my glass_blinn material. I'll right-click and graph that network.
01:13I'll also hit Ctrl+A to open up the Attribute Editor so we can see the
01:18connections as we make them.
01:20Now I need to find the utility node, that's going to be on Maya utility node.
01:25Let's see here, Utilities and I'm looking for Sampler Info, so I'll scroll down
01:31to the Ss, Sampler Info.
01:33Click on that and it's created and I want to connect that to glass_blinn.
01:38One way I can do that is select the glass_blinn material node and in
01:43the Attribute Editor, I can middle-mouse drag the Sampler Info node onto Reflectivity.
01:49Maya doesn't know which of the many sampler info node attributes should be
01:54connected to reflectivity, so I'll have to do that in the Connection Editor,
01:59which is popped up automatically.
02:01Your Connection Editor might look a little bit different than mine because I've
02:05chosen to list the attributes in alphabetical order from the Options here,
02:10Options>Attribute Order>Alphabetical.
02:13I want to connect the facingRatio to the reflectivity. To do that I'll click on
02:18facingRatio, on the Output node here which is Sampler Info and I'll find
02:24Reflectivity here on the Input node, which is my Blinn Shader.
02:28Here is Reflectivity.
02:29When I click that, the connection is made. You can see it here, it's
02:33highlighted in yellow in the numeric field, meaning there's an incoming
02:36connection and we've also got go to Input node button now. All right!
02:43Let's do a render of that, see what it looks like and if we scrub through here
02:48and look at the two versions, we see a subtle difference here.
02:52This is the version with no facingRatio in which the reflectivity is constant
02:58across the surface. Then this one is the one where we've added the
03:02facingRatio with the Sampler Info node.
03:05This rendering shows the effect with the Sampler Info node connected.
03:11What you'll notice here is that, in fact, it's the inverse of what we want.
03:16It's more reflective here in the center and less reflective on the edges.
03:20If I scrub pass through these two versions, you can see that.
03:25The facingRatio is going to cause the faces that are pointed towards the camera
03:31to have a higher reflectivity by default.
03:34We can change that and we'll do that in another movie in which we add a utility node called Remap Value.
Collapse this transcript
Modifying transparency with Remap Value
00:00Our build your own glass shader is coming along.
00:04We've got the Facing Ratio mapped onto the Reflectivity, but currently we're
00:08getting the inverse result of what we want.
00:11The desired result is that the surface should be more highly reflective on
00:16the edges and less reflective in the center. We're currently seeing opposite of that.
00:21We can easily invert the Facing Ratio using a Maya Utility Node called Remap Value.
00:27I'll go to Hypershade and I've got the Attribute Editor open as well.
00:35I'll right-click on my glass_blinn shader and graph its network.
00:39With a samplerInfo's facing ratio directly piped into the reflectivity,
00:45we're seeing more highly reflective surface in the center and less reflective on the edges.
00:51To invert this, I'll use a Remap Value node.
00:54Go to the Create section here in the Hypershade.
00:57I'm looking for Utilities and we're looking for Remap Value.
01:04Here it is, Remap Value.
01:06Click on that to create it.
01:08I just want to pipe the samplerInfo's facing ratio through the Remap Value.
01:14With that remapValue selected, I can middle-mouse drag the samplerInfo on to
01:20this Input Value field here.
01:22I will get the Connection Editor popping up, and I want to connect the
01:27facingRatio to the InputValue.
01:30So that's connected.
01:33I want to break the existing connection here.
01:35Samplerinfo is also feeding into glass_blinn reflectivity, so I want to
01:41delete that connection.
01:42Select it, press the Delete key on the keyboard.
01:46Select that blinn shading node. I want to middle-mouse drag the remapValue
01:51onto the Reflectivity, middle-mouse drag.
01:55So now, that's been done.
01:57The connections of all been made. We just need to invert the values.
02:02I'll go to the remapValue node. You've got two sections here.
02:06You've got Value and Color and these are both outputs.
02:12The Value section here is a single floating-point number and that's the
02:17section that we need here.
02:19In other words, the facing ratio is just a single number.
02:21It's not a 3pt vector attribute like a color.
02:24To invert the Value, I'll play around with this graph here.
02:28Just simply pull this point up to the top and pull this point down to the bottom
02:34and now I just inverted the reflectivity.
02:39Let's see what that looks like in my Render View back up again.
02:42Make sure I've stored the previous version, so we can compare them and do another rendering.
02:50This is the version where I've inverted the facing ratio.
02:55This is the version that has not been inverted.
02:58So with the inverted facing ratio we're seeing highlights on the edges, because
03:03it's more reflective on the edges according to the BRDF function.
03:07The other thing that BRDF does is actually increase the transparency for
03:12surfaces that are pointed towards the viewer.
03:16I want it to be more transparent here in the center and more opaque on the edges.
03:22I can do that with the Hypershade, just with the shading network that I already have.
03:27Reopen Hypershade, reselect that remapValue node to point out that I've got
03:33this Color section here.
03:35The Color output is independent of the Value output.
03:39The remapValue node has a single input, but it has two outputs: a floating-point
03:45output and a vector output with three values.
03:49That means, I can just take that same remapValue node and connect it to the
03:54glass_blinn's transparency shader.
03:56I don't actually need to create a second remapValue node.
04:00I'll select the glass_blinn material. I just want to middle-mouse drag the
04:05remapValue node onto the Transparency and that connection has being made.
04:09You'll see that Maya has combined the connections here.
04:12If I hover my mouse, you'll see it says remapValue1.outValue is going to
04:17reflectivity and outColor is going to transparency.
04:23In fact, the Color here is basically set up the way that I wanted.
04:28It's not inverted, but I can adjust and probably make it better.
04:31Let's see what we've got.
04:33Go back to my Render view.
04:34Make sure I've stored that and do another render to compare the difference.
04:41So there it is with the remapValue Color output feeding into the blinn's
04:47transparency, so that it's more transparent in the center and less
04:51transparent on the edges.
04:54Compare that with the version before I made that connection.
05:00We're almost finished here.
05:02All we need to do is adjust this Color ramp here in the remapValue node.
05:06What I want is a greater degree of transparency throughout, and to do that,
05:12I can move this flag over closer and this is just saying the object is mostly
05:18transparent, except for at the edge.
05:21Go ahead and store that rendering; do a new render.
05:26Now, you'll see that we're getting very strident look to this and we can
05:32kind of dim that down a little bit.
05:34Maybe I'll select this Color flag here and reduce its brightness a bit, so we'll
05:40have a little bit of opacity, it won't be completely transparent.
05:47So that's a pretty good glass shader.
05:50We can go back of course and adjust any of those parameters to get the
05:53result that we want.
05:54But the basic principle here is to find this facing ratio and plug that into
05:59the transparency. Also find the facing ratio and invert it and plug that
06:05into the Reflectivity, and that's your build your own glass shader using the Maya Software Renderer.
Collapse this transcript
Rendering solid glass with mia_material_x
00:00We've seen how to build our own glass shader from Maya Software.
00:04If you want to render in mental ray, you have the option of using mia material
00:09and it's got a preset for solid glass.
00:12Let's take a look at that.
00:13First thing, of course, I want to do is to activate mental ray as my renderer,
00:17going to the Render Settings and choose mental ray as my renderer.
00:22In the Quality section I want to turn he Quality Preset up to Production.
00:29What that's going to do is increase the amount of samples, it's also going
00:33to increase the Raytrace limits here.
00:36I just want to knock the number of samples down one notch to a Max Sample Level of 1,
00:42just so that my interactive production renderers won't be quite so slow.
00:46So I've setup the renderer and now I want to assign the material.
00:51I'll select the object, right-click and choose Assign New Material.
00:55It's going to be a mental ray material, mia_material_x_passes.
01:01I go to that shader, let me give this a name.
01:07I'll call it glass_mia_material.
01:08Now I'll choose the Preset, hold on the Presets button and you'll see there are
01:13multiple versions of Glass here.
01:16The one we want in this case is GlassSolid.
01:17We're just going to render it quicker than GlassPhysical.
01:23It's going to look good and it's not going to be physically accurate,
01:27but it will be close enough. Choose that GlassSolid>Replace.
01:33Without having changed any of the attributes let's take a look at what that renders as.
01:37What we see here now is a tinted glass effect, that's pretty nice.
01:43Let's turn that into just a standard ordinary glass.
01:48I'll store that image for comparison. Go back to my material and I want to
01:52scroll down looking in the Refraction section.
01:56It's got the default IOR, Index of Refraction of 1.5;
02:00I do want to turn that up a little bit to 1.7.
02:03That will give the effect of leaded glass.
02:06It's a little bit denser and will bend light a little bit more.
02:09The tinting is coming from this Refraction Color here.
02:12I'll just click on that color swatch. I'll set that to white, and we'll do
02:16another render, see what it looks like.
02:20Not bad at all and it didn't take very long to get that set up.
02:23We can play around with this a little bit more. We can scroll down a bit.
02:30You've got to the BRDF section and that's Bidirectional Reflectance Distribution
02:36Function once again and you'll see Use Fresnel Reflection is enabled.
02:41What that means is it's going to look at your Index of Refraction to
02:45determine the BRDF effect or how an object will reflect or refract light based
02:52upon its angle to the viewer.
02:55If I turn that off, then I have the ability then to adjust this manually.
03:01Store that image, and just to play around with this a little bit I'll set the
03:050 Degree Reflection to 0, meaning that if the surface is pointed towards the
03:10camera then it will get no reflections.
03:13Do a quick render of that.
03:15You can see that that has changed the look considerably.
03:18Here is the version with BRDF reflections and here is the version where I've
03:22just set it manually.
03:24I could play around with that a bit more but I think the Fresnel Reflections are
03:28easier and probably better, so I am going to turn that back on.
03:32There is one more option I do want to show to you, which has to do with whether
03:37surfaces will reflect on their inside or not.
03:39In this case I do want reflections on the inside of the glass.
03:43To achieve that effect I want to scroll up, I'm looking for Advanced
03:47Reflection and I want to disable Skip Reflection On Inside, turn that off and
03:54do another rendering. Cool!
03:57So that's the effect that we get with Skip Reflection turned off and we're using
04:02just a standard BRDF effect from the Index of Refraction.
04:08There is just one little thing that I can maybe adjust, because this is kind
04:12of getting lost here; maybe I'll just knock the Transparency down just a tiny bit,
04:16because glass actually does absorb light slightly.
04:20I'll give that a Transparency of 0.98 and re-render.
04:26So that's how we can set up mia material x for a glass shader.
Collapse this transcript
Backlighting materials with translucence
00:00Some objects need translucence.
00:03A card like this, a little card on the table here is a thin piece of paper.
00:08Light needs to shine through the paper.
00:10To achieve that effect we can use the Translucence Attributes in the Material Shader.
00:16I'll start by assigning a new Maya Lambert material to the card, select the Card
00:21and right-click and Assign New Material, it will be a Lambert.
00:24I'll go ahead and rename it in the Attribute Editor, call it a card_lambert.
00:28I have got a bitmap for the color here, so I want to click to create a New
00:34Render Node, it will be a File node and then browse for that file and it's
00:38Reserved.png. We can see it here in the viewport and it looks good there.
00:44If we do a render, however, we won't see the image, in fact, we won't see the
00:49card at all, it will render as perfectly black.
00:52The reason this is happening is because the only light in my scene currently
00:57is a directional light that's shining through the window. It's illuminating
01:02the other side of the card just fine, but we cannot see light shining through
01:06the card, until we enable translucence.
01:10So there it is with no translucence, I'll go ahead and store that image.
01:15I want to go back to the material, so I'll select my object, go back to that
01:19card_lambert. You'll see Translucence here in this section, and there are three Attributes:
01:26Translucence, Depth and Focus.
01:30Translucence is the overall amount of translucence, how much light is able to come through.
01:35Depth is how far that light is able to travel, and Focus has to do with
01:42where that the light is directly behind the translucence material or translucence object.
01:49I'm going to just increase the overall translucence, I'll crank it all the way
01:53up to value of 1. Currently we don't see any change here in our sample.
01:59If I play around some of these other attributes, we'll see things start to change a little bit.
02:07So I want a really high translucence depth. I just want to make sure that the
02:11light is able to penetrate completely through the card.
02:15This is currently in Maya Scene Units, which are centimeters in this scene.
02:19That means light able to travel 5 centimeters through.
02:23The Focus here, I want to set that to actually a really low value.
02:27If we have a high focus, then the light source has to be directly behind the object.
02:31If it has a low focus, then it basically diffuses light all through, regardless
02:37of the position of the light relative to the object.
02:40So if we render this now, we should start to see some translucence.
02:43Yes, we can see it in the front of the card now. Cool!
02:48You will notice however that it looks kind of overly bright.
02:52It's kind of blasting out a little bit.
02:54This side of the card here is actually overexposed.
02:57The tabletop next to it is actually an ideal diffuse material, which means that
03:03it's reflecting 100% of the light back. This one is actually greater than 1,
03:09or it has a brightness value that's greater than 1 currently.
03:14In order to get a more realistic effect, what we need do is balance the Diffuse
03:19Amount with the Translucence Amount.
03:22The two of these should add up to approximately 1. Let's try a Translucence of .8 and
03:28a very low Diffuse amount of let's say .2, and do another render of that.
03:38Let's store this version and then do one more render, and now we've
03:42corrected the backside here. It's not overexposed any longer and it's
03:48rendering as the same color as the ideal diffuse material behind it, but I'm
03:53going to cheat it just a little bit.
03:55I want to have little bit brighter color on the backside of that card.
03:59So we'll let this render finish and then store it, and I'll just play with the
04:05values a little bit, I think I want a little bit more Diffuse, maybe value of .3
04:12and one more render.
04:14That's the process for creating Translucence Effects with a Maya Shader.
04:20Translucence exists also in the blinn and other shaders, not just in the Lambert material.
Collapse this transcript
Mapping translucence
00:00We can get much better results from translucence if we simply map the translucence channel.
00:06This rendering you see on the screen here has no mapping to the translucence.
00:10So it's equally translucent across the entire surface.
00:13Just adding a map, it's really going to make a big difference to improving the quality of this look.
00:18I want to go ahead and select the card in the viewport and open up the Attribute
00:23Editor, Ctrl+A and go that material and you'll see Translucence here.
00:27I want to place a map into that translucence channel. I'll click to add a Render
00:32Node, and I'll just use the 2D Noise Texture, 2D Textures>Noise and there's the
00:40noise, which is default parameters.
00:43Let's see what that looks like if we render it.
00:45I have a feeling it's not going to look so good. We'll need to play around a bit
00:50with those noise attributes and get that looking better.
00:53But this is just the default result by just plugging noise into the translucence.
01:00That's the result we see from just default noise. Let's play around with some of these parameters.
01:05The first thing I want to do is change the type of noise. Scroll down, you'll
01:09see Noise Type and there are several to choose from, the one I'm going to use is
01:14Perlin Noise, because that's going to work best for this sort of vellum look I
01:18want to achieve here.
01:19The other thing I want to do is turn on this switch that says Inflection.
01:24You can see in the Sample slot what it's doing here.
01:26It's this kind of amplifying the noise.
01:29Now what I want is a kind of low contrast noise.
01:32I wanted to have a very high black point.
01:35In other words, I don't want any pixel in the noise to be very dark.
01:39To achieve that I'll increase the Threshold here, that's the black point or the brightness.
01:43I'll set it to let's say about .64 or something like that.
01:48Now as you see as I've done that, it's kind of over exposed the materials.
01:52It's kind of clipping, we're losing information in the brightest parts of the texture.
01:58To get that information back, I'll reduce the amplitude and that's the white point or the contrast.
02:04I want a really high Threshold and a low Amplitude in this case; maybe I'll
02:08give it an Amplitude of .2. I want a little bit more detail on this material as well.
02:15This Noise Texture, really, it's going to look better if I increase this Depth Max a couple times.
02:20What Depth Max does is it reiterates the noise.
02:25You're getting waves of noise inside of waves. The higher the Depth Max, the more detail you'll get.
02:32Then finally, I just wanted to play around with the frequency here.
02:36That's just the overall size of the noise. It's got a frequency of 8.
02:40That's going to be a fairly high frequency noise or noise that's going to be pretty small.
02:45I want to just reduce the frequency, or increase the wavelength is another way of saying it.
02:50I think that's going to look pretty good now, actually.
02:53That's the sort of look that I'm trying to achieve with this.
02:57let's do another rendering.
03:03That's the result after we've added the noise to map the translucence. We store
03:09that image and we can compare it to the non-mapped version, if I pull back my
03:14slider here at the bottom of the render view.
03:17That's the mapped version and the unmapped version. You can see the mapped
03:21version looks a lot better and it not only has a texture to it, not only does it
03:26have a feeling that it's actually made of some sort of vellum or an interesting
03:31paper, but it also helps to accentuate this profile here, because it's not a
03:36uniform color across that line.
Collapse this transcript
Rendering skin with subsurface scattering
00:00To get good results for human skin, we'll need to simulate a phenomenon known
00:05as Subsurface Scattering.
00:08That's when light enters an object and bounces around inside the object and sort
00:13of illuminates it from within before exiting in a diffused fashion.
00:18That's what we see here in this final rendering. The character's ear is showing
00:23as kind of red because there's a light shining behind the character's face.
00:27So let's reproduce this.
00:29Minimize that view. You can see I have got lights in the viewport here.
00:34I just want to hide those. I will go to the Show menu and just disable the display
00:39of Lights so that won't distract us.
00:40I will assign a material to the character's head, select that Mesh and
00:45right-click and choose Assign New Material. It's a mental ray Material.
00:51You will see that there are bunch of variations on subsurface scattering and they
00:56all have sss in their name.
00:58The one that we want today is misss_fast_skin_maya.
01:03I will click on that and I get an auxiliary dialog here.
01:07I will get this little dialog popping up that asks me Should I use the selected Lightmap.
01:11A Lightmap is a node that's required for the subsurface scattering to work.
01:18We really don't need to see this dialog, but it's here anyway. We can either
01:22close the dialog or we can click Use selected.
01:26If we created the shader from within Hypershade, we wouldn't see this dialog.
01:30We won't really be able to see the subsurface scattering effect in the viewports.
01:34We will have to do a rendering in order to see that look.
01:37I will go ahead and do a quick rendering of this viewport.
01:41Now this is the result we got with just the default skin shader applied.
01:49Let me store that so we can compare it later.
01:52Here is the final version I came up with. Here is what we get when we first
01:57add the shader; so there is quite a dramatic difference between those two.
02:00So let's play around with the shader attributes. I want to go into that shading
02:06node and let's look at some of these properties here.
02:09The Ambient color, I am going to leave it black.
02:12The Overall Color is the sort of complexion of your character. For a fair skinned character,
02:17we will leave the overall color at white.
02:20What Overall color does is it multiplies all of the other values below it.
02:26If it has a value of white, then it's not going to dim down any of these others.
02:31But if your character has a dark complexion, you can just reduce the Overall Color.
02:35The Diffuse Color is the color that's reflected back from the extreme outer layer of the skin.
02:40I am just going to change that up to a sort of peach or Caucasian skin color.
02:46I am going to increase the Diffuse Weight just slightly, that way it'll be a little bit less waxy.
02:53I've adjusted all these values previously in my preparation for this course.
02:59I am just going to go through and change a whole bunch of values and explain them as I go.
03:05In your own scenes you are going to need to tune the values to the scale and the
03:10lighting conditions of your particular scene.
03:13In the Subsurface Scattering layer here you'll see that there are three color slots
03:17and there are numerous attributes below those.
03:21These have to do with three different properties of skin.
03:24You've got the Epidermal layer, which is the layered just below the skin.
03:30Then you got the Subdermal layer, which is layer below that, that's sort of between
03:34the skin and muscle. Finally, you've got a backscatter section, and this
03:38has to do with light that's shining behind the subsurface scattering object.
03:44That's the sort of translucency effect.
03:47The Epidermal Scatter Color, I am going to leave that where it is at a sort of peachish,
03:52but I just want to play around with some of these values; maybe
03:56reduce the Weight of the Epidermal layer.
03:59Each layer has a weight factor and they all add together. I am going to
04:05set that Epidermal Scatter Weight to 0.300., Then we'll go down to the Scatter Radius.
04:12This is the distance that the light is able to move through the objects.
04:18So I will set that value down to let's say 5 cm.
04:23Subdermal Scatter Color, I think I want to change that to a slightly pink color.
04:29Then play around with the weight here as well. Let me reduce the Weight of
04:33the Subdermal Scatter Component and most importantly, the Scatter Radius.
04:39The Scatter Radius here is what's causing the object to look really small,
04:44because the light is able to scatter inside the object too much, too great of a distance.
04:50Let me set that down to a value of 8.
04:53Then we have the Back Scatter Section, which is the translucence.
04:56I am going to, once again, play around with the values here.
04:59I am going to leave the Weight at 0.500, but I will set the Back Scatter Radius and Depth to 8.000.
05:07Back Scatter Radius is the distance that light is able to penetrate into the object.
05:11Backscatter Depth is the amount that the light is able to bounce around the inside.
05:20So I've adjusted a lot of those attributes. Let's do a rendering and see what it looks like now.
05:29So now this is looking a lot better.
05:31We can see that we're getting a little bit of that red outline there from the
05:35light coming behind the character. We can maybe play around with some of
05:40these,kind of maybe improve it a bit, maybe increase the Backscatter Weight.
05:47I will just do a Region Render here.
05:49By the way, Interactive Production Render does not work with Subsurface
05:52Scattering because of the Lightmap.
05:54We can only do region renders.
05:56So I have increased the Backscatter Weight and that's increased the amount of Translucence.
06:03Then we've got the Specularity, and this particular shader actually has two levels of specularity.
06:11The Primary Specularity is for the sort of overall specular highlights.
06:17The secondary specular level is for a second level of specularity that has to do
06:23with maybe the oil or the shininess on the skin.
06:27Again, I've already adjusted these in my own scene and I have written down all the values.
06:31I am just going to plug those in here.
06:34For the Primary Specular Color, I don't really want this blue.
06:36I prefer it to be just a neutral white.
06:38The Primary Weight here, I am going to leave that to add 0.300.
06:45The Edge Weight here, I will leave at 0.800 and that has to do with how bright the edges will be.
06:50The Primary Shininess, I will also just leave at the default of 0.500.
06:55But the Secondary Color is one that's of more interest to me and the one that
07:00I will need to play around with.
07:01Maybe I will change the Secondary Specular Color to white again and then play
07:05around with the Weight here.
07:07I will give it a Secondary Edge Weight of 0.400 and a Secondary Shininess of 50.
07:14I want to really increase that a lot to put some gloss on the character's skin,
07:20and I will do another rendering of that.
07:26That's the result that we're getting now.
07:28We can maybe make this a little bit better by perhaps increasing the Secondary
07:32Weight to let's say 0.400. What that will do, it will cause these highlights here;
07:38they represent the oil on the skin.
07:40They will cause those to come out a little bit more strongly, and do one more render.
07:49That's the result that we've achieved from just a few minutes of playing around with these attributes.
07:53Of course, if we wanted a more sophisticated skin shader, we need to map these Attributes.
07:58We would want to map the Diffuse Color and map the Specular and map all the Attributes really.
08:04Well, that's a good introduction to creating Subsurface Scattering with Maya and
08:10Mental Ray. That concludes our chapter on Transparency and Translucence.
Collapse this transcript
6. Surface Relief
Adding detail with a displacement map
00:00Previously in this course we looked at Bump Mapping, which is a way of
00:04simulating surface detail on an object.
00:07However, Bump Mapping doesn't actually change the shape of the object, and if
00:10you look at its profile, it won't be changed.
00:13If you want the object actually be deviated, to actually change the shape of it,
00:18then you can use a Displacement Map to do that.
00:21Displacement Maps work with NURBS surfaces. That's what we have here on the
00:27ground plane outside the window, that's a NURBS object. I want to Assign a New
00:32Material to that to begin.
00:33I'll right-click and choose Assign New Material. It will just be a standard Lambert material.
00:39I just want to increase the brightness of it a bit,
00:42and change its name. I'll called it ground_lambert.
00:46If you look through the Material Node Attributes, you will not see a Displacement Map channel.
00:51In Maya, Displacement Mapping is dealt with through the shading group.
00:56That, of course, is a collection of all the objects that have that particular material assigned.
01:00Here is the shading group now, Lambert4SG.
01:04I want to rename that as well, while I am at it. I will al it ground_lambertSG.
01:09Here you'll see a slot for Displacement Material. I'll go ahead and add a map
01:15by clicking on Create Render node. I just want to use 2D Noise Texture, click on Noise.
01:22You'll see that Maya has taken us to a displacementShader node. There are
01:26some attributes in here, but there's no need for you to change any of this.
01:29You might be fooled into thinking that changing the Scale here will increase the height of
01:33the deviation of the displacement, but it doesn't.
01:36In order to do that, you need to do that in the texture itself.
01:40Let's go to that texture, which is noise1. I want to have some rolling sort
01:45of sand dunes outside the window.
01:47To achieve that I want to use a different type of Noise. Instead of Bilow, I am going to choose Perlin Noise.
01:53I'll also make some other changes here. I don't need such a high frequency.
01:58I want sort of rolling hills, so I'll reduce the Frequency, increasing the wavelength.
02:03We've got a few Attribute set here. We'll go ahead and try to render this now.
02:09It does have a displacementShader attached to it, but we won't see any
02:13Displacement out the window just yet.
02:16The reason is the Amplitude, or the height of the Displacement, is so small
02:20compared to the size of the object.
02:22Before we start playing around with the Amplitude, or the Height of that
02:27Displacement, we will need to go and do a performance optimization, which is
02:33called Calculate Bounding Box. That is found in the NURBS shape node.
02:37I'll need to select that NURBS object and go to its Shape node. There is a
02:42section that says Displacement Map. I just I want to click the button here
02:46that says Calculate Bounding Box Scale. That just optimizes performance to
02:52make sure that we don't have a lot of unnecessary memory usage.
02:56Once that's been done, then I can go back to the Displacement Texture and
03:01increase the Amount of Displacement.
03:03To get back to there, I'll choose the ground_lambert tab and I want to go to
03:09its output node, which is the shadinggroup. From there I can get to the Noise Texture.
03:16I want to scroll down, what I am looking for is the Color Balance section.
03:21This is actually how you change the Height of your Displacement by increasing
03:25this Alpha Gain Attribute, that's the strength of the Alpha.
03:29The texture here is actually putting out an RGB color and it's also putting out an Alpha.
03:36It is the Alpha that is connected to the Displacement.
03:41If I want a greater amount of Displacement, I'll need to increase the Alpha Gain.
03:45I've experimented with this previously, and because of the size of my object,
03:50I need to have a very, very high Alpha Gain on the order of a 1000 or 2000.
03:54I am going to set that to 1500 and do another rendering.
04:01We've got some Displacement out that window.
04:03Next, we'll actually likely play around with increasing the quality and basically
04:07optimizing performance for rendering.
Collapse this transcript
Controlling displacement tessellation
00:00We've added a Displacement Map to deviate the shape of the ground plane outside our window.
00:07What we want to do here is just optimize performance. We want achieve the result of
00:11we have a highly detailed surface, but we only want that to be just
00:17detailed enough and no more.
00:20We control the quality of the Displacement through the NURBS Tessellation Attributes.
00:26Basically there are two things involved in here. First of all, there's the amount of
00:29Tessellation for the NURBS surface.
00:32Tessellation of course is tiling or splitting the object up into polygons.
00:38I have a very high tessellation here for the object itself.
00:44Additionally, we've got tessellation for the displacement. This is another
00:50level of Tessellation that happens after the Displacement Map has been applied.
00:54You'll see Initial Sample Rate and Extra Sample Rate.
00:58Initial Sample Rate is how many times a polygon is subdivided as it's being displaced.
01:04Then the Extra Sample Rate is an additional level of subdivision
01:10that's applied in order to enhance sharp edges and features.
01:15I am going to turn these down, so we can actually see the result of a very low quality Displacement.
01:23We'll do a Region Render. You can see that looks kind of chunky, and kind of
01:29blocky, as opposed to the original rendering, which is nice and smooth.
01:34So that's a low definition or low level of detail displacement.
01:39I can increase that back up.
01:41Again, you want to increase this just enough and no more, until it looks good.
01:46I've experimented with this previously and I found that value of 10 or so
01:51for the Initial Sample Rate was fine, and leave the Extra Sample Rate at a value of 5.
01:56Do another region render.
01:58That looks good.
02:00It should clear up any little jaggies and weird artifacts you might see in
02:05your Displacement Map.
02:06I've chosen a very sort of rolling texture that doesn't have a lot of high
02:12contrast, a lot of change between adjacent pixels, and that works well with this Displacement.
02:18If you've got a Displacement Map that's got very large height or elevation
02:23changes or High Contrast Texture, you'll find that you'll have to increase these
02:28values up immensely. That will increase your Render Times a lot.
02:34However, once you get the result that you want, you can convert the object to polygons.
02:37Then you will not have to keep calculating that on every frame of your rendering.
02:42We'll look at that in a later movie.
Collapse this transcript
Working with Use Min Screen for camera-based displacement
00:00I want to share with you a really cool technique that you can use to optimize
00:04performance for NURBS surfaces, so that the object will only be tessellated in areas
00:09that are visible to the current camera.
00:12That way you can have a much higher Tessellation Rate, because you'll only see
00:17subdivided polygons in the area that's relevant, because it's the area that's within the camera view.
00:24So to make that happen, I want to select my NURBS surface and go into its shape node.
00:30To make this a really dramatic illustration, I am going to knock the
00:35Feature Displacement values down to 0 and do a Rendering.
00:41So now I have got a really blocky landscape out there. Let me store that image.
00:48To get camera-based Tessellation, all I need to do is turn on the switch that says Use Min Screen.
00:56However, I want to warn you that it is very important that you have the correct
01:01camera view activated when you click this button, because Use Min Screen can
01:06only work from the point of view of one camera.
01:09If you have, for example, the top panel selected, you will not get any
01:13benefit from Use Min Screen. You need to have the actual camera viewport active.
01:19So I am going to turn it on and you can see we are getting subdivisions now,
01:24let's do a render of that.
01:29Okay. That's not so bad.
01:30Let's do a comparison.
01:33There it is with Use Min Screen Off and use Min Screen On.
01:39Let me store that, I can reduce the Min Screen Value for Higher Tessellation or Smaller Triangles.
01:48This Min Screen value is a percentage of screen width, and this is saying
01:52basically that a polygon is allowed to be up to 14% of the width of the screen.
01:58Therefore, lower values will give me smaller triangles or better detail.
02:04I'll set that down to a value of 2% and do another rendering.
02:09Now that was pretty fast too, it doesn't take long.
02:13We don't see a huge difference here between 14 and 2, but there was a slight improvement.
02:20One last thing I like to just show to you what that looks like from the top view.
02:23I'll tap the spacebar and I need to be in a shaded view in order to see that.
02:28So I'll press the 5 key, and look at this, you can see the Tessellation, based
02:34upon the camera position, my camera is faced basically in that direction.
02:39Therefore, these areas are not being tessellated, because the camera can't see them.
02:43These areas are being tessellated, because they're within the
02:47Field of View of the camera.
02:50So that's how you can control camera-based displacement and camera-based
02:56NURBS Tessellation in Maya.
Collapse this transcript
Converting displacement to polygons
00:00One final note on displacement, you can convert Displacement to Polygons
00:06and bake in the Displacement. That's a good idea if you have got a really
00:11complex Displacement, so that you'll not have to keep calculating that same
00:14Displacement on each frame of a Batch Render for an animation.
00:19You'll save a lot of CPU cycles by doing this.
00:22Also, once your object is a polygon, you can do all sorts of things to it, like
00:26map it UVs or sculpt it with a Sculpt Geometry tool and so on.
00:31I have got a displaced ground plane here. If I want to just turn it into
00:36a polygon object, it's very simple. I'll just select it, and go up to the
00:40Modify menu and choose Convert> Displacement to Polygons. It might take a
00:47moment to calculate that.
00:48Don't panic if it appears that Maya has hung, it's really just thinking.
00:54Once I've done that, if I go to an Ortho View, we can see that in fact I do have
01:00a Displaced Surface, there are my polygons.
01:04I want to just hide the original NURBS plane. It's still sitting in here and I've got it on a layer.
01:10So I want to go in here and hide ground plane layer, so we can see the polygons here.
01:20We can render that as is, however, what I've done is, I've actually
01:24blocked these lights from illuminating everything.
01:27So in order to render that I would actually need to go into a window here.
01:33I want to go into Window>Relationship Editor>Light Linking>Light Centric.
01:39I'd set this up so there were two separate lighting setups, one for indoor and
01:43one for outdoor. These two directional light and point light are not
01:48shinning on anything, except for the ground plane NURBS.
01:51I want to scroll down and find groundplane_NURBS_displace and just activate that,
01:56so that the light will be a shine on this new polygon landscape.
02:00When I render that, there you go, we've converted Displacement to Polygons.
Collapse this transcript
Normal mapping
00:00Normal mapping is a variation on bump mapping that gives better quality,
00:05especially for real-time games and simulations.
00:08Normal map is able to record the deviation of the surface in three dimensions in X, Y and Z.
00:15The red, green and blue channels of an RGB map correspond to the
00:19X, Y and Z directions of a deviated surface normal.
00:25Let's add a normal map to the back wall of our scene.
00:28I'll select that wall and then right-click and choose Assign New Material.
00:33It'll be a standard Lambert shader. I'll increase the brightness and rename it.
00:38I'll call it normal_map_lambert, and I'll go to add the Bump Map in a usual way,
00:46by clicking on a Create Render Node button and it will be a File map.
00:49But before I go to browse to find that file, I want to go to this Use As attribute
00:56and set that to Tangent Space Normals. That means the normal map will
01:01be operating in this space of the surface itself. Then I'll go to the File node
01:07and browse to find that file. Here it is, masonry_normal_map.png.
01:13While we're looking at the normal map preview, I just want to point out this
01:18is very characteristic of a normal map. You can see these interesting colors here,
01:22the cyan, purple, pink colors. Those correspond to the direction of the surface at that point.
01:30I'll go ahead and click Open. Although the normal map is actually applied
01:35onto my wall here, we won't be able to see that until we turn on texturing,
01:42lighting, and also we need to go into a higher shading mode in the viewport.
01:47I'll press the 6 key to see textures. I'll press the 7 key to see lighting.
01:52I'll need to go up to the Renderer menu and choose Viewport 2.0.
01:58There you go, we got our normal map there, just as if we would see in a
02:03real-time game engine, pretty cool!
02:05Now that's actually responding to light in a really realistic manner.
02:09All I really want to do here to sort of clean this up, is go into the File
02:15nodes input node, and go to place2dTexture and just increase the number of
02:20repeats across the surface. Very cool!
02:25So we got our normal map in there and it's working fine in Viewport 2.0.
02:30We could render this in mental ray, or we could render it with the hardware 2.0 renderer.
02:35However, the Maya software renderer doesn't support normal maps, so I try to
02:40render this in Maya Software, it's going to look very strange.
02:43Well, let's set it to Maya Hardware 2.0 and do a render of that, and it really
02:48looks just like what we see in the viewport here.
02:51Likewise, mental ray does support normal maps, so if I render in mental ray,
02:57it takes a little bit longer, of course, because mental ray is calculating a whole
03:00bunch of shadows and stuff, but there we go, we've got our normal map, just fine
03:04there in mental ray.
03:05If you want to create your own normal maps, there are a couple different ways of doing it.
03:09The way I did this one was to create a black-and-white image in Photoshop and
03:15then apply the NVIDIA plug-in, NVIDIA has developer tools to create normal maps.
03:21That's a free download, you can go and grab that to convert
03:24a black-and-white image into a normal map, where the black parts of the image are
03:29recessed and the white parts of the image standout.
03:33Another way to create normal maps is by taking the surface of the highly
03:38detailed object and mapping that as a normal map onto a lower level of detail object.
03:44We'll do that in the next movie.
Collapse this transcript
Generating a normal map with Transfer Maps
00:00The classic application of normal maps is to sample the normals of a high level
00:06of detail object and then project those on to a much lower level of detail model.
00:11The reason you do that is to save polygons.
00:15Using a normal map you can substitute a high level of detail object for one that
00:19is much, much lower level of detail. By much lower I mean, you can reduce
00:24the poly count by 95% or more. With the normal map, you won't be able to tell
00:30the difference between the high LOD and the low LOD object.
00:35So it's a very, very powerful and essential tool for game developers and anyone
00:38working in real-time rendering engines.
00:41In order to really see the dramatic difference in polygon counts, I'm going to
00:46turn on poly count in the heads up display. I'll go up here to Display and
00:51choose Heads Up Display>Poly Count. In the poly count columns on the far left,
00:57this is the total number of components for the entire scene.
01:02It says here I have got 31480 triangles total in my scene, but you know what, that's
01:08almost all on the high LOD rock I've made.
01:12If I select that rock you'll see in the second column of the poly count readout,
01:17it says, I've got 30720 triangles on that one object. Let's look at
01:24the low LOD object that I made.
01:26I'll hide this high level of detail one. I have got on its own layer.
01:31Unhide a low LOD object and select it and you'll see it's only got 760 triangles total.
01:37The difference is very striking. The high LOD has 30000 triangles
01:42and the low LOD has less than 1000 triangles.
01:47So we're going to use Maya's Transfer Maps Utility to project the normals from
01:52the high LOD onto the low LOD.
01:56If I have a low LOD object selected first, then that will be automatically
02:00plugged into the Transfer Maps Utility.
02:02It'll be found in the Rendering menu sets. You'll need to choose Rendering and
02:08then go to Lighting/Shading and activate the Transfer Maps utility.
02:14As I said, since I had the low LOD object selected, it automatically gets placed into
02:18this Target Mesh's section.
02:21If it weren't, you can just select it and then click this button to say Add Selected.
02:25We also need to select the Source Mesh or Meshes.
02:28Those are the ones with the high LODs. I'll open this up and it says all other
02:33meshes here, and that would actually work in this case, or I can just choose high
02:37LOD and then click Add Selected.
02:41Moving down a little bit, we've got the type of maps we want to create. \
02:46You'll see Normal map is listed here already, and if it's not, you can just
02:50click the button that says normal on it.
02:53I want to change the destination and the file name here, it's going to actually
02:57save into the images folder, but that's not really my preferred location,
03:02because images are for rendered output. This is actually going to be a
03:06Source Image in my final rendering here.
03:10So I'm going to go ahead and click on the File browser, and I want to actually
03:15browse to go up a level. I want to save this into the sourceimages folder,
03:20because it's actually going to be a texture. I'll go ahead and choose the
03:24file format which is going to be a PNG. I can give it a name here as well
03:30while I am at it, I'll call it rock_normal_map and click Save.
03:36Now all that has been plugged in here, sourceimages/rock_normal_map.png, and
03:42it's got the file format there as well.
03:44It is important that the map space be tangent space, which is the space of the surface itself.
03:51Scrolling down a little bit, you'll see it says Connect Output Maps.
03:56This is Connect maps to shader is enabled, and New shader is also enabled.
04:01What that means is it's going to create a new material and automatically connect
04:06the new normal map to that material.
04:10I want to open up the Maya Common Output and I want to play with the map
04:15width and height; the default is actually only 256, so I want to increase that up to 1024.
04:22By the way, for games and rendering engines in real time, basically you always
04:29have to have textures that have resolutions of powers of two. By that I mean
04:34256, 512, 1024 or 2048. That's just the way that the hardware works.
04:41The GPU expects to see a file that is a power of two resolution.
04:47So I've played with all those options and got that ready to go and all I need to
04:51do now is click Bake and Close. Wait for a moment while it samples those
04:5530,000 triangles and projects them on to the normal map for the other object.
05:00So I'll select that rock_low LOD and move it out of the way. You can see
05:06it looks pretty good. If I want it to look almost exactly like the other one,
05:11all I really need to do is go into the Attribute Editor and brighten it up a little bit.
05:20Wow! Now, how cool is that?
05:23We've got almost identical rendering here and this rock has 98% fewer triangles than this other rock.
05:33If you look closely, that doesn't look perfect. There are some artifacts.
05:37It's a little bit soft, but if I'd saved out to a higher resolution texture,
05:41we would be hard pressed to tell the difference between the high LOD object and the low LOD object.
05:47This one of course, is the one that we'd actually put in our game.
05:50Well, that's all about projecting normal maps. That concludes our chapter on
05:56Surface Relief, Displacement and Normal Maps.
Collapse this transcript
7. Adjusting and Combining Textures
Filtering a file texture
00:00One of the most basic properties of a file texture is its filtering.
00:05Filtering is basically a method whereby a texture can be softened or sharpened
00:11based upon its distance. What I've done here to illustrate that point is
00:16I've created two versions of a simple masonry material. On the left, I have got
00:22one that's got a file texture that's only 256 pixels square. On the right,
00:27I've got one that's 2048 pixels square or a 2K texture.
00:33If we back up a little bit in the view and do a rendering, we really won't
00:37be able to tell the difference between these two. Ironically, from this
00:41distance, the lower resolution texture actually looks a little bit sharper.
00:46Let's get in closer now. When we get in really close on these, you can see
00:53pretty clearly and unmistakably that the texture on the left looks really fuzzy,
00:57and the one on the right looks considerably sharper. Again, this one has a lot
01:02more data, it's a 2K texture.
01:03I am going to do an IPR rendering of this, .so that we can make changes and see
01:08those changes update in real time.
01:11I'll draw a rectangle around that area Now I'll go ahead and play around
01:16with the filtration modes.
01:18If I select the object on the left here, and drill down into its file texture
01:24for its color, we can play around with the Filter Type.
01:28The default Filter Type is Quadratic. As you see, there are bunch of options here.
01:32Let's just turn filtration off for a moment. I'll click Off and you can
01:38see now, this is pretty dramatic. We're actually seeing individual pixels here.
01:43In fact let me get an even closer, so we can see that really, really clearly.
01:48Do another IPR. So you can see now that that texture on the left has got really big
01:56pixels there. That's because I turned filtration Off. Usually it's set to
02:01quadratic and that's a general all-purpose choice. You've got a bunch of
02:06other options here, but they look very similar. Really, the only thing that
02:12matters is whether filtration is on or off. Again, if it's off then we'll
02:16actually see the individual pixels here.
02:18So you might wonder why you would want to turn filtration off, because it'll
02:24make your pixels really obvious.
02:26Well, actually for a high resolution texture, like the one I have got on the
02:31right here, you can improve quality in some cases by disabling filtration.
02:35If I select that other object and go into its color map and turn its
02:40filtration off, it actually got sharper here and actually looks better.
02:46Filtration will soften up your textures. You do need it to be softened up
02:51if you got a low resolution texture, but with a high resolution texture,
02:56it's an option to turn filtration off. It will improve the quality.
03:01If you're actually using a texture as an image plain or a matte painting, then it
03:07actually is a good idea to turn filtration off, because you don't want that
03:11image to get filtered unnecessarily. Basically, you want it to look exactly
03:15the same as the original background image.
03:18One more thing to mention here is that there's an option that says pre-filter.
03:22If that's on, then that's basically a blur factor.
03:27The limit is only 10 pixels here, so if I turn that up you'll see that got a
03:31little bit blurry, turn it back down to 2.
03:35Pre-filtering is most dramatic on low resolution textures.
03:39If I select the left-hand object here with the only 256 pixel texture, and go
03:45into its file texture node once again, you'll see when I turn Pre Filtering on,
03:50it really adds a sort of a Gaussian blur effect. I can turn that up to
03:56a radius of 10 pixels and actually completely blur out my texture. Combine
04:01that with quadratic filtering and we've got a sort of soft blurry effect on the texture.
04:09That's how filtering works in Maya for file textures.
Collapse this transcript
Adjusting file texture color balance
00:00Maya provides the ability to adjust the color of a file texture. It's a very
00:05useful feature, because we can save time and disk space by not building multiple
00:11versions of a texture in our paint program.
00:14We could just make one texture and then adjust its color directly in Maya.
00:19To do that, you will want to get the Attribute Editor open, go to that file
00:24texture node and scroll down. You're looking for a session that says Color
00:28Balance. If you open that up, you'll see, you've got some color sliders here.
00:33Don't be distracted by the first one here, Default Color. That's actually the
00:38color of the texture where it's not directly tiled across the surface.
00:43Sometimes you'll have a texture that just a decal that appears on a certain area
00:48of the object. Anywhere that that non-tiled decal doesn't appear, we'll see
00:55this default color show through.
00:57But to change the color of the texture, what you want to play around with are
01:01the Color Gain and Color Offset.
01:04Color Gain is the white point and it's defaulted to white. If I bring this
01:08down halfway, you'll see that it's dimming the level down to 50% gray and
01:13then back up again.
01:16Color Offset is the black point or the brightness. When I bring that up, I'm
01:23basically biasing up all the black pixels and pushing them up towards white.
01:28We can use this to control brightness and contrast.
01:31Gain is essentially the contrast and offset is the brightness.
01:36Now here's a really cool trick you can do that works best with a grayscale
01:41texture like the one I have here. You can go into the Color Gain color swatch
01:47and change it up to a different color.
01:49This technique does work best with the texture that is grayscale. If it had
01:54color in it then the Color Gain setting here would mix with that color.
02:00So that's a simple technique you can employ. Maybe I'll reduce the saturation
02:05a bit on that.
02:06As you can see, it's affecting the entire texture equally. I don't have the
02:11ability to isolate just the bricks from the grout in this case.
02:14If I wanted to do that, I could do that with a layered texture or through other methods
02:18we'll cover elsewhere in this course.
Collapse this transcript
Understanding 2D texture placement
00:00The placement of the texture on a polygon object is determined by two things, the
00:05UV's of the object and the attributes of the material shader nodes.
00:10UV's are a property of the model and they're unique to that object.
00:16Of course, if you have two objects with the same material applied, if you make
00:20changes to that materials attributes, it will affect both of the objects, let's do that.
00:25So if I select either one of these, go to the Attribute Editor, go to
00:29that material and drill down into the color, I can go to the place2dTexture node.
00:36Within here, I can control things like the number of repeats. I have
00:41got Repeat U and V, let's set those both up to a value of 2, and you see as I
00:45do that it's affecting both of the objects, because they both have the same material applied.
00:50Likewise, I can do things like turn wrapping off. You will want to do this
00:55sometimes if you've got a decal that you want to appear just in a certain
00:58area of your object.
01:01Anywhere that we don't see a texture here, because the Wrapping has been
01:06turned off, the color that we see there is determined in the file texture nodes
01:11color balance settings.
01:13If I go to that file texture the default color here is what we see in the
01:19background behind that texture itself.
01:24So back to the place2dTexture node, set it back to where I founded. Wrap U and
01:28Wrap V and repeats back to 1. You can see then, if I make changes to the
01:35material, it will affect all of the objects that have that material applied.
01:39If you want to have two dissimilar objects that have the same material and have
01:45the similar texture placement, then the way you want to do that is by editing the UVs.
01:50We could project new UVs onto one of these objects, but they already
01:57have good UVs on them and really all I want to do is scale the UVs.
02:02To do that I'll select the object and go to the Polygons menu set and go to Edit UVs>UV Texture Editor.
02:11Now what you see here is the UV layout, I have got the image in the background
02:16here and we've got the actual UV information overlaid on top of that.
02:24If I want these two objects to have a similar scale to the texture, what I can do is
02:28select the UVs here and scale them. I can right-click and go into the UV
02:33component mode and then just select all the UVs and you can see as I move them,
02:40we're changing the texture placement. I can also scale, so I can grab the
02:44Scale tool over here. If I scale the UVs up, they will be larger relative to
02:50the texture itself, and I can kind of make those bricks become smaller on the object.
02:55If I scale the UVs down, the UV coordinates are smaller relative to
03:03the image and therefore we get a larger pattern on the object.
03:08Now in Maya, technically, you're not supposed to go beyond this zero to one area here.
03:13You can do it. It's just that, if this becomes too large, then it will look a
03:20little bit fuzzy in the viewport. It'll actually define a new render.
03:25I'll just reposition this just to keep it nice and clean. Basically, that's how UV
03:32coordinates work in Maya.
03:34The UVs are on a per object basis. Material properties such as tiling are, of course,
03:40on a per shader, per material basis.
Collapse this transcript
Assigning materials by face component
00:00There are several ways of combining more than one material on a single object.
00:04The simplest is just to simply assign a different material based upon a face
00:09component selection.
00:11For example, if I want to create a window in this wall, I can just select the
00:16faces where I want the new window material to appear. I'll select the wall and
00:21right-click and go into Face component mode and select some of those polygon
00:25faces in the center there. Those are selected now. I can just go over
00:31to those faces and right-click and choose Assign New Material. That new
00:35material will only be assigned to those faces. Let's give it a Blinn material.
00:40I'll just reduce the color and increase the transparency, so that now I've got a hole.
00:47I'll go back to Object mode, where I Click and choose Object mode and tumble
00:51around in the view and you can see that in fact, there is a new Blinn material there .
00:55We're getting a little bit of shiny highlights there, because I
01:00haven't turned the Specularity off. Cool!
01:03So that's one way we can assign materials based upon face selection. We can also
01:09do it from the Hyper shade.
01:10If I select the object and just reassign the existing material--I'll just run
01:16through the process again. So reassign the material to the whole object,
01:21right-click and go back into Face mode, select the Faces, then go to hypershade,
01:26Window>Rendering Editors>Hypershade. Wwith those faces selected, I can
01:33simply right-click on a material and choose Assign Material To Selection.
01:38Then it accomplishes the exact same thing. Right-click and go back out to Object
01:42mode and tumble around to check to see if I got what I wanted.
01:45That's a very simple way of combining multiple materials on a single object,
01:51just by assigning them by face component selection.
Collapse this transcript
Nesting maps
00:00Another way that we can composite maps is through nesting.
00:05We can use a map as a map within another map. To achieve that, I'm going to
00:11go ahead and assign a new material to this plane.
00:14Right-click and Assign New Material, it'll a Lambert and let me call this one,
00:19nested_maps_lambert.
00:21I want to have two layers here.
00:26The top layer is going to be like a poster that's applied on the wall and then
00:31the bottom layer or the back layer is going to be the masonry texture.
00:35I want to put my poster in first.
00:38So for the Color map, I'll go ahead and click to create a Render node.
00:42That'll be a File node of course.
00:44I will browse for that file and I've got one here, pointLabos_1594, open that up.
00:53I do want to rename this, okay,
00:54so that we know which one is which. I will call this one file_poster.
00:59Right now of course, it just covers the entire area of that object. If I want
01:04to just restrict it to a smaller area then I can go into the place 2dTexture
01:09node and play around with some of these attributes.
01:12If you want to prevent it from tiling, of course, you can turn Wrapping off.
01:18But I want to mention that if I just set the Repeats up here to like 2.00
01:23and 2.00, we can see the default color behind that texture and that looks
01:28fine in the viewport.
01:29But if I actually render it, it'll still tile.
01:33That's a bit of a quirk in the software.
01:36What I want to do actually is not to repeat the UVs. I am going to set those
01:40back to 1.00 and 1.00.
01:42I want to reduce the Coverage area here.
01:45I don't want to cover the entire surface.
01:47So I will say a Coverage of 0.500 and 0.500.
01:52Then I can also shift that by adjusting the Translate Frame values here.
01:56I can give that a value of 0.250, shift it over to the left, 0.250 to shift it up.
02:03Now you can see that the proportion of this isn't really quite right.
02:06It's supposed to be taller, but we're not going to worry about that right now.
02:10So I've got my image applied and I can see the default color behind it.
02:14If I go back to the File node, you can see the Default Color here.
02:20If I play with that, we can see that changing and if we do a render, it should look the same.
02:25Okay, so that's fine.
02:27What I want to do to nest the maps is simply to put a map into this
02:31Default Color here.
02:33Go ahead and click to create a new Render node and it's going to be another
02:37File node and I'm going to go ahead and browse for that file and put my masonry image in there.
02:45So basically there it is.
02:47I've got nested maps and it looks fine in Viewport 2.0.
02:52If I go into default quality rendering, it's going to look pretty fuzzy.
02:56High quality is okay as well.
02:58These have separate texture placement nodes.
03:02So for this one, which is my background, let me call that one file_masonry,
03:08I can go into its 2dtexture Placement node and change its Repeat so that those
03:13bricks will be smaller.
03:14Give that Repeat of 3.00 and 3.00.
03:17Now I haven't touched the UVs on the object here.
03:20I've done all of this through the Texture Placement nodes.
03:25When we look at the Hypershade, we can kind of analyze what's going on here.
03:29If I go to Window>Rendering Editors>Hypershade and graph the network here,
03:36right-click and choose Graph Network, there what you will see is in fact one
03:42file is feeding into the other file node.
03:47So this one's color is feeding into the other one's poster default color.
03:53So that's going into the default color.
03:56That's how you can nest maps in Maya.
Collapse this transcript
Compositing maps with a layered texture
00:00Nesting maps is kind of a limited technique.
00:03It won't work in all cases.
00:04It worked fine in the case of a texture that just needed to be slapped on top
00:09of another texture, and we didn't care about the edges being transparent
00:14or anything like that.
00:15So that was fine, but if I want to, for example, have the effect of graffiti on
00:21the wall, then I'll need to use a layered Texture.
00:26To start, I'll assign a new material to my plane here.
00:29I'll right-click and choose Assign New Material.
00:32It'll just be a standard Lambert material and I'll change its name.
00:36I'll call it layered_texture_lambert.
00:42Then from here, I'll need to go into the Hypershade.
00:46Open up the Hypershade, and I'll graph the network on this new material I've made.
00:52Right-click and graph Network.
00:53Now I want to create a layered texture.
00:58It's found in the section here that says Other Textures.
01:02I'll click to create it.
01:04I want to connect that to the Color of this shader.
01:07So I'll select that shader and then middle-mouse, drag the layeredTexture
01:12ontothe diffuse color slot.
01:14Now that connection has been made.
01:16So back to the layeredTexture here.
01:18We can put as many as we want in here.
01:20We can put up to 10 textures in here.
01:22Right now, there's a default one.
01:24It's just got a green color that's completely opaque.
01:27I need to add a couple of File nodes here now.
01:30I will go back over to the Create section here and I'll create a new 2D File Texture.
01:37Click on that, let me cleanup the Graph by clicking Rearrange.
01:42Back out a little bit and now I want to assign the file to this node here so,
01:49I will select that and go the Attribute Editor and browse for the file.
01:52This is going to be the top level here and that'll be this graffiti image I've created.
01:58It's pure white pixels, but it's got transparency.
02:01It's a PNG that has alpha in it.
02:04Go ahead and click Open.
02:06Now I want to just drag that into the layered Texture.
02:09So I will select my layered_texture, select that Texture node and then middle-
02:15mouse drag this File node into the layered Texture and now, I've got a new layer here.
02:21Now the green one here is overriding this new one I've added. The flow here
02:28is on the right side is behind and on the left side is in front in the layers.
02:35So I don't need this one, in fact, I can actually just delete it.
02:38So now, we can see that we're actually getting our little graffiti image.
02:43Essentially what's happening here is that we've got a single layer in our
02:48layered Texture. You can see here that the Color is connected and the
02:52Alpha is also connected.
02:54If we look in our view now, we're seeing that wherever the Alpha was opaque,
03:00we're seeing the actual texture show through and wherever the Alpha was transparent,
03:04we're seeing black, because there's nothing behind it currently.
03:10So let's put something back there. I will make another File node and Rearrange
03:14the Graph once again.
03:16Here's file2 and I'll select that and I'll browse.
03:22I want to choose my image, which is just that masonry_diffuse image. I'll click Open.
03:28Now I want to put that into my layered Texture.
03:31I'll select the layeredTexture node and then middle-mouse drag file2 to the
03:35right of file1, which is going to be behind it. And there we go.
03:40We've got a layered Texture that was so easy If I do render here, it looks just the same.
03:46We want to control the placement of that but we'll do that with multiple UV Sets.
03:50We'll do that in the next movie.
Collapse this transcript
Applying multiple UV sets
00:00We've got a layered Texture by choosing 2 File nodes.
00:04But they're both sharing the same UV information. That makes it a bit
00:08difficult for me to place them independently of one another on this surface.
00:13What we'll do is we'll create a new UV Set and we'll assign each of those
00:19File nodes to a different UV Set and that will give us the power to control them independently.
00:25First thing I want to do is just rename the existing UV Set.
00:28I want to select the object and go to the Polygons menu set and go to
00:34Create UVs>Rename Current UV Set.
00:37The default name for the original first UV Set that's always created for a new
00:43polygon object, the name is Map1.
00:48But really, I want to call it uvSet1, because that's a lot clearer.
00:53We're not dealing with a map per se, we're dealing with UV Set. So, I just want to
00:57rename that for clarity's sake.
01:00Now I've got one UV Set and I want to create a new one.
01:04Create UVs>Create Empty UV Set>Options and I want that to be called uvSet2,
01:13I go ahead and click Create.
01:15Now I've created a new UV Set, but that doesn't mean that it's active.
01:19If I try to project a new UVs, I will actually be projecting them into uvSet1.
01:25That means, I need to now make UV Set to the Active set.
01:29I will go up into Create UVs once again and Set Current UV Set, I want to
01:36make sure, it's uvSet2, Set Current.
01:40Now the next thing we want to do is determine which UV Set is connected to
01:46which File node and that's done through a Window called the UV Linker.
01:50I want to go into the Window menu here, under Relationship Editors>UV Linking,
01:58and let's do UV-Centric.
02:00It doesn't matter which of these two you choose.
02:04UV-Centric just places the UVs on the left side of the dialog here.
02:09If I click on uvSet1 over here on the left, then on the right, you will see that
02:14both file_graffiti and file_masonry light up.
02:18That means, they're both connected to uvSet1.
02:21If I select uvSet2, you'll see that neither one of those is connected.
02:26So what I want to have happened here is uvSet1 will be associated with the masonry,
02:33and uvSet2 will be associated with the graffiti. That way, since uvSet2 is the currently active UV Set,
02:42when I do a new projection, it will work on the graffiti.
02:46So uvSet2 is going to be file_graffiti and when I click there, I just made the connection.
02:52Now you see that my image disappeared here. Don't panic here.
02:56That's what we expect to see, because I've connected the File node to a UV Set
03:02that does not currently have any information in it.
03:05We will need to add UV information by projecting it.
03:10If I go to uvSet1 you'll see that's connected to masonry and, again,
03:15uvSet2 is connected to the graffiti.
03:17So uvSet2 is currently the active one. That means, if I create new UVs,
03:23they'll go into set number 2.
03:26Backup in the Polygons menu set, in the Create UVs menu, I want to choose Planar Mapping.
03:31It's important to go into the options in this case, to make sure that we're projecting from the Z axis.
03:36The default is actually to project from the X axis, which is from the side.
03:42We need to be projecting from Z. That means it will project onto the front surface of the plane.
03:48Go ahead and click Project and now, we've got our graffiti back. If we want
03:53to place that, all we need to do is play around with this manipulator.
03:57We can scale it in different directions.
03:59We could even type in exact values here.
04:02I know that my original image had a 2:1 Aspect Ratio, so if I set the Width to
04:07200 and the Height to 100 then I know that it is going to be the same shape as
04:13my original bitmap image. All right!
04:16That's pretty cool. I can also rotate.
04:19If I just click over here on the corner of the manipulator, it changes to a
04:24different manipulator, which now has a circle around it. If I drag that circle,
04:28I can actually rotate the UV projection.
04:32Now you can see, of course, that I'm getting tiling.
04:37I can fix that up, too, of course, if I go back into the Hypershade. I want to
04:44graph the network on this shader. I'm concerned with the place2dTexture node
04:50on the file_graffiti.
04:53So go over to place2dTexture, hit Ctrl+A and just simply turn Wrapping off.
05:04You can see that is a little bit funny there.
05:06The reason of that's happening is because we've got transparency in this image.
05:11To fix that up, I can go into the Default Colors here, set that to Black and
05:18now it's not mixing that color any longer.
05:22If we want to go back to changeing the Placement here, just select the
05:25object, go into the Channel box, select the polyPlanarProjection node and, if you
05:32don't already have the Show Manipulator tool active, you click on that.
05:37Now you can interactively place the texture wherever you want it.
05:43We of course could continue that process as many times as we needed,
05:47layering more and more textures and we would create UV Sets along the way.
05:53If I wanted to go back and change the UVs for the bricks, then what I would do is,
05:59I would select the object.
06:00Go up to Create UVs and Set Current UV Set to uvSet1, Set Current. I could
06:11for example, project again.
06:13I could do another projection.
06:14Create UVs>Planar Mapping once again, and now I'm only controlling the UVs for the bricks.
06:21I'll click and go back to Object mode.
06:26So that's how we can use UV Sets for multiple textures,
06:30especially for a layered Texture. It's very helpful.
Collapse this transcript
Compositing shaders
00:00As we've seen, the layered texture node is extremely useful for superimposing
00:05textures on top of one another.
00:07But of course that only works within an individual texture channel.
00:11In other words, we can layer multiple diffuse textures on top of one another
00:16or multiple specular maps on top of one another. But if we wanted to superimpose
00:20two completely different shaders on one another, then we wouldn't be able to use
00:25a layered texture node. We need to use the layered shader node, so let's do that.
00:30I'll go ahead and open up the Hypershade and you will see in here I have got a
00:37bunch of materials already built and most importantly right now I've got
00:40GalssGinBottle_blinn, and LabelGinBottle_blinn. Of course, the label is opaque and the glass is transparent.
00:50Let's create a layered shader and that will be found over here in the Create panel,
00:55click on layered Shader and I have got a layered Shader built.
00:59If you don't already have the Attribute Editor open, you want to hit Ctrl+A and get that visible.
01:04I will go over here, type in a new name for this, I will call it blinn_layeredShader.
01:11I just want to refresh this view, because I was experiencing some display
01:14glitches earlier. So I will just unselect that and reselect that node.
01:18So now I want to middle-mouse drag my materials over here into the layered shader panel.
01:23GlassGinBottle_blinn, I will middle-mouse drag that over,
01:29and LabelGinBottle_blinn, I will middle-mouse drag that one over as well.
01:33Now you see I have got those three layers here. Of course, I don't need this
01:37green one here that came as the default.
01:39So I will just click the X to get rid of that.
01:42So now I have got two layers here, but what I have done here is I have put them
01:47in the wrong order. The glass is on top of the label. I can kind of tell
01:52that because my label, the color has been sort of distorted here.
01:55I just need to change the order of these two. Simply middle-mouse drag and drop
01:59to change the order. Now the label is superimposed on top of the glass.
02:05Now before I can render this and get a good result, there is one more thing I
02:08need to do, which is change the compositing flag.
02:12This is really important, and unfortunately, the naming here is not really
02:17terribly obvious as to how this works.
02:20Layer Shaders is the default behavior. What that does is it puts the layer
02:27Shader into an additive mode. It will add the colors of all the layers together.
02:33That additive mode is useful when you are creating something like, let's a
02:37varnish or a car paint where you have got maybe multiple layers of specularity
02:43and they need to add together.
02:45Well that's not what I want in this case. What I want is just to replace
02:50the colors of the underlying layer. The replacement mode is labeled layer Texture.
02:58So I need to be in layer Texture mode.
03:01So now I am just going to assign that layeredShader to my Gin bottle. So I will
03:05select the bottle and then right now just click on the material and choose
03:10Assign material to selection.
03:11I will go ahead and do a rendering of that and check our work.
03:18Very good, so now we have got a layered shader working. We got two completely
03:23different shaders, one superimposed over the other.
03:26I want to store that image, because, in fact, I have mental ray version of the
03:31glass shader that's actually, maybe a little bit better. It's brighter and it
03:35kind of pops on the screen a little bit more.
03:37So I want to use that mental ray Mia Material for the glass, instead of this
03:43blinn glass shader I have created. Lets do that.
03:46I will go back to the Hypershade and I will make another layered shader node.
03:53Let me rename that one, so I will go over here and rename it. We will call it
03:58mr_layeredShader. I just want to clear my graph out, just to erase whatever
04:05is there and bring these back down in here.
04:08mr-layerShader, I want to middle-mouse drag that in. I will bring my label in.
04:14I have got LabelGinBottle_blinn, I want to middle mouse drag that over.
04:20Label is the same and there is that bug I was talking about earlier,
04:25where my Attributor Editor kind of goes away. I will just click here to refresh the panel.
04:30So what I have got in here now? I have got that default green material that
04:35doesn't really need to be there, So I can kind of axe that out, delete it.
04:39I have got my blinn label, and now here is the tricky part.
04:42I want to bring that mental ray Mia Material glass material that I have made earlier.
04:48Here it is, it's called mr-GlassBottle.
04:49I want to bring that over to the Back layer of my layered shader. But if I try to
04:56middle-mouse drag over here, nothing happens.
04:59So it's kind of debatable whether that's a bug or a feature. But we can't
05:03actually middle-mouse drag a mental ray material on to a layered shader.
05:10However, we can use the mental ray material within a layered shader;
05:13we just have to go through a different process to make that connection.
05:17I want to bring that down into the work area here, so I will middle-mouse drag
05:21that down. What I need to do is I need to right mouse click on the lower
05:26right hand corner of that material. I want to choose the triple output.
05:32So all of the possible outputs from Mia Material x are listed here. The one
05:37that I want is the result. That's the output color.
05:40It's not just the reflection, not just the diffuse, but everything.
05:45So I want to choose Triple>result>result.
05:48Then over here on my mr_layeredShader, I want to left click in the lower
05:53left hand corner and I want to connect it to the color, inputs color, and you
05:59can see I have got several of them listed here.
06:01So I will just choose the one that's not already taken.
06:04Now that's connected, and so what I have got here, is I have got the label
06:08on top and I have got the mr_GlasBottle_mia on bottom.
06:13Couple of things I need to do here to make this work.
06:16I want to select that layer and I want to reduce this Transparency here.
06:20If I didn't reduce that, then it would render as completely transparent.
06:24So we need to bring that all the way down. Then I also need to change the
06:28compositing flag once again to layer Texture.
06:32Then I want to assign this new layered shader to the bottle.
06:36So select the bottle, right mouse click and assign material to selection.
06:41Go back to our Render View. What we are looking at here is the version with the
06:45blinn glass shade. I will do a new rendering with the mental ray glass.
06:55Now that's finished rendering, and I have got my mental ray glass, let's see the
06:59deference between that and the standard Maya blinn glass.
07:02So that's the blinn glass that I made by hand, and that's a Mia Material x.
07:07so you can see that Mia Material x is considerably brighter.
07:10So that's how we can layer shaders in Maya, either with standard Maya materials
07:16or with mental ray materials.
Collapse this transcript
Driving ramp UVs with a texture
00:00Maya's procedural textures are very complete. You've got a lot of choices and you
00:05can do incredible work with them.
00:07However, you'll notice that a lot of them only have maybe one or two color slots.
00:11You might think that that's going to limit you to the color choices.
00:16But in fact it doesn't, because you can use a procedural texture to drive a ramp.
00:22That way you can get as many colors as you need, and you can get much finer
00:26control over the look of your material.
00:29I have got a plane here.
00:30I'll select it and right-click to assign a New Material.
00:33It will just be a Lambert material. I want to drop a procedural texture into
00:39the color here, so I will click on Create Render Node and let's try a 2D texture Mountain.
00:47You can see it here now.
00:48It will never look good in the Viewport.
00:50You will have to do a rendering in order to see its true look.
00:54Well, we can get a sense of their colors here. You can see I have got Snow Color
00:58and Rock Color and I can change those up.
01:02But I don't have the ability to, for example have three levels of color; maybe a
01:06snow color, a forest color, and then an earth color.
01:11To do that, I will want to use a Ramp.
01:13Let's go to the Hypershade, open that up, select this Lambert material and graph
01:22the network and I also need a Ramp map.
01:26I will go over to 2D Textures here and click on Ramp and I have got a map now.
01:33I want to assign that ramp to be the color of the material here, select the
01:37material and middle-mouse drag the ramp on to that color slot.
01:41That of course breaks the connection that I made earlier.
01:44You can see here now, I have got a ramp across that surface.
01:48I can go away to that ramp and change those colors up, maybe the top here can be
01:52a white snow, maybe the second flag there can be like a forest green, and in the
01:59bottom one perhaps I could set that to be a brownish color.
02:03Now I have got different colors on my ramp. Of course I can add as many of
02:08those little color swatches I need to.
02:10So you can see I have got the ramp on this surface.
02:13The final thing I want to do is, I want to take the out Alpha of the mountain
02:17texture and use that to drive the V coordinates of the ramp.
02:22I will select that mountain material and then right-click on it on the lower
02:28right hand corner to get its outputs. You will see I have a choice of outAlpha or outColor.
02:33It will have to be outAlpha, because that's a single floating point number and
02:38that's what the V coordinate expects to see.
02:41When I release the mouse here, I can now see that I have got a connection wire.
02:45I can go over to the lower left corner of the ramp and left-click on that.
02:50I don't see the V coordinate Attribute listed here, but I can go to Other.
02:56That's going to launch up the Connection Editor. I've got Mountain1 as an
03:00output of the left and ramp1 as an input on the right.
03:03I want to take the outAlpha attribute from the mountain.
03:07So let's find that outAlpha, here it is. I want to connect that to vCoord,
03:12I will click on that.
03:21Now that connection has been made, I can close the Connection Editor.
03:25You can see the connections here now.
03:26Let's just clean up the graph a bit. You can see mountain1 outAlpha, is now
03:34connected to ramp1 vCoord and we have got a nice colorful material now.
03:38I can do a render of that.
03:41We can go back and change all those attributes and fine tune our look. I can go
03:45into the ramp, maybe change the ramp flag positions, or colors or likewise,
03:53I can go back to the mountain texture and play around with its attributes.
03:57Of course, it would be easier to see that if I did an IPR.
04:05Play around with some of those values and see what I can do.
04:08All right, very cool!
04:09So that's a really basic technique in Maya, but it's one that's not immediately
04:14obvious and you wouldn't really be able to figure out how to do that just by
04:18looking at the interface.
04:19But that's the principle.
04:20You can take any floating-point number, including the alpha of a procedural
04:24texture and use that to drive the coordinates of a ramp.
Collapse this transcript
Modifying colors with Remap HSV
00:00Here's another way to alter the colors of a procedural texture or any texture
00:05for that matter. I've got an object already with the material assigned. I just
00:10want to hit Ctrl+A to open up its attributes and go to that material.
00:14I'll plug-in a map in the color slot here.
00:17Click on Create Render Node.
00:19Let's give it a 2D Fractal texture.
00:22You can see that that's just black and white.
00:24I don't even have any color slots to play around with, like I did in the mountain texture.
00:29Now of course we could play around with the color balance here, but that's going
00:32to be very limited in its effectiveness. I won't be able, for example, to have two
00:37different hues on the texture, but if you scroll down just a little bit further
00:42you'll see there is a section that says Effects. Inside there is Color
00:46Remap>Insert and if you click on that what happens is a couple of nodes are
00:51created in the Hypershade and we're back to using a Ramp as our color source.
00:58Let's just take a quick look at what happened.
01:00We will go into Window>Rendering Editors >Hypershade and graph the network here.
01:08Right-click and Graph Network, then you can see that we have a Fractal Node,
01:13it's feeding into this Utility Node RGB to HSV and that in turn is driving the
01:19coordinates of this Ramp. You can do that inside any texture in Maya.
01:24You can just take the colors of the texture and immediately remap them as you see here.
01:29Of course, we could change up these colors and make them prettier in a usual way.
01:35That is how you use the Remap function to change the color of any texture in Maya.
Collapse this transcript
Building substance textures
00:00In my opinion one of the most exciting features to be added to Maya in recent
00:04years is the Substance Texture Node.
00:08This is a procedural texture that will produce realistic results for things like
00:13concrete and bricks and bronze and things like that.
00:17Substances are procedural textures, but they behave as if they were file textures.
00:23In other words, you have to link to a particular substance file.
00:28That could be problematic, especially if in the future the substance library that
00:33ships with Maya changes.
00:35I've been bitten by this before with 3ds Max and other programs that use texture libraries.
00:42If the texture library changes in the future and you haven't backed up the files
00:48that you used in your project, then your scene will not open correctly and you
00:52may actually not be able to open the scene completely.
00:56Therefore, I strongly recommend that if you do use substance textures, that you
01:00simply just copy the entire substance library into the source images of your
01:05current Maya project. They're such tiny files, you're not using up any disk
01:10space, so there's no reason not to do this.
01:12Again, if you fail to do this, it's a high probability that later in the
01:17future, someday those libraries will change, and your scenes won't open
01:21correctly. So let's future proof our work.
01:25To do that we need to find the Maya program directory. On Windows, it's on
01:30your C drive under Program Files. On the Mac of course, it's in your
01:34Applications folder, but either way you need to find your Maya install directory.
01:39Within that you will find a folder called Substances. You can just select
01:43that and copy the entire folder. Here I can just right-click and choose Copy.
01:49Go to your current project, in this case it's the exercise files, and go to
01:53sourceimages and paste into there.
01:57In this case, I can just right-click and choose Paste.
02:01It only takes a second, because those substance files are very small.
02:04If I open that up and look at those, each one is only a few kilobytes. So that
02:09whole folder is only maybe 1 megabyte in size.
02:13So I've copied the substance files over into my current projects sourceimages.
02:18So let's go to Maya, I have already got that running. I have got a back wall
02:23here and I can use the substance node to create a procedural brick pattern that
02:27looks pretty realistic.
02:28I'll select that back wall, right-click and Assign a New Material, and let's
02:34make it a Blinn material if we want shiny highlights. I'll call this one
02:38brickSubstance_blinn. I can add the substance to the Color Channel here, so
02:47I'll click to Create a Render Node. Its a 2D Texture and I want to choose
02:53Substance, not Substance Output, that's the Utility Node that you'll need if you
02:58build your own substance networks.
02:59But we don't need to do that in this case. All we need to do is create
03:02the substance node and the substance output nodes will be built for us automatically.
03:06I'll click on Substance and now I've got the Texture Settings for the substance node visible.
03:14However, there's no file present, so I'll need to browse for that file, just as if it were a bitmap.
03:20Once again, I want to make sure that I'm linking to a substance file
03:25that's inside my current project's sourceimages. In fact, I want to
03:30mention also that, if you don't do this, then at this stage you'll have to
03:33literally drill around to your program files directory, or on the case of the
03:39Mac, your application folder.
03:41You'll have to navigate and find that. That's problematic for a lot of reasons.
03:46You never want to link to anything that's outside your current project folder
03:50because that's just really terrible asset management.
03:53So I'll place the substances inside my current project, drill down in there.
03:59Let's go for let's say, BrickWall_05, click Open. So we've got bricks, and those
04:06bricks are fully procedural. We can go into the substance node and play
04:10around with that, so I'm still looking at the blinn material node here.
04:15I want to go to the substance texture node.
04:18Here it is, substance1. Currently all I have connected is the Diffuse
04:22channel, but we can play around a lot with that. You can scroll down here and
04:27you can see I've got things like the Hue Shift. If I don't like that sort of
04:31peach color, maybe I want the traditional red color to my bricks, and I have
04:35got saturation and so on. All of these parameters can be adjusted and
04:40actually even animated.
04:42You've got lots of stuff to play with, like the number of bricks. Again,
04:46it's all procedural. It will be pretty good-looking.
04:50I mean it's not really going to have an obvious tiling pattern to it.
04:56So that's just the Diffuse channel.
04:58If I want also, for example, a Bump or Specular, I can go back up to the top here,
05:03and I can just click on any one of these to create an output node and plug that
05:08output node into my current material.
05:11You could also click this button that says Create Shader Network. What that's
05:14going to do is it's going to selectively create connections.
05:19It'll, by default, create a Specular and a Normal Map.
05:23In this case I don't want a Normal Map. I just want to click on Bump and that creates it.
05:28Now once that's in there, I can now play around with things like the amount
05:32of Embossment so on. That will show up as a Bump Map.
05:36If I get in really close on our substance, you can see that it's kind of got a bitmap-like quality.
05:41If you want to increase that quality, you can go up into the general
05:46parameters here and you got the Absolute width of the texture and that's locked to the height.
05:52If I increase that up to let say 1024, then you see we get a much better quality,
05:56so that would be better in a close-up.
05:58There are a lot of parameters to play with here and each one of the substance
06:03types has different parameters.
06:05I will leave it to you to experiment with those.
06:08The last thing I will mention is that if you got something you like, you have
06:12the option to directly export those images to disk here.
06:16You see that there is a big button. You can just click on that and you want to
06:20export that of course into your sourceimages folder, as usual.
06:23So I want to make sure that when I create this, it will be placed into my
06:28sourceimages folder. We've got a value here for the Map Width and Height
06:32and that's actually independent of this value here.
06:35So if I wanted it to match, I will need to increase that up to 1024.
06:39As always, I would recommend never exporting to a JPEG file, because it's
06:43lossy compressed, so you can export to a PNG.
06:47If you clicked Create Shader Network, you would create a new material and can
06:52connect these new maps that we were making to that new material, but I'm going
06:57to choose not to do that in this case.
06:59I will just leave this as a procedural substance texture.
07:02Go ahead and click Export and those should have been created.
07:06I can go to the window that I have here, which is my exercise files. Under
07:11sourceimages now, you'll see I've got a Bump_substance and a Diffuse_substance
07:16and I can open those up and see what those look like.
07:18It's actually going to launch in Photoshop in my case here.
07:21I just want to examine that.
07:22There you go, I've created a substance. Then I have successfully baked it out
07:27to its own bitmap, so I could use that in a game engine or whatever.
07:31Substance is really cool and you can do a lot of great work with it.
07:35I strongly recommend playing around.
Collapse this transcript
Baking with Convert to File Texture
00:00Procedural textures in Maya are great, but you can't place those into a game
00:05engine or into any other application other than Maya.
00:08If you need to export to a game engine or some other program, then you need to
00:13bake your procedural textures to File Bitmaps.
00:16Let's take a look at how to do that in a couple of ways, first in Maya Software.
00:21I've got a lemon here that's got a Bump Map on it.
00:23I want to convert that 3D Bump Map into a File Texture.
00:28I need to go into Hypershade and here's the shader node.
00:35What I need to do is I need to select both the object and the shader.
00:40I'll select the object and go up here and Shift+Ctrl+Click to select both of those.
00:47Then I can go up into the menu of the Hypershade and under Edit, we've got
00:53Convert to File Texture (Maya Software). That's important.
00:57This relies on the Maya Software engine. If you've got a texture that's not
01:03compliant with Maya Software, then you will not get any result from this.
01:08So it's got to be something that Maya Software is able to render.
01:12Let's go into the Options for that.
01:14If I reset this, you'll see that the defaults are kind of not so great.
01:20Anti-aliasing is turned off and the Resolution is only 256 pixels and the format
01:26is Alias PIX and none of those are good options.
01:29I do want Anti-aliasing turned on, that's going to prevent jagged edges in my texture.
01:35I'll need to increase the Resolution here.
01:38Let's set that up to 1024 x 1024 with the Tab key and then the File Format.
01:46The Alias format is readable by Maya, but nothing else.
01:50I want to use a PNG, because that's a really universal file format. So I'm good.
01:55Just remember, I've got to have the shader node selected and the object selected
01:59because this process relies upon the UVs of the object. When I click Convert
02:06and Close, several things happen.
02:09First of all, the file is baked. It's converted.
02:13Second of all, it's stored in my current source images directly and third of
02:18all, a new material is created whether I want it or not.
02:22Fourth of all, that material is now assigned to the object, whether you like
02:27it or not and you cannot change that behavior.
02:30When you bake using that method, you will lose the material assignment.
02:34In other words, no longer is the procedural texture and procedural shader applied.
02:40Now an entirely new material has been applied with the baked image.
02:46So we can graph those two.
02:47I can select those both and graph their networks up here and you can see
02:52they're quite similar, except one of them is a 3D Texture and the other one is a 2D Texture.
02:59We just zoom in on those.
03:02This is my original, of course.
03:04We used a leather procedural texture and a 3D bump node and that's no longer
03:09assigned to the object.
03:11Now assigned to the object is this new baked version.
03:15All of the properties of the blinn shader have been inherited.
03:18Basically that blinn material has been duplicated and instead of a bump map
03:24coming from leather, we're getting a bump map coming from this file.
03:28Where is that file? Well, it has just been dropped into our
03:31sourceimages folder.
03:32If I select that file node and go to Ctrl+A, we can see that there it is.
03:37It is sourceimages, and it's got the name bump3d1-lemon_revolve_04, because that
03:43was the name of the object.
03:45If you don't like that name, then you'll need to go into your File
03:48Manager, change the name and then you'll need to come back in here and
03:52relink it if necessary.
03:54Needless to say, if all you want to do is export, then you probably want to
04:00reassign the material if you don't want to actually render the baked version.
04:05Additionally, you'll notice just because of the quirk in the software that we
04:09don't see the bump map here, and I'm in a high quality mode.
04:12But if I go to Renderer>Viewport 2.0, then we can see the bump map, and that
04:18again is a file texture we're looking at.
04:20It's just a strange incompatibility;
04:23Viewport 2.0 doesn't properly render the file texture as we saw.
04:29But if I do a proper render, there you go!
04:31That's the version that's got the baked bump map. Let me store that.
04:37I'll go back into my scene and right-click and Reassign the Existing Material,
04:42which was lemon1_blinn, was the original.
04:46Then do another rendering of that, so you can see the difference.
04:50So that's the procedural version and that's the bump file version. So you can
04:56see there's a bit of a difference there.
04:58But of course, all I would really need to do to fix that up would be to
05:02change the bump depth.
05:03That's the process for baking textures. Any texture that you have on the object will get baked.
05:09When you use this tool, you don't get to choose which of the texture maps get baked out.
05:15It's an all or nothing deal. So if I had a diffuse map on here,
05:19that would've been baked out as well.
Collapse this transcript
Baking with mental ray Batch Bake
00:00Finally, let's look at baking with Mental Ray.
00:03We can take any texture, procedural or a bitmap, and bake that into a new shader.
00:09We can include the lighting and shadows in that process, too.
00:13That's something that you would need to do especially in game development,
00:17so that you don't have to calculate the lighting on your level.
00:22You can just bake the lighting in directly.
00:24You can do that with a Maya Software method we saw in the previous movie, but
00:29the Mental Ray method is just going to give you better quality.
00:33The only caveat with this is that in order for it to work correctly, you'll need
00:37to convert any NURBS objects into Polygons.
00:41I've got a nurbs_revolve here for this lemon and it really won't work exactly
00:47right unless I convert to Polygons.
00:49So I'll do that first.
00:51I'll go to Modify>Convert>NURBS to Polygons>Options and I do want to make sure
00:59that I turn on this switch that says Match Render Tessellation.
01:02That's just going to make sure that what I get after it's been converted to
01:06Polygons, resembles what I saw in the actual rendering,
01:11and it won't retessellate based upon these values.
01:14So I want to match the render tessellation.
01:17Go ahead and tessellate that.
01:18Now I've got a new object which is called nurbsToPoly1.
01:21Let me rename that and I'll call this one lemon_poly.
01:28I've still got the original NURBS object in there.
01:31I want to select that and either delete it or hide it just so we're not distracted by that.
01:37So I've got lemon_revolve_04 with the object in question, just going to hide it
01:42by setting its Visibility to 0.
01:43So now I've got a Polygon object. Now I'm ready to go ahead and bake this
01:50into a bitmap and that'll actually include the lighting and the bump as well.
01:55That's going to be found in the Rendering menu set.
01:58Under Lighting Shading>Batch Bake (Mental Ray), we'll need to go to the Options for that.
02:05Let me reset this, because we need to change up a lot of these options.
02:10First of all, I do want to include the shadows, if any.
02:14I don't want to keep the original shading network in this case, although you
02:19might want to do that.
02:20If you tick this switch on, then the baked version will not appear on the object here.
02:27In other words, it's not going to create a new material.
02:29But let's keep it off this time.
02:31It will create a new material and that will be a better example of the power of this tool.
02:36So what else we want to do> Bake optimization, we really only want a single object in this case.
02:41Then we want to customize the settings here.
02:45To do that, I'll turn on the switch that says
02:47Use bake set override and scrolling down here.
02:52The most important thing here is the Color mode.
02:54It says, Only light, which means it's only going to bake the light into the
02:58vertices and it'll ignore the textures completely.
03:00I want to bake the Light and the color.
03:03The Resolution is only 512 x 512 by default.
03:06Let me turn that up to 1024.
03:08The File format of TIFF is fine.
03:10You'll see PNG is not an option here, so just leave it as TIFF.
03:15Let's see if there is anything else we need to do. I think that's it.
03:19This tool is going to create a file with a prefix baked on it. All right!
03:24With the object selected, I'll click Convert and Close and it will take a while.
03:28If you look down here in the lower left, it says, Calculating.
03:31So Mental Ray is working behind the scenes to calculate all of the shadows and
03:37reflections that might be on this object.
03:39So it will take a little bit longer.
03:41Give that a minute to finish.
03:44We've baked out that texture including the lighting. If I tumble around in my
03:49scene, you'll see that in fact, we've got some highlights here and those are
03:52actually because there was a reflection.
03:56There is light coming from the outside that's shining on here.
03:59That's, once again, a bitmap. Let's find that bitmap, because it's in a
04:05sort of super secret location.
04:06Let me minimize Maya for a second.
04:09Here is the bitmap that just got rendered out.
04:11It's found in your current project under renderData>mentalray>lightMap and
04:19that's not really a terribly great place for it to be, but that's where it gets dropped.
04:24I would recommend that if you're going to actually use this in production and
04:28you want to render it this way, you might want to take this file and move it
04:32into your sourceimages and then relink the shader.
04:36Basically, it's a good idea to have all of your texture maps inside the sourceimages folder.
04:42That's the process for baking.
04:44Let's just take a look at that image real quick.
04:47I'll open that up in Photoshop and you can see what that looks like, with all of lighting included in it.
04:52If you do this, you can also bake the entire scene out at once and that's a
04:56common thing that you'd do in building game levels, is bake the texture and
05:01lighting into all the walls and ceiling and floor and so on.
05:05That's how you bake textures in Mental Ray. That concludes our chapter on
05:10adjusting and combining textures in Maya.
Collapse this transcript
8. Special Effects
Constructing a candle flame shader
00:00In this chapter we'll look at special effects. The first thing we want to
00:05look at here is creating a candle flame, which will be incandescent.
00:10Additionally, you'll see that I've place some lights inside these candle
00:14flames, so that will actually illuminate the room. Those lights are actually
00:19inside the candle flames.
00:21The flame itself, if I hit Ctrl+A and look at its attributes, in the mesh shape
00:25node you'll see under Render Stats I have disabled Casts and Receive Shadows,
00:29so that the light inside the candle flame will be able to illuminate the rest of the room.
00:35Okay. So let's create a candle flame shader.
00:37I'll select the object and right-click and choose Assign New Material.
00:41This would be incandescent material and I can just use a standard Lambert for
00:45that, because I won't need any shiny highlights. I'll rename it, call it
00:50candleFlame_lambert. Fire flame doesn't reflect light, so it will have no
00:59diffuse component. We'll turn the Color all the way down to black.
01:03All we need to map in this case are Incandescence and Transparency.
01:08Let's go for Incandescence first.
01:10I'll click to create a new render node and it will be a Ramp, 2D Textures>Ramp.
01:17Now that's fully self-illuminated as you can see.
01:19Let's just play around with these colors here. Instead of red at the bottom I want to give it a blue color.
01:25In the middle I'll make it mostly white, maybe a little bit of color on that,
01:32and at the top, I'll set that to be a kind of a pinkish color.
01:36Let's do that again.
01:37Go back in there, change up the Hue of that and make it kind of orangish.
01:42v this one could be pure white.
01:48You can see as I've played around with that we can see the result here.
01:51It's fully self-illuminated and it's not affected by the lighting in the scene.
01:57So that's the incandescence aspect.
01:59The other thing I'd like to do is give it some transparency.
02:03I want it to be more opaque on the edges and transparent in the center.
02:07I'll go back up to the top level of the material. For transparency here I'm
02:12going to use a sampler info node, as we saw earlier in the course to create
02:19transparency based upon face angle.
02:22But I know in this case that I want to modulate that by a Remap Value node.
02:27I'm going to click on Transparency to create a new render node. That's going
02:31to be a Remap Value Node found in Utilities, looking for Remap Value there it is.
02:40That's been applied and now I need to plug something into this Input Value.
02:44Let's go to the Hypershade to do that.
02:45Let's graph the network of this candle flame. I want to plug something into
02:53that remapValue and it's going to be a Sampler Info Node, I want to find the
02:58facing ratio. It's going to be under Utilities once again, I'm looking for
03:03Sampler Info, here it is.
03:06I just want to take the facing ratio of Sampler Info and plug it into the
03:10input of Remap Value.
03:12Select the samplerInfo node, right-click on the lower right-hand corner and choose facingRatio.
03:18Go over to remapValue, left-click on the lower left-hand side and set that to
03:24inputValue. Now we have taken samplerInfo facingRatio and plugged it into
03:29the remapValue's inputValue.
03:31So let's see what that looks like in our view.
03:35We don't see much results here, just get in really close.
03:38I just want to play around with the color of that remap value. What you
03:45see here is that we're getting an edge effect here where we have less
03:50transparency on the edges.
03:52Let's do an interactive production render of that, so we can see it little bit more clearly.
03:58Once the IPR is calculated its initial pass then I can draw a rectangle around
04:03just the candle area and as I play with this you can see it a little bit better
04:06of what's happening.
04:10That's the transparency based upon face angle.
04:15Okay. So that's the first pass at our candle flame. We'll want to add some glow to that.
04:19We'll do that in the following movie.
Collapse this transcript
Using Shader Glow
00:00We've added an incandescent material to the candle flame, but it's not actually
00:05glowing, and we want to have an optical effect like a lens flare.
00:08I want to select the object and go back to its material, Ctrl+A to get the Attribute Editor open.
00:14Go to that material and you'll see there's a section in here that says Special
00:18Effects. We can increase the Glow Intensity, we bring that up all way.
00:23Let's do an interactive production render.
00:26Go up here and click on IPR.
00:32Once the IPR has done its initial pass I can drag a rectangle to choose the region
00:37I want to re-render, and then play around with the Glow Intensity.
00:41Let's just let it finish rendering.
00:45Once that's finished, then I can play around with this Glow Intensity.
00:47Bring that down and you can see how -- it's now really having much effect.
00:51As I reduce that Glow Intensity, it still seeming really, really bright.
00:55The reason is that the glow is automatically exposed, there's an Auto
01:00Exposure that's happening here.
01:02That will actually cause the glow to flicker on subsequent frames.
01:07If you want a controllable glow, then you'll need to go into the shaderGlow Node
01:12and make some changes. So let's do that.
01:14We want to go into the Hypershade. In the Hypershade you will see there is a
01:22node that says shaderGlow1, and this is a read-only node.
01:27It's one that cannot delete and you cannot rename and it's always there.
01:31There is only one shaderGlow node in a Maya scene.
01:35You cannot duplicate it and you cannot assign different shader glows to
01:39different objects. Any and all objects that have that glow attribute enabled
01:43will be linked to this shaderGlow.
01:46I'll go ahead and click it and now we've got its parameters in the Attribute Editor.
01:51Just so I don't accidentally lose this, I'm going to just copy that Tab off to
01:56its own window, because I need to make a bunch of changes here.
01:59So now I've got IPR active still and I can start playing around with the
02:03shaderGlow Attributes.
02:05The first thing I'll do is turn Auto Exposure off. You can see now it's changed in the IPR window.
02:12Auto Exposure doesn't really do a good job at giving us a quality glow effect,
02:16so I recommend turning it off in all cases.
02:19The shaderGlow node has actually two glows built into it.
02:22There's Glow Type and Halo Type. They are actually identical.
02:26I'm just going to focus on one at a time, so I'll choose to turn the Halo Type
02:31off by setting it to None.
02:32So you can see we're getting a glow effect there now, and then we just want to
02:37open up the Glow Attributes and start playing.
02:40You've got the Intensity and the Spread and also the Opacity.
02:44What I like to do is reduce the Intensity and increase the Spread, cause that to
02:49go out a little bit more.
02:51I want a really low Intensity and a high Spread in this case to get that candle flame look.
02:56So maybe a low intensity of I don't know .1 maybe? And a high Spread cause that
03:02to really spread out.
03:03Maybe even lower Glow Intensity .05.
03:08Additionally the Glow Opacity is really helpful, I'll turn that up all the way.
03:13What that does is it actually looks at the colors of the object and uses those colors.
03:19So if I increase the intensity again you can kind of see that, the edge here is
03:23blue and the top is little bit orange.
03:26Anyway, so you just need to play with that until you get kind of the look that
03:31you want. Maybe I've got one have a little bit lower spread amount.
03:37IPR makes it really easy for you to kind of dial in the look that you want.
03:42Now this is going to be view dependent.
03:44If I back up and look at this from the other side of the room it's going to look
03:48different, and we may not even see a glow effect.
03:50If I dolly back and do another IPR, then we'll see that the glow might not even
03:59be visible or might be so dim as to be not really convincing.
04:03We'll let that finish. Then I'll drag a rectangle around that area and once
04:09again start playing around with these values. Maybe increase the Spread and the
04:13Intensity so that we can actually see that glow from across the room.
04:20Maybe drag another rectangle around that.
04:21So I think I want a lower spread, there we go.
04:28The point is you're going to need to adjust the glow depending upon where your
04:32camera is relative to the object that you're rendering.
04:38I could probably go back and play around with the Shader itself, too, and make it
04:41little bit less blue, but that's a general principle of using shaderGlow.
04:46Then if I want to, of course, I can assign that material to the other objects.
04:50Select those two other candle flames, right-click and Assign Existing Material
04:55candleFlame_lambert, and then just do another render.
05:01You'll notice that the glow pops on at the end of the rendering, and that's
05:05actually important because the shaderGlow is a 2d optical effect that's applied
05:11after the main rendering.
05:13So we got our glow on there. We can also add an effect based upon the light
05:18that's inside there, and we'll do that in the next movie.
Collapse this transcript
Adding OpticalFX
00:00Another way that we can add glow is to create a glow node on a light,.
00:06This is, in some ways, better than adding shader glow to the material because we can
00:11customize each light to be different from the others if we need to.
00:17To add glow to a light, simply select the light, and go to the Attribute Editor,
00:21Ctrl+A, and you'll see there is a section labeled Light Effects.
00:26We can go to the Light Glow section, and click to create the render node.
00:31It's created, and it's got a name called opticalFX.
00:35That's the name of the node, and it's also the name of this particular node in this case, opticalFX1.
00:41You'll see the light is surrounded by a sphere.
00:43That sphere is just an easy way for you to select the optical effect, or the
00:47light itself, and the size of the sphere doesn't actually influence anything.
00:53Here I am looking at the Optical FX Attributes.
00:55What I want to do is of course do an IPR so I can adjust these values. I'll click IPR;
01:02let that finish rendering its first pass.
01:04You'll see I've got a little bit of a star there now, get that for free.
01:10So let me drag a rectangle so I can play around with some of these values.
01:15I know that I want a greater intensity on this.
01:18So I am going to increase the Intensity quite a lot.
01:22But I want a little bit less spread, maybe I'll give it a Spread of 0.5 or so.
01:28I can play around with the Star Level.
01:30What Star Level actually does is focus the star effect.
01:34So high star level is going to result in very thin lines.
01:39I'll set that to a value of let's say 5.
01:42I've also got the Glow Opacity.
01:45I can turn that up a bit.
01:48I guess we're basically where we want to be with this.
01:50Maybe a little bit more Glow Intensity, maybe 15.
01:54I can also change the number of Star Points.
01:56Let's give that a hexagonal pattern with 6 points, and also maybe rotate
02:01the star so that it's not lined up exactly with the world, so it looks kind of interesting.
02:06Well, that's our first Optical Effect.
02:10If I want to apply that to the other lights in my shot, then I'll need to do that manually.
02:17I'll go ahead, and select the other light, click Light Glow and create it, and
02:22go to the third light, and once again, create the light glow.
02:26But those will all have default values.
02:28These new ones that I've created are going to have default values.
02:31If I render that, you'll see they look different than the one that I've customized.
02:35But it's easy to fix that.
02:37Although I can't instance lights in Maya, I can just grab the values from one
02:43that I like and create a Preset, and then plug that into the others.
02:47This is a good one.
02:49I just want to create a Preset, so in the Attribute Editor, for the opticalFX
02:53node, we'll go there, and we'll create a preset.
02:57Hold down the Presets button, and save opticalFX Preset.
03:01Let's call it myOpticalFX, and click Save.
03:08That's going to get saved in my current user's Presets folder.
03:14To assign that preset to the other lights, I'll select the light and go to its
03:20opticalFX Attributes and you'll see Presets is highlighted here.
03:25It's got a little star next to it, meaning that a preset exists for this node.
03:29I can hold down the mouse and choose myOpticalFX>Replace and that will replace
03:36the existing values with the ones from the preset.
03:38I will repeat that process for the third one.
03:41Hold down Presets, and choose myOpticalFX> Replace and then do a final render. Very good!
03:48So that's how we can apply glow to lights in Maya.
Collapse this transcript
Building a nonphotoreal shading network
00:00One of my favorite things about Maya is the ability to create non-photo real renderings like this one.
00:06It looks like a medieval engraving.
00:09I did this by combining share nodes in a network. Let's take a look at
00:14how this was done so you can kind of wrap your head around the process.
00:18I've got the Hypershade window open here.
00:20Let me maximize that, and give us lots of space.
00:23I'll close up some of these other panels so we can kind of analyze what's going on here.
00:27What we have here is at the very end of the chain, the top level, the root of
00:33the material is a surface shader.
00:34It's not actually responding to light at all.
00:37Of course, we can see that there's a lighting effect in that rendering.
00:41But that's actually being derived from this Lambert shader over here.
00:45Now this is kind of interesting.
00:48What I've done is I've combined the Lambert material with a ramp texture and
00:56added them both together. That's something that's kind of unique in Maya.
01:01I mean other programs can do it, but I was raised with programs like 3ds Max
01:07in which a texture is a texture, and a material is a material, and never the twain shall meet.
01:13In other words, you can't just take a material and make that an input to a
01:17texture in 3ds Max, but here in Maya, we can.
01:21That's the key to making this particular non-photo real, or NPR, shader work.
01:28I'm combining the ramp with the lighting from the scene, and then using a remap
01:34value node to cut a threshold, so that certain areas will be completely white
01:40and certain areas completely black.
01:43Additionally, I've added a little bit of noise to the mix here.
01:46You'll see there's a Brownian noise texture, and that's just there to sort of
01:50randomize the line a little bit.
01:52That's the basic principle here. We can multiply that whole thing by 2
01:56because in fact I've got a U direction ramp and also a V direction ramp, you
02:01will see ramp U here and ramp V. That's the essential process for creating this
02:06particular non-photo real shader.
Collapse this transcript
Creating an ideal diffuse shader
00:00The first step in creating our non-photo real shading network is to build an ideal diffuse material.
00:08By ideal diffuse, what I mean is that all of the light striking the object
00:13will reflect off the object.
00:16If there are no additional fill lights in the scene, if we have a key light
00:21only, then the shadows are absolutely black, and the highlights are 100% white.
00:26As you see, I've got three lights in my scene;
00:29I've got a key, a fill, and a back light.
00:32So there will never be any area of the screen that will be 100% black.
00:38But we will get hotspots that are perfectly white.
00:41The important thing again is that we have an ideal diffuse shader
00:45that's capturing all the light.
00:46I'm going to select all the geometry in the scene and go to right-click, choose
00:51Assign New Material, and that will be a Lambert material, and I'll rename it.
00:56I'll call it ideal_diffuse_lambert.
01:01It just needs to have a color of white, 100% white, and a Diffuse amount of 1,
01:09so that we're not dimming down the Lambert Shader.
01:13That's the first step towards creating our non-photo real and grading shader.
Collapse this transcript
Creating a noisy ramp
00:00The next step in creating our shader is to create a noisy ramp.
00:05I want a ramp that varies from black to white to create the lines of the engraving.
00:10But I want it to be a wiggly line.
00:12I don't want it to be perfectly straight because that doesn't look handmade.
00:16Let's go into the Hypershade;
00:18Window>Rendering Editors>Hypershade, and I will go ahead and create a ramp, 2D Texture>Ramp.
00:26Before I adjust the ramp properties, I am just going to go to the 2D Texture
00:31Placement node, and crank up the repeats.
00:33I need lots and lots of lines here.
00:35So I'll set the Repeat U and Repeat V both to 30.
00:39Now you can see that I am getting a lot of repeats on the ramp here.
00:42Now I will go to the ramp texture, and what I want is on either ends of the ramp, black.
00:49So I will go ahead and select these colors here and set that to black on either end here.
00:55In the center I want that to be white.
00:57Let's add some noise to this.
01:02You'll see there's a Noise slider here.
01:04As I increase that, you'll see it in the sample swatch here.
01:09But currently, we're not seeing it in the actual ramp itself, in the Attribute Editor.
01:14I'll set the Noise Amount to let's say about 0.3, and I need to change the Noise Frequency
01:19because it's too high. I need a lower frequency noise that's going to
01:24be just kind of a wiggly line.
01:25If I bring this Frequency down, you'll see what I am talking about.
01:29Low frequency means a long wavelength.
01:32Let's set that Noise Frequency to maybe 0.01, so you have just a little bit of
01:38wiggle on that line. All right!
01:42I am going to rename this while I am at it.
01:44I am going to end up with two of these.
01:47This is the V Ramp here, so I'll rename this, I'll call this ramp_V.
01:51There is already one in my scene here, so I'll just call it ramp_v with a lowercase.
01:55So that's our noisy ramp.
Collapse this transcript
Adding colors
00:00We've got an ideal diffuse material and we've also got a noisy ramp.
00:05Now we're ready to add the two together.
00:08We'll find the Add Node under Utilities in then Create panel over here.
00:12What we're looking for is Add, but it's actually not called Add.
00:19It's called +|- Average.
00:22Go ahead and click on that and now I've got a new plusminusaverage node.
00:28To keep my scene clean I want to rename this.
00:30I'll call it plusminusaverage_v.
00:35Now the plusminusaverage node has different operations you'll see here.
00:40The one of course I want is Sum, because I'm adding two things together.
00:45We could add just one dimension or two dimensions or three dimensions.
00:49It doesn't really matter whether we do one dimension or three dimensions in this case,
00:53because it's a black-and-white ramp.
00:56So it's a monochrome and the red, green, and blue values will all be the same.
01:02But I will go ahead and use Input 3D in this case.
01:05Maybe in some of your own scenes you might want to use color.
01:08So we'll do it that way.
01:10We will use of 3D input that accepts red, green, and blue.
01:13I'll right-click on the lower right hand corner of my ramp and choose
01:17outColor>outColor, and then left-click on the lower left hand corner of my
01:23plusminusaverage node.
01:25I want to send that to in an input, a 3D input in this case, and I just choose
01:30the first one in the list.
01:32Now you'll see that's showing up here.
01:34We see there is now a new item in this Input 3D section. That's half of it.
01:39The other half is I want to get my ideal diffuse material in here. So here it is.
01:44I'll just grab that select it with the left mouse and then middle-mouse drag it
01:49and now it's in the work area here.
01:52Once again I want to right-click on the lower right-hand corner
01:55and choose outColor>outColor.
01:57If they didn't work the first time, just make sure it's selected.
02:00Right-click>outColor>outColor.
02:03Now I've got my wire and I can go over here at left-click and choose Input 3D
02:10and select the one that we haven't already connected.
02:13If I select that and you can see it.
02:17Let's see what that looks like now.
02:19If we assign that to our objects in the scene. I need to have a Surface Shader in order to do this.
02:26So go back up into the Maya Surface materials and I'll click Surface Shader.
02:32Let me give that in name.
02:33I'll call it engrave_surfaceshader.
02:38I'll take the plusminusaverage output and put that into the outColor here.
02:44In fact, I can just middle-mouse drag to make that connection.
02:47So we got something here.
02:49Look at that, if we zoom in on that.
02:52You can see now that the white ideal diffuse is adding to the ramp that I created earlier.
03:00Pretty cool.
03:01So I'll go ahead and select all my geometry and assign that Surface Shader.
03:06I'll right-click and choose Assign Existing Material> engrave_surfaceshader.
03:13We won't be able to see this in the viewport.
03:15It will just render as black. It doesn't matter which of these display modes
03:20you go into, you won't be able to see the output of that Surface Shader, because
03:25it's accepting an input from a plusminusaverage node. That's just not really
03:30going to work in the viewport here, but I can go ahead and do a quick render.
03:34The render is actually going to be very fast.
03:36So we made some progress here.
03:38You can see that there's actually a little bit of variation in the width of the
03:42line based upon the brightness of the surface.
03:44That includes the shadows here, because my lights are casting shadows.
03:48So we're making progress.
Collapse this transcript
Setting a threshold with Remap Value
00:00We made a good start towards our non-photo real engraving shader.
00:04What we are seeing now is just the ramp being added to the ideal diffuse material.
00:11What we want is to have a black line that varies in width depending upon the
00:16brightness of that material.
00:17Let's go back into the Hypershade.
00:20I have got it minimized down here.
00:21What we want to do is take the output of this plusminusaverage node and pipe it
00:26through a re-map value node.
00:28So we can set a threshold or a cutoff.
00:30Now there are a multiple ways to do this.
00:33As I say there are many ways to skin a cat, especially in 3D and extra especially in Maya.
00:38You have lots of choices for how you want to do something.
00:41In this case, for example, I could use a Condition node and that would
00:44accomplish the same thing.
00:46But I like to use a Remap Value node, because it will give us a visual interface.
00:50We can actually move a graph around and see the results in real time and adjust
00:56our shader to do it in more artistic fashion.
00:59So let's create this Remap Value node.
01:01It's going to be found in the Utility section here.
01:05Scroll down a little bit looking for Remap Value.
01:10Here it is. Create that.
01:14Then we want to actually make these connections.
01:16Here's the thing Remap Value, the way I am going to use it here now, I want to
01:21use it in a one-dimensional fashion.
01:23In other words, I just want a single graph that I can adjust to set a cutoff threshold.
01:28Currently, my plusminusaverage is operating in RGB space.
01:33It's using a three-dimensional space.
01:36So I just want to take one of those three values since they are all the same,
01:40anyway and it's black and white.
01:42So what I want to do is delete this connection. I'll click on that wire and press
01:46the Delete key on the keyboard.
01:49I want to take one of these plusminusaverage outputs.
01:51So I will right-click in the lower right-hand corner of that.
01:54Again, we are using a 3D summation.
01:56So I want to use output3D and I can take output3D X, Y, or Z. Any of those would
02:02work just fine, because they are all the same.
02:04Then I want to connect that to the input of the Remap Value, left-click on that
02:09and choose Input Value.
02:12Now that's wired up.
02:13Now I want to take the Remap Value node and plug it into a surfaceShader.
02:18But once again, if I will use a one-dimensional aspect of the Remap Value, what
02:23I will need to do is take the 1D output of Remap Value and plug it in three
02:29times to my engraving surfaceShader.
02:32If I open up the Attribute Editor for the Remap Value node, what I am talking
02:37about is I want to use this value graph to set the threshold, that's just
02:41going to be more intuitive.
02:43That's a one-dimensional value.
02:45So I will just take three copies of that one-dimensional value and send each one
02:50of those to the red, green, and blue channels of the surfaceShader here.
02:54I will right-click on the Remap Value node and choose outValue.
02:58Go over to the engrave_surfaceShader, left-click on that. You don't see the
03:04outValue or the color of the surfaceShader listed here, because Maya knows that
03:09I'm trying to connect a single floating-point value.
03:13The only ones available currently are the Alpha Gain displacement map.
03:17So color is not a floating-point value.
03:19It's a vector or three value attribute.
03:22That's why it's not showing up in the list here.
03:25But I can just choose Other and that will launch up the Connection Editor.
03:29I want to take the outValue from the Remap Value node and plug it into the
03:33outColor of the surfaceShader.
03:36Scroll down, I am looking for outColor, but I need do open that up and connect it
03:40to outColor red, green, and blue. Now all those connections are made.
03:47Cool. In order to see the effect here we should use the IPR.
03:51I am going to go ahead and select my Remap Value node and I will go back to my
03:59Render View here and click Interactive Production Render.
04:03That's going to look pretty grainy when we start working on this. So don't panic.
04:08It's going to be grainy in the IPR, but it will be fine when you do a proper render.
04:13So let's start tweaking this Remap Value curve.
04:16If I move these points around, oh, we've got to drag a box around here to see our IPR.
04:22There we go.
04:23So if we move this point around, you'll see that we are affecting the contrast and brightness here.
04:31So what I want is just no interpolation.
04:34I want just a cutoff threshold.
04:37So for this first point on the graph here I will set its Interpolation type to None.
04:44The second point on this graph here controls the threshold. Oh cool!
04:50So that's pretty good.
04:52Let's see that looks like with a full render. Pretty nice!
04:56So we can keep adding to that or keep adjusting that until we get a look that we want,
05:00but that's the essential process.
Collapse this transcript
Multiplying values
00:00We've got half of our engraving shader.
00:02We've got lines running in one dimension, in the V dimension of the surfaces of the models.
00:07I'd like to mention that in order for something like this to work;
00:11you got to have good UVs.
00:13I did spend a fair amount of time scaling the UVs on each model to make sure
00:18that all the lines are approximately the same distance apart, the same size, so it
00:23look like everything was in the same drawing.
00:25Well, we've got half of it done.
00:27Now we need to put in the other half.
00:29We want lines running in the U dimension.
00:31I'll go to the Hypershade, which I've got minimized here.
00:33While I am here, I just want to rename this Remap Value node, because it's
00:37currently named remapValue16.
00:38So let's clean that up.
00:40I will call that remapValue_v.
00:43So I want to duplicate some of these nodes.
00:45I need a new ramp that's a U ramp.
00:47I need to add that to the ideal Diffuse Lambert, and then I need to set a threshold.
00:52So these three nodes need to be duplicated.
00:54To save myself the time of reconnecting all these connections, I can duplicate
01:00part of the shader network and then delete the parts I don't need.
01:04I've selected remapValue_v, I'll go up into the Edit menu in the Hypershade, and
01:09I will go to Duplicate>Shading Network.
01:11Now you will see I've got remapValue_v1 over here.
01:16Let's clean up the display here by rearranging the graph.
01:19I need to go around and clean up a bunch of stuff here.
01:22So remapValue_v1, I want to rename that to remapValue_u; plus-minus average v1
01:29is going to be plus-minus average u; and ramp_v1 is going to be ramp_u.
01:36While I am here, I'll change the Type to U Ramp, and that will cause the
01:41lines to run in the opposite direction as you can see.
01:44These are running up and down, these are running left and right.
01:47So I have done that.
01:48Now I've got duplicate nodes here.
01:49These are redundant.
01:51This texture placement node is unnecessary because I can just use this one.
01:54Likewise, I don't need another ideal Diffuse Lambert.
01:58So what I will do is I will Ctrl+Shift+Select these two nodes and delete them,
02:02and then connect these to the existing nodes.
02:06So the place2dTexture node here, I want to right-click on the lower right-hand
02:10corner, and choose outUV>outUV.
02:13Go over here and left-click.
02:15I was hoping to see uvCoord as one of the inputs that I am able to connect to,
02:20but for some reason, that's not showing up.
02:22So I just have to go to default, which launches up the Connection Editor.
02:26I want to take outUV from that Texture Placement node and connect it to uvCoord on the ramp.
02:33As soon as I do that, you can see now I am getting lots of repeats on ramp_u.
02:38So that's one.
02:38Then the other one I want to do is I want to take ideal_diffuse, and plug that
02:44into this plusMinusAverage node.
02:46So I will right-click over here and choose outColor>outColor, and then
02:50left-click on the plusMinusAverage node, and send that to one of the 3D input
02:55slots that's available here;
02:57input3D>1. So I've made all those connections, let's rearrange the graph,
03:03clean this up, and then let's just admire what we've done here.
03:07So you've got two branches to our shader tree.
03:09We've got the V branch that's running this way, and we've got the U branch
03:13that's running down this way.
03:15All I want to do now is multiply those two branches together.
03:20What that will do is ensure that the only places we'll see white on the surface
03:25shader are places where both U and V are white. That will end up giving us
03:33two sets of intersecting black lines.
03:36So let's create a Multiply Divide node.
03:38Go back to my Create section over here. In Utilities area, we want to find Multiply Divide.
03:47Here it is, Multiply Divide.
03:48Click on that, and I've got a Multiply Divide node. Bring that around.
03:54I want to make that the output to my Surface Shader.
03:57Select the Surface Shader, and Middle-mouse+Drag Multiply Divide onto that
04:02outColor, and you'll see I've got connections here too, so I want to delete those connections.
04:07Let's just make sure I've got what I want;
04:09multiplyDivide7.output to engrave surface shader outColor. Okay, very good!
04:17Now we want to make connections from these remapValue nodes to the Multiply Divide.
04:22This is going to be a three-point system here.
04:25It's going to have a vector output because this outColor is a vector.
04:28So I need to take three identical copies of remapValue_v and remapValue_u and
04:34plug those into the Multiply Divide inputs.
04:37I will right-click and choose outValue. Go over here to multiplyDivide,
04:42left-click and choose input1, and I want to just connect that to input1 x, y,
04:49and z. Do that three times.
04:52So right-click and do outValue, input1y, right-click outValue,
04:59left-click input1z.
05:02So those three connections are made.
05:04Now I want to connect the other side, so right-click and choose outValue.
05:09Go to input2, input2x, outValue, input2y, and finally right-click
05:19outValue and left-click input2z. All right!
05:22Now look at that.
05:26We are getting crisscrossing, crosshatching there. Pretty cool!
05:32So let's see what that looks like in a rendering.
05:34Let me store this one, and do another render.
05:37We want to render the correct viewport.
05:39So I will select this panel over here and re-render.
05:43All right! I've got intersecting lines.
05:45So that's with only one branch of our shader tree, and that's with both branches.
05:50Now we can go and adjust our threshold and kind of get this sort of looking more artistic.
05:57So let's do an IPR on this.
05:59Click IPR and wait for that to finish. Drag a big rectangle around everything,
06:04go back to the Hypershade. I want to play around with the Threshold value from
06:08this remapValue_v and u. Select the u one;
06:12remapValue_u and drag this around until we kind of get the look that we want. Wow!
06:21I don't know about how you feel about it, but I think that is pretty cool.
06:27So if I think that's approximately what I want, then I will do a full render,
06:31and see what it looks like. Okay.
06:33Well, we've got an engraving shader.
06:34Now the only thing we have left to do is add a little bit of noise.
06:37We'll do that in the final movie of the chapter.
Collapse this transcript
Adding Brownian noise
00:00We are almost finished with our engraving shader, but it looks a little bit too regular to me.
00:05It needs a little bit of noise and dirt and grit in it to be believable and artistic.
00:10So let's add some noise.
00:11I will go ahead and minimize that Render View.
00:15In the Hypershade, I want to go to the 3D Textures section over here,
00:20and click on Brownian.
00:21The reason I chose Brownian as the noise source is because it has so few attributes.
00:27There is not a lot for us to really worry about.
00:31So I want to just tweak these values out a little bit.
00:34I already know what values I want because I played around with this previously.
00:37I am going to set Lacunarity down to 3.
00:40Lacunarity means how many holes it has. The Increment;
00:44that's basically how much contrast it has.
00:47So I am going to set that down to 0, which we're just going to increase the contrast.
00:51Octaves, that's how deep the fractal dimension is, or how many repeats of
00:58this algorithm we're going to see. As I increase the Octaves, it's going to get more detailed.
01:02I am actually going to turn that up all the way to 5.
01:06Now the other thing I want to do is there's a place3DTexture node that got
01:10created in the same process when I clicked on Brownian.
01:14So I just want to scale that up because it's going to be so small that it
01:18won't really have much effect on my scene because my scene is modeled at real world scale.
01:23So I will set the place3DTexture scale at 50 in all dimensions.
01:28That's all there is to that.
01:30Then finally I just want to add this Brownian Noise texture to the
01:34plusMinusAverage nodes that I've already got here.
01:38So plusMinusAverage doesn't have just only two inputs, you can have as many as you want.
01:43Currently, I've got two inputs.
01:45It's accepting an input from the ramp, and an input from the ideal diffuse.
01:50I will also add an input from this Brownian.
01:53So I will right-click on the Brownian, and choose outColor>outColor, and then
01:59plusMinusAverage_u, I will go ahead and choose input3D and I've got a slot open here.
02:06So boom! Connect that.
02:07Likewise with the other one here.
02:09Same thing though, I am going to right-click and choose outColor>outColor, and
02:13then left-click over here and choose input3D and choose that open slot.
02:19Now when I render this here, it might be a little bit too contrasty.
02:23But let's see what happens.
02:24I am going to store the image I have.
02:26It has no Brownian noise on it, and then render it with it.
02:29You can see that yeah, we've got too much Brownian noise.
02:32It's just sort of blasting out and taking over our rendering.
02:36So I will go back into the Hypergraph.
02:39What I can do is I can insert a Remap Value node here in this Brownian.
02:46I can delete the connections I've already got, just select those two wires, and then delete.
02:51Then, I just put a Remap Value node in the mix here.
02:55Go into Utilities and looking for Remap Value.
03:00I just want to dim that Brownian down so it's not so intense.
03:04Click on Remap Value, and there it is!
03:06I want to take the brownian2 output and plug it into remapValue in.
03:12I will just take one of these, maybe the alpha is probably the most logical
03:18thing to take; right-click on that, and then left-click on Remap Value, and send
03:23the alphaBrownian2 to the inputValue of my Remap Value.
03:28Then that Remap Value is going to go back into these plusMinusAverages.
03:33Right-click and choose outColor>outColor, plusMinus, Input3D>2.
03:40Likewise, on the other one, right-click, outColor>outColor and down here,
03:46plusMinus average, Input3D>2. Now I just want to go to the Remap Value node
03:52and adjust these colors.
03:53I will leave this one at black, and I will take the white swatch here and dim
03:58that down really low to maybe a value of let's say 0.2 maybe.
04:04So that's just going to create a very subtle noise effect.
04:10Okay, do another rendering. Okay.
04:13Cool!
04:13You can see the noise in here.
04:16And if I compare that to the one with no noise, I think that's a lot better.
04:20The strength of the noise is going to be controlled by this little flag
04:24here, this color slot.
04:25So if I click on that and change that color up, if I reduce it down to let's say 0.1,
04:30then we won't get as much clipping and we won't lose as much of these black lines.
04:36So let's store that one and do another render and see the difference.
04:40So this is with a value of 1 to that color slot over here, and that's a value of 2.
04:46So I think that's a little bit too much noise. This one is probably about right.
04:51We are getting enough noise that it kind of feels natural.
04:54Well, I think that was a great exercise in learning how to build shader networks
04:58because we saw all about all sorts of stuff;
05:01remapping, adding, multiplying, reusing nodes, making connections, hither and thither.
05:09I think that was a really good example of building shader networks in Maya.
05:14We've got to learn all about lots and lots of cool stuff; using material as a
05:19texture, adding colors together, remapping colors, multiplying colors, reusing nodes.
05:28So I think that again was quite a good exercise in learning how to build
05:31shader networks in Maya.
05:33That's the end of our chapter on non-photo real rendering and special effects.
Collapse this transcript
9. Maya Toon
Assigning a fill with a ramp shader
00:00In our final chapter we are going to take quick look at Maya Toon, which is a
00:05suite of tools for creating non-photo real renderings that look like cartoons.
00:11It's not like what we did it in the chapter on special effects where we have to
00:15build a big shader network.
00:17Maya Toon is a sort of out of the box set of tools that's good for creating the
00:23look of an animated cel cartoon.
00:26So I've got a scene here already made and what I want to do is just select all the objects.
00:31I want to assign Maya Toon Fill Shader.
00:35This will be found in the Rendering menu set and there is a menu labeled Toon.
00:42You'll see Assign Fill Shader.
00:45You have a whole bunch of options here.
00:46In fact, all this is going to do is assign a shader called the Ramp Shader with a certain preset.
00:55Let's do Shaded Brightness Three Tone.
00:59Go ahead and click on that.
01:00The Attribute Editor opens up and you see I have got some controls here.
01:05We can't really see the effect of the Maya Toon Ramp Shader or Fill Shader here
01:11unless we look at it in Viewport 2.0 mode or do a full rendering.
01:18But I can do that here in Viewport by just swapping the renderer out to Viewport 2.0.
01:25Wow! That's pretty cool.
01:27Actually, I want to see the lighting in the scene as well.
01:30So I want to press the 7 key on my keyboard and now I can actually see the effect of the lighting.
01:36Now I want to go over to my threeToneBrightnessShader that's been made for me.
01:41You can see if I move these swatches around on this gradient ramp you can see
01:47I can control the contrast and brightness.
01:50I will just go into each one of these and I just want to make this a monochrome example.
01:55So I am going to bring the saturation down in all of these.
02:04So let's say three-quarter brightness maybe and no saturation.
02:10This top one here no saturation, but not completely bright, because I want
02:15a specular highlight in addition to this diffuse reflection we are seeing here.
02:19Of course, I can move these around as well.
02:22I could create more of them as well.
02:24It's just a standard ordinary ramp.
02:27So if I wanted to I could create another flag on there, another swatch, and give
02:33that maybe a dark black color for the deepest shadows.
02:38There are other modes as well you can put this color input into.
02:43You can have the colors based upon the light angle and so on, but I think the
02:47brightness is the best choice in this case.
02:52So that's the Ramp Shader, just the color aspect of it.
02:57We can also give it some specularity.
02:59So I can scroll down a bit and you'll see there's a section for specular shading.
03:04I can turn that up and you can see I am getting some bright highlights here.
03:08I can also change the position of this flag here.
03:12This swatch, which will control the size of the specular highlight.
03:16Then I've got this graph here, which controls basically the strength of the
03:21highlight, the specular roll off.
03:23So I can maybe turn that up all the way to get a very bright highlight.
03:27You can see here that I've got an interesting situation here where I got
03:32specular highlights that are kind of appearing outside of the realm of the
03:36brightest area of the diffuse channel.
03:40Basically, to workaround that I just want to have a bigger spread to that diffuse area.
03:46So that spreads out more.
03:50Give the specular highlight a chance to shine.
03:55I can also, just to help my look here little bit, I can turn off the specular
04:00highlights on some of my lights.
04:02I've actually got three lights in the scene and they're all creating specular hotspots.
04:07But I can go into each light and turn its specular component off.
04:11Let's go into the outliner.
04:14You see I have got spotlight.
04:16I want that one to project specular highlights, but the point lights, maybe not.
04:21So I can select that point light in the Attribute Editor and disable
04:25its specular component.
04:27This third one is my backlight.
04:29I think I want to keep that one on, because it looks better with them on.
04:34So that's the basics of setting up the Ramp Shader or as Maya Toon calls it the Fill Shader.
Collapse this transcript
Assigning a Toon outline
00:00We've got our ramp Shader or fill Shader working pretty well.
00:04But what we really need to complete this are some lines on the edges of objects.
00:12We need some ink around the edges. as if it were for a cel shaded drawing.
00:17To do that I want to select all the objects and assign a toon outline.
00:22However, these grapes here are very high polygon count and that's really going
00:26to slow down my performance.
00:28So I just want to select those grapes and hide them for the moment, going
00:32to Visibility and turn that off, set that to 0. Then I'm going to
00:38select everything except the ground plane, so I'll just drag a big box surround everything.
00:42I don't need an outline on the ground plane, so I can just Ctrl+Click to deselect that ground plane.
00:48With everything else selected I'll go back into that Rendering menu set in the
00:52Toon menu and choose Assign Outline>Add New Toon Outline, go ahead and click on that.
01:00Now I won't be able to see it in Viewport 2.0. This is a little bit of a
01:05paradox here, I can see the ramp Shader or the fill in Viewport 2.0,
01:11but I cannot see the outlines.
01:12If I go into a different Render mode like Default Quality, now I can see the
01:18outlines but I can't see the ramp.
01:21In fact, there is no display mode currently where we can see both the fill and the outline.
01:26If I go into High Quality, again, I can see the outline, but I cannot see the fill.
01:32In order to see them both at once and figure out what our look is going to be,
01:37we will have to do a full rendering, so I'll click on the Render button.
01:41Additionally by the way, Interactive Production Rendering doesn't work
01:44with the outlines either, so really the only way to look at this and see it
01:49all complete in one image is by doing a completely full production render
01:54or maybe our region render.
01:56Okay, so I've got my outlines on there. Next we will play around with those outline properties.
Collapse this transcript
Editing outline attributes in the pfxToon node
00:00We've assigned the outline and now I want to play around with the outline
00:04attributes and control the line width and so on.
00:08I'm going to select those outlines, you can click on it in the Viewport,
00:13but it's a little bit difficult to select. So you'll probably need to go into the outliner,
00:18Window>Outliner. What you're looking for is actually something that says pfxToon1.
00:25If you select that, that's the outlines.
00:28That's an indicator in fact, that it's the Paint Effects Engine that's creating these outlines.
00:35That's the reason why it doesn't work in Viewport 2.0, because Viewport 2.0
00:40doesn't support Paint Effects. Additionally, it doesn't work in mental ray
00:46unless you convert the outlines to polygons, which we will do later.
00:50But so, if you want to render this currently in this state, you'll need to
00:53render it in Maya Software.
00:55I'll hit Ctrl+A to open up my Attributes.
00:57Here we've got pfxToon and we can play around with the most basic things like the Line Width.
01:03We can increase that Line Width, you can see that happening in my Viewport.
01:08You see in fact, additionally, that it's made out of polygons.
01:10Now there are different sort of sections here for different types of lines;
01:17Profiles and Creases and Borders and Intersections. All I am really concerned
01:22with here today are the Profiles around the edges of each object.
01:27I can turn the Crease Lines off because they're not really doing anything anyway.
01:31What I want to do in here is just vary the line width, and I can do that by
01:38playing around with this Line End Thinning.
01:41If I increase that up, what that's going to do is, it is going to call the
01:45ends of lines to sort of become smaller at the ends.
01:49Let's increase the width a bit more, so we can really see that Line End Thinning.
01:55So with the value of 0 you can see these guys are not really working right.
01:59Those are a bit too thick, so I can reduce their thickness a bit by increasing
02:04this Line End Thinning.
02:06There are other attitudes in here. I can go and scroll down and I can play
02:10around with the overall width of some of these, like the Profile Line and the
02:16Break Angle that's going to control how it's going to do the edge detection.
02:21Basically, just experiment and play around until you get the result that you want.
02:28One of things you'll need to do pretty commonly is play around this Line Offset,
02:32because that's going to send those lines towards or away from the surface, so
02:37that they will sort of stand out from that surface.
02:42Increase that End Thinning, we can see that a little bit more clearly now
02:46here, so that's some of the basic properties of the Paint Effects Toon.
02:54So let's see if we can render that and see what it looks like, pretty good!
Collapse this transcript
Manipulating outlines with a modifier
00:00A cool feature of paint effects is the ability to change the paint effects based
00:05upon something called a Modifier.
00:07That is a sphere or cube primitive that you can position in your scene to change
00:14the look of the paint effects just inside that volume.
00:18Since the outlines here are based upon the paint effects engine, we can use a
00:22modifier to vary the line width based upon the position of that Modifier.
00:27I want to go ahead and select the lines and probably the easiest way to do that
00:31is from the Outliner.
00:34Select the pfxToon node and then in the Rendering menu set I want to go to the
00:39Toon menu and choose Create Modifier.
00:43That's created, but it's pretty small.
00:45I built my world at real-world scale.
00:48So the Modifier is kind of small here. There it is.
00:51So I want to scale that up a bit. Then position it, grab the Move tool, position that up.
01:00Let's just focus on what that looks like in the Camera View.
01:05So I'll tab the spacebar.
01:08As I move that modifier around, you can see that it's changing the line width.
01:12Anything that's inside that sphere is getting a thicker line.
01:18That's pretty cool.
01:19What I really want to do is actually make the line thinner, not thicker.
01:23So I'll go into the Modifier Attributes, hit Ctrl+A, to get the Attributes up.
01:28The relevant attribute here is the Width Scale.
01:31That's a multiplier for the width of the line.
01:34Currently, it's set to the value of 5, which means that inside the sphere's
01:38volume the line will be five times thicker than elsewhere.
01:43What I want is for it to be thinner, of course.
01:45So I want this to be a fractional value.
01:48If I bring this down to let's say .5 or so, you can see that in this area the line is thinner.
01:55So we can play around with that position.
02:02In order to get the best out of this, maybe I can go back into the actual paint effects node.
02:09If you can't select it in the Viewport again, go into the Outliner and select it there.
02:13Select that Paint Effects node and I can increase the overall line width to
02:18compensate for the fact that I've thinned the line down over in this area. Cool!
02:23So let's render that and see what it looks like. Very nice!
02:26So my lines are much thicker here in the foreground and much thinner here in the
02:30background, which is a result I was trying to achieve.
02:33That's how you can use a Modifier to vary the Line Width of your pfxToon outline.
Collapse this transcript
Converting Toon outlines to polygons
00:00We've got our fill and our outline for Maya Toon working pretty well.
00:05This will render in Maya Software just fine.
00:08If I go ahead and go to the Render Settings, you see I've got Maya Software as a
00:12current renderer at Production quality.
00:13If I do render of that, it looks fine.
00:17I can go ahead and store that image.
00:19What I want to do is I want to also render it in other Renderers like mental ray
00:25or Maya Hardware 2.0.
00:26It's actually going to be the best choice here.
00:29So if I change my renderer to Maya Hardware 2.0 and then do a renderer of
00:34that we'll see that we don't see the outlines, because Hardware 2.0 doesn't
00:39support paint effects.
00:41While I am at it by the way I'll go into the Mata Hardware 2.0 tab in my
00:45Renderer Settings and just increase the Quality, because it's looking a bit
00:48jagged and aliased go into Multisample Anti-aliasing.
00:51Turn that on and turn the Sample Count up all the way, do another render.
00:56That's just going to soften up all those jagged edges.
00:59So that's what it looks like with Maya Hardware 2.0 and with no outlines.
01:04If we want our outlines what we'll do is select them and convert them to polygons.
01:09I'm going to my Outliner, select the pfxToon node, and then go into the Modify
01:18menu, Convert>Paint Effects to Polygons.
01:22Let's go into the Options just quickly.
01:25There is a limit to the number of polygons here. Actually the default is a 100,000.
01:32When you convert you can just set an upper limit so that you don't overload your system.
01:37Go ahead and click Convert and now I can tell that it's been converted to
01:42polygons, because in fact I'm seeing triangles here.
01:45So that's a dead giveaway.
01:47Now as long as I don't delete construction history I am fine and I can actually
01:51continue to make changes to this.
01:53For example, I can select my Line Modifier, and move that around and it's still
01:58going to affect the Paint Effects in the exact same way they did before.
02:01We might have a little bit of a performance hit from the polygon conversion,
02:06because that needs to be updated here in real time.
02:08But essentially nothing has changed.
02:11It's just that the Paint Effects have been converted to polygons, but the
02:15original Paint Effects Outline node is still there in the scene.
02:19So now if I render this with Maya Hardware 2.0 we've got our Outlines.
02:24But did you notice how fast that was, by the way?
02:27So Maya Hardware 2.0 is going to be much, much, much faster than Maya Software.
02:33I mean at least ten times faster, maybe even one hundred times faster.
02:38That's a big deal if you're in production and you need to render thousands of frames.
02:42Maya Hardware 2.0 is an excellent choice for something like Maya Toon.
02:48Now if we look at our software rendered version you'll notice that they don't look the same.
02:52That's the Maya Software version and I move my slider over here and that's the
02:57Maya Hardware 2.0 version.
02:59You just basically need to choose your renderer first before you make a lot of
03:05art decisions to get the look right.
03:07You just need to choose which renderer you're going to use. Then stick with
03:11that as you continue to make changes such as changes to the ramp or to the line properties.
03:17So that's the basic introduction to Maya Toon and using that with Maya Hardware 2.0.
03:22That's the end of our chapter on Maya Toon, and actually that's the end
03:28of our course on Creating Shader Networks in Maya.
Collapse this transcript
Conclusion
Goodbye
00:00That wraps up our course in Creating Shader Networks in Maya and mental ray.
00:05As we've seen, Maya provides a comprehensive set of tools for nearly infinite
00:09customization of materials and maps.
00:12That's a major reason why Maya has been almost universally adopted for 3D
00:16digital content creation in the media and entertainment industries.
00:20With the knowledge demonstrated in this course, a talented artist or designer can
00:24achieve almost any desired shading effect.
00:27I hope this course has provided you with the skills you need to create a wide variety of materials.
00:32Thanks for watching and goodbye.
Collapse this transcript


Suggested courses to watch next:


Maya Essentials 6: Lights and Rendering (1h 52m)
George Maestri


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

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

bookmark this course

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

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

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

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

get started learn more

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

Get access to all lynda.com videos

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

Get access to all lynda.com videos

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

Access to lynda.com videos

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

You don't have access to this video.

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

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

How to access this video.

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

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

learn more upgrade

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

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

You don't have access to this video.

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

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

Need help accessing this video?

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

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

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


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

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

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

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

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

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

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

   
submit Lightbox submit clicked