navigate site menu

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

Maya Essentials 6: Lights and Rendering

Maya Essentials 6: Lights and Rendering

with George Maestri

 


This installment of Maya Essentials covers the basics of rendering and lighting tools in Autodesk Maya. Author George Maestri goes over the standard renderers and lighting types, and then goes into features such as render layers and advanced lighting. In particular, the course shows how to manipulate lights, add depth of field, and create bokeh effects and reflections—giving your scene just the atmosphere and drama you want.
Topics include:
  • Adjusting the Render Settings menu
  • Adding depth map and raytrace shadows
  • Understanding the principle of light decay
  • Creating cameras
  • Using Motion Blur in Maya and mental ray
  • Using Final Gather for natural illumination
  • Rendering transparent materials with caustics
  • Batching rendering

show more

author
George Maestri
subject
3D + Animation, Rendering, Lighting
software
Maya 2013
level
Beginner
duration
1h 52m
released
Jul 09, 2012

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:04Hi! I am George Maestri and welcome to Maya Essentials 6 Lights and Rendering.
00:10In this course, we're first going to go over the Render Settings menu and also
00:14show you some of the differences between the Maya Software renderer and mental ray.
00:19Then we're going to go through some lights and lighting.
00:23We're going to understand light types as well as things such as shadows and light decay.
00:29After that we're going to go through cameras.
00:32We're going to create some cameras.
00:33We're going to add depth of field and also do some motion blur.
00:39And finally, we're going to go a little bit deeper into mental ray and show you some
00:43of the advanced lighting features of that renderer.
00:47We're going to use Final Gather for natural lighting, we're going to turn
00:51objects into light sources, and we're going to render some transparent
00:56materials with caustics.
00:58Let's go ahead and get started with Maya Essentials 6 Lights and Rendering.
Collapse this transcript
Using the exercise files
00:00If you're lynda.com Premium subscriber you'll get the exercise files for download.
00:06Now if you want to follow along with the exercise files, go ahead and unzip the
00:11folder and place it on your desktop and inside this Exercise Files folder you'll
00:18find one folder for each chapter.
00:21At the beginning of the chapter go ahead and set this folder as your project and
00:27everything should line up.
Collapse this transcript
1. Maya Rendering
Exploring the Render Settings window
00:00Let's first take a look at the Render Settings window.
00:03This is kind of the Grand Central Station of rendering.
00:06All of your rendering parameters are included in this window.
00:11So we can get to it in one of two places.
00:14We can go to Window > Rendering Editors > Render Settings or you can press this
00:20little icon here and that's usually how I get into the window.
00:25Now once we're in the Render Settings window, you'll see that we have two
00:29options up here, which layer are we rendering and we'll get into the
00:34Render Layers in a bit.
00:35We can also choose which renderer we're using.
00:39So this is a pulldown list of all the different renderers.
00:42We're going to stick with Maya Software for now, which is the default, and down
00:47here we're going to have a number of different tabs.
00:49Now this may change depending upon which renderer you have selected.
00:54So for example, if I select the Maya Hardware renderer, this will change.
00:58If I select mental ray, it will change again.
01:00So each renderer has its own set of tabs.
01:04But every single renderer has this common tab and we're going to go through that right now.
01:10Now these are the attributes that are common to all of the renderers.
01:15First thing that we're going to have is Color Management and do you want to
01:20manage colors or not.
01:21I'm going to go ahead and minimize that.
01:23The next one is very important, it's File Output.
01:27So basically what is our file name?
01:30When we render to a file are we rendering to an image file or a movie?
01:36In this case, we can give this file a file name.
01:38So if we want we can type in the name.
01:42If we don't, it's going to use the same name.
01:44So if want we can type something like file name.
01:47Next, we can pick an image format and we have a whole bunch of different image
01:52formats that we can use, everything from the Maya IFF, which is the default, to
01:56JPEGs, to Targas, to TIFFs, whatever.
01:59So let's say we wanted to render to a TIFF, we can render to TIFF or TIFF16.
02:05This entry here is very important. It determines whether we're animating single
02:09frames or animation.
02:12So if we just do name. extension it'll only render one frame.
02:17If we pick any one of these other ones, it will render multiple frames.
02:23So for example, if we wanted to do name_ number and the extension, you can see up
02:29here this is what the actual file names will be.
02:32So it will be file nameA_1 to file nameA_10.
02:38Now we also have what's called frame padding, and this is how many leading zeros we have.
02:44So if want we can bring that up and as you notice if I bring it up to the 3,
02:48it'll bring it up to three digits.
02:50So I can have from 0 to 999.
02:54If we want we can use a custom extension.
02:57Typically, I won't do that, because the .tiff or .jpg is what we want. We can
03:02also have our Frame Range.
03:04So what's the start and end frame of our animation.
03:08So if we want to go from 1 to 10 that's great.
03:11If we want to go from 1 to 100, that's fine too, and this will all be reflected up here.
03:16So make sure you look up here to see what your file names are going to be.
03:20Now Maya typically renders out single image files, and this is usually best,
03:26because single image files are better for network rendering and also if the
03:30renderer happens to crash in the middle of a rendered, you don't lose the entire render.
03:34Now we can also render incremental frames.
03:38So typically it does by one, but if we want we can do every other frame, or we
03:43can do say every fourth or fifth frame.
03:46It doesn't really matter.
03:47We can also renumber frames if we want.
03:50Now this next one is very important as well.
03:53It's the Renderable Cameras.
03:56So in other words, which camera in this scene are we going to render and we'll
04:02get into cameras in little bit, but just remember that this is here, and we also
04:06have Image Size, which again, is very important.
04:09So we have a number of presets for all of the standard formats.
04:13It defaults to 640x480.
04:16But if we want we can do HD, we can do PAL, we can do all sorts of image file formats.
04:23We can also do print formats.
04:25So if we wanted to we can do HD 1080, which is 1920x1080.
04:30We can also give it a pixel aspect ratio.
04:34So if we wanted to do a D1 format, for example, we would bring the pixel aspect
04:40ratio down to .9 and of course the device aspect ratio, and then we also have
04:46Render Options and this may change according to the different type of renderers.
04:51This one here called Enable Default Light can be important if you are using
04:56global illumination and that sort of stuff,
04:59and we'll get to that as we need it.
05:01Then once we get through and set all of our common parameters then you can go
05:05over to each individual renderers parameters and we'll do that in the next
05:11few lessons.
Collapse this transcript
Touring the Maya Software renderer settings
00:00By default, Maya uses the Maya Software renderer and this is a pretty good renderer.
00:05It can be used for a lot of different things.
00:07So let's take a look at the render settings for this.
00:11I'm going to go into my Render Settings window.
00:14I'm going to make sure that my Maya Software renderer is set as the renderer, and
00:20when I do that, you'll see a tab come up for Maya Software.
00:25Now the Maya Software renderer has a couple of different tabs that we can use to
00:29determine the render quality and how it renders.
00:33Now by default, we actually only have low quality anti-aliasing and the Quality
00:39is called Custom, but we have a preset here for a basic quality settings.
00:44So typically when you're doing test renders you may want to do something such
00:48as Preview quality, which just gives enough quality to see how it's going to
00:53render without taking a lot of render time, but we can also go up to
00:58Intermediate or Production quality.
01:00It typically will set this at Production quality for the final render and this
01:06will also set what's called the edge anti-aliasing to the Highest quality.
01:11It'll set the number of samples up.
01:13In other words, it'll start to boost up the parameters and the attributes so
01:18that way we render high-quality images.
01:21Of course, this will take longer which is why sometimes we will want to bring it
01:26down to Preview quality just to get a fast render.
01:29But once we've set this you can go through some of these.
01:32One is Number of Samples and this is for anti-aliasing.
01:35We also have pixel filtering, again this is for anti-aliasing and we have a
01:40number of different types of filters that we can use, and this is just to prevent
01:45jaggies on the edges.
01:46So you can experiment with these to see what sort of filtering you want and then
01:52we also have Contrast Threshold.
01:55Now if we go down further we can do Field Options.
01:58Now typically, people aren't rendering with fields too much anymore.
02:02But if we want we can do Interlaced, Odd, or Even fields as well, and so you have that option.
02:10Then down here we have Raytracing Quality.
02:13Now by default, Raytracing is turned off, which means you will not get
02:18reflections or any sort of sophisticated transparent shadows or anything like that.
02:25By default once you turn this on however you'll get Raytraced Reflections,
02:30Refractions, and Shadows.
02:33So if you have something that's reflective and it's not going, make sure that
02:37you turn this on in the Maya Software renderer.
02:40Now down here we have Motion Blur which we will get to in a bit, as well as
02:46additional render options such as fog and that sort of thing.
02:51So these are some of the basic options of the Maya Software renderer.
02:55Typically, for me probably the most important one is to make sure you set your
03:00quality to production quality and also turn Raytracing on.
Collapse this transcript
Looking at the mental ray renderer settings
00:00If you want super high quality rendering you're probably going to want to
00:04render in mental ray, which is a much more sophisticated renderer than the Maya Software renderer.
00:11If you doing anything that's photorealistic you'll probably be using mental ray.
00:16So let's take a look at some of the mental ray render settings.
00:19If you do choose to use mental ray you need to make sure that the plug-in is installed.
00:26I've already installed it, but let me show you where we'd set this up.
00:30We go to Settings/Preferences > Plug-in Manager and then we scroll down to the
00:37bottom here and we have Mayatomr and you will want to make sure that that's
00:44loaded, and if you plan to use mental ray a lot, just go ahead and check Auto
00:48load and that way mental ray will always load when you start Maya.
00:53Now it does take a little bit of memory to load the plug-in, but if you're using
00:58mental ray a lot, it's not that big of a deal.
01:01So now that we're sure that mental ray is loaded, let's go into our Render
01:05Settings menu and let's set our renderer to mental ray, and when I do that notice
01:11how all the tabs change.
01:14Well, the Common tab does not change and that's basically the same for any renderer.
01:20But in mental ray we have a number of different tabs, one is for the Render
01:25Passes which we'll get to.
01:27The next one is for Features.
01:29Now what do we want to turn on in this renderer?
01:33Do we want to use a Scanline, the Rasterizer or the Raytracing, which is by default?
01:40Do we want to use Global Illumination or Caustics which are what are
01:43called indirect lighting?
01:45Do we want to use Final Gather, which gives a much smoother sort of lighting?
01:49Do we want to use Ambient Occlusion which again gives a much more natural type of lighting?
01:55We'll be getting into some of these here and also extra features.
02:00Do we want to use things such as Lens Shaders for depth of field and so on?
02:05Do we want to render fur and hair?
02:08Now this one here is Quality and this is very similar to what we had for the
02:13Maya Software renderer.
02:15We have a preset for any number of different types of quality.
02:21Do we want draft, which basically allows you to render fast, but you don't
02:26get all the detail?
02:29Do you want to do what's called a Preview, which again just changes a few things?
02:35And if we scroll down here we have what it called the Production presets and
02:39those bring it up to the highest quality, but also the longer render times.
02:44So we have just a basic production quality.
02:47We also have production quality that turns on Motion Blur, that does Rapid Fur
02:52and Hair, and so on.
02:53So typically I turn on either Production or Production Motion Blur depending
02:59upon what type of rendering I'm doing.
03:01Now we also have what's called Indirect Lighting and that's where mental ray
03:06automatically calculates things such as bounce lighting, caustics, sophisticated
03:12reflections and so on.
03:13Now we're not going to get too deep into this in this course, but we do have
03:20other courses in the library that go through this in very deep detail, and
03:26then finally we have Options and again, these are just basic metal ray
03:30overrides, and so on.
03:32Now typically, for me, I tend to stick to Quality and Features just to turn on and
03:39off the features that I want and to set my quality, and then if I do turn on a
03:44features such as Global Illumination or Caustics, or any one of those, then I do
03:50go over to my indirect lighting which allows me to turn these on and off and set
03:56the parameters for those.
03:59So those are some of the basics of the mental ray renderer.
04:02Now make sure you turn on the mental ray plug-in and make sure you also turn
04:07your quality to Production for the best quality renders.
Collapse this transcript
2. Lights and Lighting Types in Maya
Exploring light types
00:00Let's take a look at the different types of lights that are available in Maya.
00:05Now we can create lights using the Create menu, we have Create > Lights and we
00:12have a number of basic types of lights here that we can create.
00:16We can create an Ambient, Directional, Point, Spot, Area and a Volume Light.
00:23Now you can get to these through this menu or if you want you can go to the
00:28Rendering shelf and all of these lights will be right here.
00:32So let's take a look at some of the basic types of lights in Maya.
00:36We are going to start off with the Spot light which is right there, so we can do
00:42either select this button here or do Create > Lights > Spot Light.
00:47Regardless, you will see that a little light comes up here, when I press my Move
00:51button here, you'll see that I've got a light, and you can see that it's also
00:56kind of cone shaped like a spot light.
00:59Now probably the easiest way to see lights in Maya is to turn on lighting in the viewport.
01:06We want to use All Lights, which is also is a shortcut of 7, and once I do that
01:11you'll start to see that this light does illuminate.
01:15So as you can see, as I move this back, it illuminates, and if I rotate this, it
01:21also illuminates and I can also move this up or down.
01:25Now if I really want to see the effects of light I should turn on Viewport 2.0,
01:30which will give me a much better rendering of this light.
01:34So if I zoom out here, you can see that the light basically casts a cone, like a
01:40spotlight in the movie theater.
01:43So if I want I can rotate this or move it around to create the illumination that I want.
01:49Now if I want to add additional control over this light, I can go over to the
01:55Attribute editor, and you'll see that in the spot light we have a number of
02:00Spot Light Attributes.
02:01One of which is Color, so if I click here you can actually use the Color Picker
02:06and to pick any sort of color you want from the light. I am going to go ahead
02:09and put that back to white here.
02:13We also have Intensity, how bright or dim is this light.
02:15And then we can also Emit Diffuse which is basically your Diffuse Channel or
02:22we can Emit Specular.
02:24Now notice the little highlight here on the sphere.
02:28This turns on and off that Specular Highlight.
02:32We can also add in a Decay Rate, which we will get into in a little bit.
02:37We also have for a spot light, Cone Angle, which is how much of this is
02:42illuminated, as well as Penumbra Angle, and how sharp is that edge, is it blurry
02:49or is it very sharp?
02:50And the number of zero, means exactly sharp, positive numbers means it blurs to
02:56the outside edge, negative numbers means that it blurs to the inside edge.
03:01We also have a drop off which is another type of Penumbra, but basically it
03:06falls off that intensity of the light from the center.
03:10Now if we go up here, you can see under the Spot Light Attributes it
03:15actually has a Type.
03:16Now we can actually switch the type of light here, so if don't want a spot
03:23light, I can change it to any other type of light.
03:26So let's change this to a Point Light and this will be just the same as me
03:31creating the Point Light from the menu, but it's a little bit easier.
03:34Now a point light is basically the bare light bulb in the room.
03:40So I can position that however I want and as you can see it's just a light where
03:47the light illuminates in all directions from a specific point, which is why it's
03:53called the point light.
03:54Now this has a number of parameters here, such as Color and Intensity, but since
04:01this isn't a spot light, it will not have the Cone Angle or the Penumbra.
04:05Now another very important type of light is the Directional Light.
04:10Now this is kind of like a spot light, in that it has a direction, but notice
04:16how the position of this light does not affect the scene at all, and also notice
04:22how the scene is evenly illuminated by this light.
04:26Now this probably the best type of light for stuff like sunlight.
04:30It's also a great way to do very even illumination and if I rotate it, you
04:35can see how these shadows on the sphere tend to change.
04:40Now this light is strictly directional, it's not location specific.
04:46Now one thing you may notice about this light is that shadows, particularly
04:50depth map shadows may not work.
04:53So be careful with shadows and directional lights.
04:56I am going to go ahead and turn this vertical here.
04:59Now let's take a look at the Area Light.
05:03The area light emits light from an area defined by this square.
05:09So in some ways it can be almost like a soft box in photography.
05:13Now I do have an Intensity value for this light, but another way to increase the
05:21intensity of the light is to scale it up.
05:24In other words make it bigger.
05:25So if hit my R key and go into my Scale tool, as I make this area light bigger,
05:32it's actually is creating a sharper illumination.
05:38So as this light gets closer to objects, it will illuminate them more.
05:44It's also directional, but remember that you have Intensity, but you also have
05:50the actual size of the icon that can determine the type of light.
05:56Finally, we have one more type of light that I want to show you and that's
05:59called Ambient Light.
06:01That's the bounce lighting in the room.
06:04So if you don't want your scene to have completely black shadows, you want a
06:10general wash of light, you can use the ambient light.
06:13So for example, this here adds a general illumination to the scene.
06:18Now ambient light works best with other lights, so for example, if I were to
06:25create a Directional Light here, you can see how I can still have shading on
06:33this light, but it never goes completely dark because I have some ambient light in the room.
06:40So if I select my Ambient Light and turn it down, you can see how this shadow
06:44goes very, very dark, but the ambient light can increase that overall light
06:50level in the room, so that way you don't get completely black shadows.
06:55So those are some of the basic types of lighting in Maya.
06:59Each light has its own specific way of working and its own purpose.
07:05So just be aware of each type of light as you start to light a scene in Maya.
Collapse this transcript
Manipulating lights
00:00Now when you start creating lights, you are going to want to move them around in
00:04the scene and place them so that they illuminate exactly what you want.
00:09So typically, we want to have precise control over our lighting.
00:14Now we can manipulate our lights simply thorough the Move tools.
00:18So if I go to my Rendering shelf here and click on Spot Light, I can create a
00:24spot light. I can move that up and if I turn on Use All Lights and Viewport
00:322.0, I should be able to pretty much see how this light is illuminating the
00:37scene, and if I want I can position this light to say, illuminate this sphere, if I want.
00:44But as you can see, it's kind of a trial and error sort of thing.
00:49I'm not getting exact precise control or even if I am getting precise control,
00:55it's not very interactive.
00:57So there are couples of ways to make this more interactive.
01:01One is to use what's called the Manipulator tool; this little button here on the
01:07side of the interface.
01:08So if I show Manipulator tool, it will actually bring up some additional handles
01:13that allow me to control this light more interactively.
01:17So now I have a light target.
01:21So here's my spot light up here, but down here I have a target onto which
01:26this light is pointing.
01:28So if I want I can position this target right in the center of the sphere and
01:34then grab the Move tool up here, and no matter where I move this light, it's
01:39always going to be illuminating or pointing at that sphere.
01:44So this is one way of getting more precise in interactive control.
01:48Now in addition to these two handles, we have this little clocklike icon here
01:55off to the side of the light.
01:57Now each one of these will control a different aspect of the lights attributes.
02:04So if I click on the Attribute Editor here, you can see that when I click on
02:08this little clock, we get this one here and that's going to be the light range.
02:13If you go down to about 4 o'clock on this, you will see that you actually get a
02:18control that controls the Cone Angle of the light.
02:21So I can interactively set the Cone Angle, just by grabbing this ring or the
02:27yellow manipulator, I can change that Cone Angle.
02:31And if I change it here in my Attribute Editor, you can see how that reflects it.
02:36So I am going to actually make this a fairly narrow Cone Angle, because if I
02:40click this so that it straight down at 6 o'clock, I get another manipulator.
02:44So if I grab this little blue icon here, I can change my Penumbra Angle.
02:49Okay, so if I change it here, you can see how it moves here or I can change
02:56it here to affect it.
02:59And again, I am going to go ahead and dial this down a bit.
03:03Then we also have some other controls here which we are not going to get into.
03:07This is render regions, this again is just some more sophisticated lighting but
03:11for right now probably the ones that you want to understand is Penumbra Angle
03:16and Cone Angle which are these two.
03:19So this is one way of affecting your light.
03:23Now another way to control your light is to simply look through it in a Viewport.
03:29So I am actually going to hit my spacebar here and go into a multi-view mode
03:35here, and I am just going to select a Viewport.
03:38In this case, I am going to select my top view, I am actually going to drag this
03:43down a little bit so we can see it, and then under Panels, I am going to select
03:48Look Through Selected.
03:50Now I have my light selected, so I am going to look through my light, and now I
03:56can see exactly what the light sees.
03:59So I am using the light almost kind of as a camera.
04:02So if I smooth shade these, do use all lights and turn on Viewport 2.0, you can
04:08see how I can change how my light works.
04:14So I can create what are called barn doors.
04:17I can hold down my Alt key and just move the light just like I would move a
04:22camera. So if I don't want it centered on the sphere, I don't have to.
04:26Let's say I just want to illuminate the edge of that, if I want to keep this
04:30sphere front center, I can do that as well.
04:32Now these two circles here show my Penumbra and Cone Angle.
04:38So if I go into my Attribute Editor, you can see how as I increase or decrease
04:43that, you can see how that affects it, and once I am done positioning the light,
04:48if I want I can take this panel and just put it back to a top view.
04:53So there's two additional ways of manipulating lights.
04:58You can use the Manipulator tool in the toolbox, or if you want, you can use a
05:04Viewport to look directly through the light.
Collapse this transcript
Adding depth map shadows
00:00In the real world, all lights cast shadows.
00:03In Maya, you have to specify if a light cast shadows and how it will cast them.
00:11So let's take a look at the simplest type of shadows and those are called depth map shadows.
00:16I have a simple scene here with an airplane on a flat field and I also have a
00:23spot light that's illuminating it.
00:25So if I want I can move the spot light to adjust it or use the Manipulator if I want.
00:31But really what we want to do is take a look at this light from the Attribute Editor.
00:37So I want to make sure I select the light, go into the Attribute Editor and
00:43let's go ahead and add some shadows to this.
00:46So I am going to go down from Spot Light Attributes until I find Shadows.
00:51Then I am going to go ahead and open up the Shadows rollout, and then we have two
00:57options here: one is Ray Trace, the other is Depth Map, which is the top one.
01:04So if we want this to have Depth Map Shadows, I can just go ahead and
01:08collect this to turn it on.
01:11Now I am not seeing shadows in the Viewport.
01:13If I want to, if want to make sure that I have Viewport 2.0 turned on, Use All
01:19Lights and make sure I have Shadows turned on.
01:23Now once I have that turned on, you can see pretty accurately how the shadow is
01:29being cast on this object.
01:32Now we have a number of options here for depth map shadows.
01:37The first one is the resolution of the shadow.
01:41depth map shadows work by creating a bit map of the shadow and laying it over the image.
01:48So this number here is the Resolution of that bitmap.
01:53Now this number may need to change upwards if you are rending large high quality images.
02:01So this is a specific number, so if you are rendering larger images, you need to
02:07have a larger number.
02:09But right now we are just rendering 640x480, so let's just take a look at how this works.
02:15So this will determine the granularity of the shadow.
02:19So a lower number, let's bring this to down to say 64, will make this very, very blocky.
02:27Now what this does is it creates a 64x64 pixel-wide bitmap to cover the entire
02:34area that this light is illuminating and obviously this is not enough.
02:39Now if we want we can bring it up.
02:42So let's say I will bring it up to 128, you will see that I get more coverage.
02:47If I bring it up really high, let's say bring it up to 2000, in fact, I am going
02:51to bring up to 2048, I typically use powers of two for this.
02:55You can see how it gets very, very sharp.
03:00So if you want very sharp shadows, a larger Resolution Depth Map will help.
03:07But if we want say fuzzy or kind of not so sharp shadows, you can actually use
03:13these lower values to your advantage.
03:16So I am going to bring this back down to 128.
03:19Now as it stands here, this is going to be too jagged for us to actually use it.
03:27But we have some additional parameters here.
03:30So if I scroll down, we have one here called Filter Size and what this does is
03:37it blurs the edge of the shadow.
03:39So when the filter is at 0 or 1, you are pretty much getting the edge of that
03:46bitmap that you're seeing, but as it goes up, let's say it goes up to 2, or 3,
03:52or 4, you will see how it's actually adding enough blur so that you are really
03:57not noticing the edge of that shadow.
04:00Now I am doing all of this in the Viewport, so you can see how it works
04:04interactively, but if I were to render this, let's say we render this with a
04:10Filter size of 0, I am just going to do quick render right here.
04:13You will see that's pretty much what we had.
04:17Now if I bring the Filter Size up and do a quick render, you'll see I get a
04:22much softer shadow.
04:27So we have two attributes here that need to be balanced.
04:30One is the Resolution of the bitmap;
04:33the other is the Filter which determines the blurring.
04:37So higher numbers in the bitmap make for a sharper shadow.
04:42Higher Filter Sizes, blur that to soften the edges of that.
04:48But it only softens the edges between the pixels.
04:51So if you have a really sharp shadow, Filter Size isn't going to blur it.
04:55Now in addition to this, we have a couple of other parameters here and probably
05:00the most important one is Bias.
05:02Now what this does is it actually offsets the shadow from the object.
05:08Now remember how depth map shadows work.
05:11We take a bitmap that's the size of the light and use that to create the shadow
05:18and then that's projected over the image.
05:22So this Bias basically offsets that just a little bit, so that way you don't get
05:28self-shadowing, or you don't get that shadow overlapping on your object.
05:33So if you're getting a little bit of shadow error, you can always increase this Bias.
05:38So as I bring this Bias up if you notice here, the propeller, it kind of goes away.
05:44So what it's really doing is it's pushing the shadow back or forward
05:49depending on this Bias.
05:50So typically we want to keep this at a fairly low number.
05:55So those are some of the basics of how to do depth map shadows and this is
06:00probably the easiest and also fastest to render shadow that you have in
06:06your toolkit.
Collapse this transcript
Using raytrace shadows
00:00The second type of shadow that we have in Maya is called raytrace shadows.
00:05Now the big difference between these and depth map shadows is that raytrace
00:09shadows will account for transparency when it does shadows.
00:15So a good example is this glass-topped table.
00:19So if I have this in the scene and just do a quick render with no shadows, you
00:23will see that I have a semitransparent tabletop.
00:28Now if I go over to the Attribute Editor and select my light, let's go into
00:35the Shadow parameters.
00:37Now under Shadows we have Shadow Color, we are going to leave that at black, and
00:41then click on Use Depth Map Shadows, just so that we can see what happens when
00:47we render a depth map shadow for this table.
00:52Now using depth map shadows we get a shadow for the table and we get a shadow
00:58for the glass, but we don't get transparency.
01:02So it sees glass and other transparent materials as solid.
01:08So I am going to go ahead and turn this off and scroll down just a little bit
01:13further until we get to raytrace shadows.
01:16Now I am going to go ahead and turn these on, but before I do any sort of
01:21rendering I am going to go into my Render Settings window, go over to the Maya
01:27Software tab and scroll down until I find Raytracing Quality, and I want to make
01:34sure that Raytracing is turned on.
01:38Now by default it is not turned on in Maya.
01:41So just make sure that it is turned on for the scene and then once we do that
01:46and raytrace shadows is turned on, let's do a quick render.
01:51Now you can see that the glass is actually casting a shadow on the ground.
01:57Now in addition to handling transparency, raytrace shadows are more accurate.
02:03They will give you a sharper edge shadow typically.
02:08Now if we want we can get soft shadows in a raytrace shadow, and we do this by
02:14increasing the Light Radius.
02:17So let's go and increase the Light Radius to say 3, and we can increase the
02:22number of Shadow Rays.
02:24So how raytracing works is that it beams a number of rays towards the object
02:32and then uses those to create the raytracing, so the more rays we have the more accurate it is.
02:40So if I have a large Light Radius then I should bring up the number of Shadow Rays.
02:44Let's go ahead and bring it up to 16.
02:48Now we also have a Ray Depth Limit and that's for rendering shadows in
02:53reflections and that sort of thing.
02:55So for soft shadows you want to a higher Light Radius and the larger number of Shadow Rays.
03:01Now when I go to render this you will see that it takes longer to render.
03:06That's because each ray needs more processing power.
03:10So as you can see, with a larger Light Radius and more Shadow Rays, I am getting a softer edge.
03:20So typically raytrace shadows are sharper.
03:23They will render transparency, but the downside is that they do take longer to render.
03:32I like to use them only if I have reflective or transparent materials in the scene.
Collapse this transcript
Understanding light decay
00:00In the real world, the laws of physics determine how a light falls off, and that
00:06would be with the square of the distance.
00:08So that means the further you are away from a light, the less light you get
00:14in any specific area.
00:15So obviously the headlights on your car only illuminate so far out before
00:21they're too dim to see anything.
00:23Now in Maya, lights are actually constant.
00:27So for example, this light here, if I were to render this scene you'll see that
00:33the front cylinder is pretty much as bright as the last cylinder.
00:39So this light is not decaying.
00:42We can however add in a more realistic light decay.
00:48We can do that in the Attribute Editor.
00:50So I select my spot light and go into the Spotlight Attributes, and under Decay
00:57Rate you will see right now it has no decay.
01:01So in other words, this light will illuminate something 10 feet away just as
01:06much as it will illuminate something that's 1000 feet away.
01:09But we can change that by changing how this light decays.
01:13Now we have three options here.
01:16We have Linear, which falls off in a Linear fashion, Quadratic, which falls
01:23off with the square of the distance, which is realistic lighting or physically correct.
01:29And we also have Cubic which falls off with the cube of the distance.
01:33So this is beyond reality.
01:35This falls off faster than reality.
01:37So basically we have no decay, slower than reality, reality, and something that
01:43falls off faster than reality.
01:46So let's take a look at how these work.
01:48If I just select this to make sure I have Viewport 2.0 on here, you can see that
01:54when I select my Decay Rate as Linear everything goes black.
01:58So if I were to render this, well, actually we are not going to see much at all.
02:03Now this is because the intensity of the light is low.
02:08As we increase the falloff we have to increase the brightness of the light.
02:14So now the intensity of the light needs to come up.
02:18So if I bring this up to 10, you can see now I am getting some illumination.
02:24And if I were to render this, you can see how the last cylinder is illuminated
02:31less than the one in the front, and you can also just see this in the light and
02:36how it falls onto the floor.
02:38Now if we were to increase this to Quadratic, again the light goes down.
02:45And that's because the light is decaying more quickly.
02:49So we have to increase our intensity, but by default this doesn't go above 10.
02:55Well, let me show you a little secret here.
02:58You can always type in a number larger than the slider.
03:02So if I type in 100, you can see that the slider just goes back to a middle one
03:08here, and I can bring it up to 200 or let's say I want to bring it up to say 400,
03:12and this will give me anywhere from 0 to 800 now.
03:17So let's bring it up to somewhere around 400 and now let's do a quick render.
03:22As you can see we've got almost a hotspot here at the front, because we've got a
03:27very intense light, but it falls off almost to darkness by the last cylinder,
03:34and again, this is just basically falling off more quickly than it did before.
03:40Now with Cubic, again, we are going to get the same thing.
03:43We are increasing the decay of the light and again the light goes dark.
03:47Well, let's go ahead and type in a 1000 for this Intensity and you can see that
03:52even at a 1000 this isn't quite enough.
03:55So let's go ahead and type in 4000, and as you can see even that might not be
04:01enough, because really this light is falling off even more quickly.
04:06So if I do a quick render, again, you will I have a hotspot here which is
04:10almost the same as with the previous light, but as you can see it decays much more quickly.
04:17So I am going to go ahead and put this back to Quadratic and dial this back down
04:21to about 300 or 400 right in that range.
04:23And let's go ahead and change the light to a Point Light.
04:27Now we've been using Spot Lights for a while here, but if I change it to Point
04:31Light I can again change my decay.
04:35So I am going to change my Decay to Quadratic and keep it at a Point Light.
04:40Now if I select this light and move it, you can see how I'm getting a nice
04:47hotspot right there where it's close to these, but as it falls off it gets a lot darker.
04:54So one of the things you can do and this is actually a really nice trick is just
04:59to put a point light in the room with some decay and that will give you just a
05:03nice general wash of light, so you can see how that works.
05:09By default lights in Maya have no decay.
05:12So they will illuminate things evenly regardless of how far away those
05:17things are from the light.
05:19If we want we can add decay, we can have Linear, Quadratic, or Cubic, and each
05:25one of those falls off a little bit faster.
05:29So as the light falls off faster and faster, we need to amp up the intensity of
05:35the light to compensate.
Collapse this transcript
3. Understanding Cameras
Creating cameras
00:00Once we have lights in the scene all we need is a camera and then we can
00:04actually do some rendering.
00:05So let's take a look at how to create cameras in Maya.
00:09We actually do have a basic camera in the scene.
00:13By default the Perspective window is a camera.
00:17So if I take a look at this, I can actually move this around and it does
00:21work like a camera, and if I wanted to, I could go into Render current frame
00:26and I would get a render.
00:28So this does act as a camera.
00:31But if I want more control over the camera then I should create one in Maya.
00:35Now we have a couple of ways of creating a camera.
00:40We can go to our Rendering shelf here and there is a Camera button, or if we
00:46want to get a little more sophisticated we can go to Create menu and under
00:50Cameras we have a couple of different options.
00:52We have Camera, Camera and Aim, Camera, Aim, and Up.
00:57We also have two types of Stereo Cameras for those who are doing 3D stereoscopic
01:03rendering, and we are not going to get into that in this course.
01:06So let's just take a look at the basic camera.
01:09So we are going to go ahead and create a camera, and when we do you will notice
01:13this little icon kind of shows up at the origin and lo and behold it looks like
01:18a little movie camera, and that tells us it's a camera.
01:21So if we want we can move the camera anywhere in the scene.
01:25So all we have to do is select our Move tool and I can move this up and
01:29around wherever I want.
01:31If I want to point this camera at the chair, notice how the lens here is on the right side.
01:38So I need to point that lens at the chair so I can just rotate that around if I
01:45want, and I can move it into place.
01:47Now I'm not really seeing what's going on with this camera here.
01:52So actually I am going to hop out to a quad view.
01:55I am going to hit my Spacebar here, and that's going to bring me into a quad
01:59view, and under the top view let's go into Panels and under Perspective I am
02:04going to change it to camera1.
02:07Now this sees what the camera is seeing.
02:09In fact, if I wanted to I could turn on Shading as well as Hardware
02:14Texturing and I can see that.
02:16So as I move my camera back, as I rotate my camera, I can actually move it
02:23around, and see what the camera is seeing.
02:27Another way to manipulate the camera is to just move the Viewport.
02:32I can rotate, and notice how the camera is also rotating.
02:36If I middle-click I can pan and notice how the camera is panning as well.
02:42If I right-click I can zoom in and out or actually I'm trucking.
02:49In the words, I am actually moving the camera in and out, I am not actually
02:53doing a technical zoom and I can also right-click and use my middle-mouse button
02:57to move the camera in and out as well.
03:00Now another way to manipulate this camera is to use these other options.
03:05We have Camera, Camera and Aim, Camera, Aim, and Up.
03:09Now we can create these from scratch or we can modify our camera to have these
03:14additional controls, and let's do that.
03:17So I am going to go ahead and make sure my camera is selected and let's go over
03:21to the Attribute Editor.
03:22We are not going get in all these attributes here, but at the top you'll see
03:27that we have one here called Controls.
03:30And if you pull that down you will see, oh gosh, those are the exact same options.
03:34Those are Camera and Aim, Camera, Aim, and Up.
03:37So let's take a look at what Camera and Aim looks like.
03:40I'm going to go ahead and select that and when I do it adds in an additional
03:45control and you can see that here, this little target spot.
03:49So if I select that, you can see how I can move that so that it is exactly where
03:55I want in the scene.
03:57So let me go ahead and zoom in here in my side view here, and if I want to I
04:01could place that, say in the center of the chair.
04:04So now I'm always aiming at the center of the chair.
04:09So whenever I move this camera it's always pointing at whatever is on the seat of the chair.
04:15So if I move it in and out, if I move it left and right, no matter what, it's
04:20always going to keep that center of the chair centered in the Viewport.
04:25Now this is a great way to aim cameras at very specific objects.
04:29You can also animate that target so that the camera can follow an object through a scene.
04:34Now the other control that we have is called Camera, Aim, and Up.
04:40So let's go ahead and select that and you'll notice that a little tiny dot comes
04:45up on top of this camera here. So this is the Up.
04:49Up controls, where up is on the camera.
04:52So if I zoom in here on my Perspective view you can see that if I move this left
04:59and right, it's basically a camera tilt control.
05:02So it allows me to control where that up is on the camera.
05:06In other words, how the camera is oriented.
05:09So that allows me additional control.
05:13So we've got a basic camera.
05:16If we want to, we can just place that in the scene and aim it however we want.
05:21If we want to aim it at a target, we add Camera and Aim.
05:24If we want to control orientation of the camera, we do Camera, Aim and Up.
05:30So those are some of the basics for adding cameras into Maya.
Collapse this transcript
Understanding camera attributes
00:00Once you have cameras created and placed in the scene, you can further modify
00:05them by affecting the camera attributes.
00:08Now we took a look at a few camera attributes in the last lesson, but let's take
00:12a look at some more.
00:13So I have a camera here in the scene.
00:16It's called camera1 and if I hit my Spacebar and hop out to my four view here,
00:22you see there is the camera right there, kind of in that top right corner of the
00:27top view here, and when I select that, it shows up here and if I want to I can
00:32get to the Attribute Editor, just by clicking on the Attribute Editor.
00:35Now an easier way to get to this is through the Viewport.
00:39So I am going to go ahead and highlight my camera1 Viewport, Spacebar, go into
00:44it, and then deselect everything.
00:47And if I want, I can either select the camera or go directly to the
00:52Camera Attribute Editor.
00:53So let's go ahead and select that.
00:55You can see that, okay, I've got my camera1 Attribute Editor and if I select it,
01:00it adds in that camera position node.
01:03So my Camera Attributes are here.
01:07Now we already took a look at the controls for the camera.
01:10We have Camera, Aim, and Up, and we can select any combination of those if we
01:15want, and in addition to that we have a number of attributes for our camera.
01:20Now probably the most important one is the Focal Length of the camera, which is
01:25also tied to the angle of view.
01:28Focal Length is the same as the size of a 35mm lens.
01:33So in this case we have this as a 35 lens which means an Angle of View of about 54 degrees.
01:39Now if I were to create a longer lens,
01:44so if I were to increase my Focal Length, you will see that the camera zooms in.
01:49My Angle of View gets narrower; these two are connected.
01:53You increase one, you decrease the other.
01:57If I were to bring my Focal Length the other way and zoom out, you can see that
02:03my Angle of View increases.
02:04Now let's hop out to our quad view here and take a look at this camera.
02:09As I increase or decrease my Angle of View and my Focal Length, notice how the
02:16camera doesn't move at all.
02:18This is because we're zooming the lens of the camera.
02:22So it's like if you had a zoom lens on a camera and we were standing in one
02:26place and we were just rotating that lens.
02:28If I were to move this camera in and out, that would create a different effect.
02:35In other words, I am moving the camera closer.
02:37I am doing a truck of the camera to bring it into the scene.
02:42But if I wanted to zoom in a little bit further, then that is basically just
02:47going to change my Angle of View.
02:50Now if I have my camera in really tight, I may want to create a wider angle of view.
02:55Let's go ahead and put a 12 millimeter lens on this.
02:58I am going to type the number 12 into Focal Length and then I'm going to truck
03:03in pretty close to the scene.
03:05Now one of the things you will notice is that when you have shorter Focal
03:09Length, you have a wider Angle of View, which means that you have a much
03:15stronger sense of perspective.
03:18This is almost like a fisheye lens.
03:21Now as this Focal Length gets longer, let's go ahead and bring it up to say 135,
03:26you will see that I've zoomed in, but if I go ahead and pull that camera out, as
03:34I get to about that same spot, you'll see that the scene is a lot flatter.
03:38It's almost orthographic in nature.
03:41So as the Focal Length gets longer, the scene tends to flatten out.
03:48So I am going to go ahead and put this back to about 50 millimeter lens here and then
03:52just go ahead and get this set in my scene.
03:55Now we have a couple of other controls here.
03:59The next most important one is the Clip Plane.
04:02Now this is something you may or may not use.
04:05Now what it does is it only allows the camera to see a specific range of distances.
04:12So you can set a Near distance and a Far distance, anything that's closer or
04:18further away will not render.
04:20So let's just go ahead and play with this.
04:23I am going to go ahead select this bowl in the table and I need to find out how
04:27far away that bowl is.
04:29Well, we've got a little option here under Display > Heads Up Display > Object Details.
04:35So this tells me how far away from the camera it is.
04:38So this is about 82-83 units away from the camera.
04:44So if I select my camera, go into the Attributes, you can see that my Far
04:49Clip Plane right now is set to 10,000, but if I set that to say 83, it clips off
04:56anything beyond the middle of that bowl.
04:59So if we were to set at 90, you can see I am clipping just a little bit less.
05:05If I were to say make it 70, you can see it clip almost everything but the table.
05:11And again, if I bring it up, so let's just bring it up to say 10,000, you pretty
05:15much get the whole scene, because there's nothing that's 10,000 units away.
05:20We can also do that on the other side.
05:22So let's say on our Near Clip Plane, let's type in 75.
05:25You can see that it only renders things beyond 75 units.
05:31And again, typically, we like to just keep this at a small number so that way
05:36things don't get too big in the camera.
05:38Now finally we have some other options here.
05:41We have a Film Back and this is a great way to match your back to a camera on a live-action set.
05:48Then we have a number of other options here such as Depth of Field, Output
05:52Settings, and probably one that you will use is Environment.
05:56So right now we have a default Background Color.
06:00So if I render this you'll see that it renders against black, but I can change
06:05and render against any color.
06:07So let's go ahead and make that a blue and now I'm rendering against this
06:11color which is a blue.
06:13And if we want, we can create an Image Plane and have an image projected behind
06:20the camera as the background color.
06:23So those are some of the basic ways to affect your camera using
06:27camera attributes.
Collapse this transcript
Creating gates and safe frames
00:00Anytime you work with cameras you want to see exactly what's going to be shot
00:05and rendered from that camera.
00:08I've got as seen here that's actually in the Viewport but, I can change the
00:12size and shape of that Viewport. I really want to be able to see exactly what
00:17the camera is seeing.
00:18So we can do that by using gates and we can also add in safe frames to add in
00:23things such as Title and Action safe.
00:26So I have a scene here with a camera called Camera One. So if I'm in the Camera
00:32One Viewport under View, I should have some options here under Camera Settings.
00:38So I've got a number of gates here.
00:40Right now it's set to No Gate but if I set it to Film Gate what it will do is it
00:47will set it to whatever the back of the camera is set to in the attributes.
00:52So we go into View > Camera Attribute Editor you'll see that under Film Back
01:00I've got my Film Aspect Ratio and this will determine the aspect ratio of this gate.
01:08So if I bring this up, you will see it gets wider, if I bring it down, it gets smaller.
01:14So if it's at 1 it's 1:1.
01:171.5 is a 3:2 aspect ratio,
01:21so that will be 640x480 NTSC TV, and so on, okay.
01:26I also have a Squeeze Ratio, so if you're doing something like cinemascope or
01:31any anamorphic stuff you can do that as well.
01:34Now I have another type of gate, and that's called the Resolution Gate.
01:38Now before I get to that, let me show you how that works.
01:41That's based off of the Render Settings.
01:45So if I go into my Render Settings window and you scroll down here, you'll see
01:49that my Image Size right now is 1280x720, so it's a Device Aspect Ratio of
01:561.77 and this is at 1.5 right now.
02:00So this is actually going to be wider.
02:03So if I go to View > Camera Settings > Resolution Gate, it will pick up the
02:09Render Settings and use those for the gate.
02:13So that's a crucial setting.
02:14Once I have this gate I can use it to position my camera, so for example, I've got
02:21this kind of false floor on the set.
02:23And if I don't want the edges of that to show in my render, I can make sure
02:28that I frame my scene, so I don't see it.
02:31Now if I go in to View > Camera Settings, I can also turn off the Gate Mask and
02:37that's this gray area around the mask.
02:41And if I want to, I can turn that back on to again mask that out.
02:47So it's really just how you want to work, I like keeping it on so that way I
02:51very clearly see what's in frame and what's out of frame.
02:55Now in addition to this, we also have some basic options here.
02:59We have a Safe Action and when I click that on it brings in my Safe
03:04Action and Safe Title.
03:08And if I want, I can turn on in a Field Chart which gives you a standard
03:14animation field charts, in other words, it just lays a grid over the scene and
03:18sometimes it's really handy to have this because, at the very least, you know
03:23exactly where the center of your frame is, and if you're doing actual animation
03:29on a light table with the animation disc, you will understand how this works in
03:34an animation context.
03:37So those are some of the basics of how to set gates as well as create safe
03:41frames and field charts.
Collapse this transcript
Adding depth of field
00:00Now let's take a look at depth of field in Maya.
00:04Now if you're familiar with photography, you'll know the depth of field is
00:07basically the region in which your camera is focusing.
00:11You can use depth of field to do creative focusing effects.
00:14You can create an image where some stuff is in focus and other things are not.
00:18And we can do the same thing in Maya.
00:22So we're going to start off by doing it in the Maya Software renderer, but this
00:26will also work for mental ray.
00:27So I am going to go into my Render Settings windows and make sure that I have my
00:32Maya Software renderer selected, and let's go ahead and just do a quick render.
00:37As you can see, everything is in focus.
00:40So if we wanted to do a focus effect, we have to add that to the camera.
00:45So we can do that by going into the camera's Attribute Editor.
00:49So I go into View > Camera Attribute Editor, and there should be an option here
00:54called Depth Of Field.
00:56So if I select that, you'll see we have three options here;
01:00one is Focus Distance and that is how far away from the camera are we focusing.
01:07The next one is F Stop, and if you're familiar with photography, you'll know
01:11that this is how wide the lens is open.
01:13A lower F Stop means more blurring, a higher F Stop means more stuff is in focus.
01:22And then we also have what's called Focus Region Scale and that is basically just a
01:27multiplier that allows you to have more or less things in focus.
01:32So a higher number gives you more stuff in focus, a lower number gives you less
01:37stuff in focus with more blurring.
01:40So now that we understand all of this, let's just go ahead and take a quick
01:44render with these defaults.
01:45So I am going to do a quick Render Current Frame,
01:48and as you can see, well, not much is in focus.
01:50And that's probably because our Focus Distance is set fairly close to the camera.
01:56We only have this set to 5 and these are, I'm assuming, a little bit further away.
02:01So let's go ahead and pick an object to put into focus.
02:04I am going to go ahead and select this middle chair, and we need to figure out
02:08how far away from the camera that chair is.
02:12We can do that using a Heads Up Display.
02:14So if we go into Display > Heads Up Display > Object Details, this will tell you
02:20the distance from the camera.
02:22So in this case, we have 46.893.
02:27Okay, so if I go back into my Camera Attribute Editor, I need to remember this
02:32number, and then just go ahead and put that in as my Focus Distance.
02:36I can type 46, or if I want, I can type 46.893 and get very specific.
02:42It's really not going to matter if you're off by just a little bit here.
02:46So let's go ahead and just leave that at that default, and just put in the Focus Distance.
02:52Now when I do this, you'll see that I am getting a little bit of blurring here
02:58on this, and on the chair in the back, and this middle chair is in focus.
03:04Now if we want, we can change that by adjusting the F Stop.
03:10So remember, lower F Stop means less stuff is in focus, higher F Stop means
03:16more stuff is in focus.
03:18So let's just do an F Stop of 2, which is pretty wide open for a camera and
03:23do one more render.
03:26As you can see, we have a much more enhanced blurring effect.
03:31Now this not only works for Maya Software renderer, it will work for mental ray as well.
03:36In fact, if we want, we can select mental ray, and that's if you have it turned
03:41on in the plug-ins and just do another render.
03:45And right now, I have draft setting, so I am getting a little bit of pixelation
03:49here, but you can see that it's pretty much the same in mental ray.
03:53You are getting pretty much the same blurring that you're getting in the
03:56Maya Software renderer.
03:58Now let's go ahead and take a look at Focus Region Scale.
04:03This controls how much is in focus.
04:07So in this case, we've got basically the front and the back chairs are defocused
04:11and this chair is in focus.
04:14So if I increase this, we'll get more stuff in focus.
04:18So I am going to make this 2, let's switch this over to Maya Software and do another render.
04:24And as you can see, we've got more stuff in focus, in fact if we brought that
04:28up to say 4, that would probably bring almost everything into focus, and there we go.
04:34Now lower numbers means less is in focus.
04:38So by default, it's 1.
04:39So let's go ahead and make it half.
04:42So I am going to bring it down to 0.5 which will bring less things into focus, and there you go.
04:48So this Focus Region Scale can also be used to control how much focus you have.
04:54Now typically, what I try to do is to get it with the F Stop and if I can't
04:59quite get it exact, then I will go to Focus Region Scale.
05:04Now another thing we can do is also again, change Focus Distance.
05:08So if I were to make this say, a lower number, say 30 or something like that,
05:13then you would get the stuff closer to the camera in focus.
05:16So now at 46, this is in focus, at 30, this is in focus.
05:22So as you can see, we have a number of different parameters for creating focus
05:27effects using depth of field.
05:29Remember, use the Heads Up Display to understand how far things are from the
05:34camera, use that as the focus distance, and then use your F Stop to control how
05:40much is in and out of focus.
Collapse this transcript
Creating bokeh in mental ray using lens shaders
00:00Let's take a look at another way to do depth of field, and that's using a lens
00:05shader in mental ray.
00:08So for this lesson, we do need to use mental ray.
00:11So let's go ahead and set that up.
00:12I am going to go into my Render Settings window, and make sure I have mental ray selected.
00:20Now let's go ahead and just do a quick render just to see what we have.
00:24As you can see everything is in focus.
00:26So let's go ahead and defocus it.
00:30We're going to do a similar procedure to what we did before.
00:33We're going to go into the Camera Attribute Editor.
00:35So I am going to go View > Camera Attribute Editor, and if we scroll down from
00:41Camera Attributes, you will see there is a rollout here called mental ray.
00:46And under that, we have three types of shaders:
00:49Environment, Volume, and Lens Shader, and we're going to take a look at Lens Shader.
00:55So I am going to click on this checkerbox here, and this will bring up
00:59Create Render Node.
01:01Now under mental ray, you'll see we have a entry here called lenses.
01:06So if I select that, you can see these are the different types of lens shaders,
01:11we can add to a camera in mental ray.
01:14So we have things that can control Exposure, we have Depth of Field, a couple of other ones.
01:19The one I want to look at is called bokeh.
01:21Now this is basically the effect that you get when you have a camera that defocuses.
01:28So we have a number of different options here;
01:30one is the Plane, in other words, that's the Focus Distance, how far away are we
01:35focusing. The Radius; this is how much of a region are we focusing. Samples;
01:41this is a quality setting as well as Bias, and then Blade Count and Blade Angle
01:47allow you to further customize the blurring effect.
01:51So in this case, let's go ahead and just place the front chair into focus.
01:55So I need to know how far away that chair is in order to focus it.
02:00So I am going to go ahead and select that, and go to my Display > Heads Up
02:05Display and just look at my Object Details and it will tell you that it's 31.5
02:11units away from the camera.
02:13So if I go back into my Camera Attribute Editor, you can see here is my Lens
02:18Shader, we'll go one step down here.
02:20And so, for Plane, I am going to go ahead and type in 31 and then I am
02:27just going to leave everything else the same, and let's go ahead and do a quick render.
02:31So with it set to 31, we pretty much have the green chair in focus, and
02:37everything else is out of focus.
02:40And you'll find that as you work with more complex scenes that this Lens Shader
02:44is a little bit more accurate, and it will give you better results.
02:49So let's go ahead and play with some other settings.
02:52Now one of the things I'm noticing here is I am getting a lot of this speckling
02:56here, and that's because I don't have enough samples to really sell the effect.
03:02So if I want, I can increase my number of samples.
03:04I am going to increase it quite a bit to 32.
03:08Now this will slow down render time, so you don't want to make this too big,
03:12just big enough to get the effect that you want.
03:15So at 32, we should get less of that speckling.
03:20As you can see, with a higher number of samples, we get a lot less of the
03:25speckling in the image.
03:27So just remember that the more samples you have, the longer it will take to render.
03:32Now we also have a Bias which again just biases where the focal distance is, and
03:37we also have Blade Count.
03:39Now this allows you to kind of control the quality of the blurring, and so
03:45different types of lenses will have different number of blades on the iris, and
03:50that will affect the way that the blurring works.
03:55So let's go ahead and just take a quick stab at this and see if we can get some
03:59results here that are a little bit different.
04:01I am going to increase the Blade Count to 5 and make the Blade Angle say, 0.2 and
04:09let's go ahead and do one more render.
04:13So that render created something that was maybe slightly different, but not that much.
04:18You'll probably notice this more on scenes that have a lot more complexity in the background.
04:23Because we have such a simple scene, we're not going to see much difference
04:27between Blade Count, and Blade Angle.
04:30But you can also use this to match the type of lens that you have on
04:34your camera as well.
04:36Let's go ahead and sum this up.
04:37In order to create more realistic depth of field, you can use the lens bokeh
04:43lens shader in mental ray.
04:46So go ahead and practice with this and see if you can create some
04:50interesting effects.
Collapse this transcript
Creating motion blur in the Maya Software renderer
00:00Another important effect to consider is motion blur, and this is used mostly in animation,
00:06but what it does is it simulates how objects blur when they're moving quickly.
00:12So if an object moves significantly, while the camera's shutter is open, it will
00:17appear blurred, and we can simulate this effect in a number of different ways.
00:22So I have a simple scene here with a submarine, and a propeller that's turning.
00:27So when I press Play, you can see how that propeller spins, and let's go ahead
00:32and do a quick render.
00:33I am going to go into my Render Settings window, make sure I am in the Maya
00:37Software Renderer, and let's go ahead and render the scene.
00:41Now as you can see, there are just sharp edges along everything.
00:45So we don't have any blur.
00:47But we can add that in the Render Settings window.
00:52So if we go into the Render Settings window, under Maya Software, if we scroll
00:58down you'll see an option here called Motion Blur.
01:01If I click that on, you'll see we have two options:
01:05one is 2D, one is 3D.
01:08So let me explain the difference here.
01:112D is for objects that are basically moving across the field of vision, and in
01:17other words, they're moving left to right or up and down.
01:20And what it does is it renders multiple copies of that scene and then blurs them
01:27together. Now this type of motion blur works for a very specific type of motion.
01:32If you want motion blur that works with more general motion, you can do just 3D,
01:38and this basically has one option here which is Blur by Frame;
01:43in other words, it's a multiplier for how much you want this to blur.
01:47Let's go ahead and leave this at the defaults with 3D enabled and do a quick render.
01:53As you can see, we're getting a quick little motion blur here.
01:57We're getting some pixelation here, and we can change that just by upping our quality here.
02:03I have got my Edge anti-aliasing at Low, let's go ahead and make sure it's
02:07highest quality or you can do Production Quality, just make sure Motion
02:10Blur stays turned on.
02:11And if we render that again, you'll see it smoothes that out a lot more, and we
02:15get a pretty good blur of the object.
02:18So it kind of gives an indication that it's running.
02:21Now if we want, we can multiply this effect in two ways.
02:26If I go back into my Render Settings window, you will notice that I have a Blur by Frame.
02:32A higher number will create more blur.
02:34So if I bring this up to 3, do another render, you will see I am getting the
02:39blur over three frames.
02:42If I bring it down, say 0.5, you are going to get less blur.
02:47In fact, you almost have no blur at all.
02:50Now if I leave this at 1, and render, you see I get what I had before.
02:57And this leads me to the second option and that's by doing the shutter angle of the camera.
03:04So if I go into my Camera Attribute Editor, in my Viewport here, you will see
03:10that if I scroll down here, I have something here called Special Effects.
03:14And when I open up Special Effects, you will see I have an attribute
03:18called Shutter Angle.
03:20Now this is basically how long the shutter is open.
03:25So a smaller number means it's open less, a bigger number means it's open more.
03:31So if I bring this down from the default of 144 to say 80, and do a quick render,
03:38you will see I get less effect.
03:42If I bring it up to say 300 and render, I will get a bigger effect.
03:50Now this is actually a real-world number that you can use, if you're working
03:55with film, you may actually have a Shutter Angle number which you can match.
04:00Typically, I just like to keep it at the default and work with the Render Settings.
04:04But the nice thing about this is that you can have different motion blur
04:08depending on the camera.
04:10So this is camera dependent which can help a lot.
04:13So those are some of the basics for setting up motion blur in the Maya
04:17Software renderer.
Collapse this transcript
Creating motion blur in mental ray
00:00In mental ray, motion blur is pretty similar to the way that we set it up in
00:05Maya Software renderer.
00:07Now I have a scene here with this propeller turning, so if I play this you will
00:12see this propeller is turning.
00:14So let's go ahead and set up motion blur using the Maya Software renderer.
00:17I'm going to go ahead and set this to about frame 20 and let's go and change our
00:22renderer from Maya Software to mental ray.
00:26And under Quality you'll see I have a Motion Blur tab. Right now it's off.
00:32So let's go ahead just quick render with it off, and as you can see we have no motion blur.
00:40So we can turn it on.
00:41There's two options here; one is No Deformation and that's for solid objects like
00:47this propeller, things that don't deform. If I do it with Full that means it will
00:53motion blur things that deform.
00:55So if you have a character that's moving really quick and its skin is deforming
00:59this is what you would use.
01:01We are actually just can a use No Deformation and so we have some similar
01:06parameters that we had before.
01:07We have Motion Blur by how many frames, so a larger number means more motion blur.
01:13When does the Shutter Open, when does the Shutter Close?
01:17So this is basically shutter angle.
01:19And then we also have Motion Steps and Time Samples which allow us to create a quality to this.
01:27So let's go ahead and just leave it at the defaults here with No Deformation
01:31and do a quick render.
01:32So as you can see, we're getting a pretty good little motion blur effect.
01:37Now if I want, just like before, I can increase the motion blur just by using this
01:43multiplier here and if I do a render, you can see I get more motion blur, or if
01:50I bring this down, say to 0.5, then we will get less.
01:55Now if I put this back at 1 and render you can see we're getting what we had
02:00before, and now we can also dial in when the shutter opens and when it closes.
02:06Now this is a little bit different than shutter angle in that we actually have
02:10control over when it starts and when it stops.
02:13So you actually have a little bit more control here.
02:16So if I bring any of these numbers down and these two are closer together then
02:21I'll get less effect.
02:23Now if I want to I can bring it above 1, let's say I bring it to 2, that can
02:29actually increase the effect, and again, I'm getting more effect.
02:34Now another thing you can do is add more Motion Steps and Time Samples to
02:39increase your quality.
02:41Notice how we are getting a little bit pixelation here.
02:44If I bring that up to say 8 and 8, then I should get a smoother effect, and as
02:50you can see it's a little bit smoother.
02:53So those are some of the basics for creating motion blur in mental ray.
Collapse this transcript
4. Advanced Rendering with mental ray
Creating reflections and refractions
00:00Now let's go ahead and go a little bit deeper into the mental ray renderer,
00:04which is probably the renderer you use the most when using Maya, because it has
00:08a lot more features.
00:09We're going to start off with reflections and refractions.
00:13Those are created by default in the mental ray renderer.
00:16Let me show you how this works.
00:18First off, we need to go into our Render Settings window and make sure we have
00:22mental ray turned on as the renderer.
00:25Now under Features, we have Primary Renderer and do we want to use it as the
00:31Raytracing which is the default or the Scanline which is actually faster, but it
00:37doesn't do ray tracing.
00:39So if we turn it to the Scanline Renderer and turn off the Secondary Effect of
00:44Raytracing, when we do a quick render here, you'll see that I'm getting
00:50transparency, but no reflections or refractions.
00:54That's the result of ray tracing.
00:57So if I turn on the Raytracing part of the renderer and make sure my Secondary
01:02Effects are on, then I can actually start to see reflections and refractions.
01:09So if I do another render here, you'll start to see reflections.
01:14Now reflections are controlled in the Render Settings window.
01:19So if I go back into this window here, you'll see under Quality, we'll have
01:24under Raytracing, number of Reflections, Refractions, and also Raytrace Depth.
01:30Now this is the number of things that can reflect.
01:35So in this case, I only have one reflection here.
01:39So in other words, the table can reflect the bowl, but the table can't reflect
01:46itself in the bowl, so you can't have more than one bounce.
01:50So if I turn this up say to 10, that means I get more bounces on the reflection.
01:58What this does is gives me a little bit more reflectivity on the scene.
02:03Now refractions are the lens effect you get when you look through glass.
02:10We can turn on refractions in the material.
02:14So if I close all this out and select the bowl here, we can go into the
02:20Attribute Editor, and turn on Refractions.
02:24So if I scroll down to Raytrace Options and turn on Refractions, then I can get
02:33refractions in this bowl.
02:35First, we have the Refractive Index which basically determines how the light
02:40bends when it hits the surface.
02:43We also have the Refraction Limit; how many different bounces of light can we have.
02:48In this case, the default is 6.
02:51Then we also have how much light will the surface absorb and Surface Thickness
02:57and Shadow Attenuation.
02:59So let's go ahead and leave this at the defaults and hit a quick render.
03:03Now when we do this, you're going to get this kind of opaque surface here, and
03:09this is because we have a Refraction Limit here of 6 on the material, but we
03:14don't have that set in the Render Settings window.
03:18So here, let's go back into Render Settings, and under Refractions, this
03:23needs to be higher.
03:24And this is because this is how many times the light needs to bounce through the material.
03:32So if you look at this bowl, we have an outside surface, an inside surface, and
03:37then we also have one on the other side.
03:39So the light can come through here and then refract through here, and maybe even
03:45come through here and here.
03:46So as we turn this up, we'll get more and more realism.
03:51So I'm going to go ahead and just peg this at 10, and then when we do a quick
03:57render, you'll see that I'm getting a much better effect.
04:00So I'm actually able to see through this and see the refractions.
04:05But I'm not getting much of a refraction, because in my material here, the
04:10Refractive Index is still set to 1 which basically makes it so it doesn't bend light.
04:16So what we can do is we can make this either positive or negative;
04:20so in other words above or below 1.
04:23So I'm going to bring it slightly above 1, to a little over 1.1, and let's do another render.
04:29Now when I do that, you can see how I'm getting a much better refraction effect here.
04:36You can see how it's bending the light here, and here.
04:40Now if I go negative with it, in other words, bring it below 1, say to 0.95, I
04:46get a different effect.
04:48You can see how this is a much different effect, and this actually looks a
04:53little bit more realistic to how a bowl like this will work.
04:58Now in addition to this, we can add in shadows and they will also reflect the
05:03transparency in the scene.
05:06So let's go into our Outliner.
05:08I'm going to go Window > Outliner and under defaultLightSet, I'm going to open
05:13it up and select spotLight2.
05:16Now because we're using Raytracing and Transparency, it's probably best to
05:21use Ray Trace Shadow.
05:23So I'm going to go ahead and turn that on and let's go ahead and do a quick render.
05:28Now when I do this, you can see how I'm getting a good shadow on the ground here.
05:35Now remember, with Ray Trace Shadows, we have a Light Radius and a number of
05:40Shadow Rays and this can create a more blurry type of shadow.
05:45We also have a Ray Depth Limit, and again, this is like refractions.
05:48If we turn this up, it will actually create more bounces of the shadow.
05:55So if I do a quick render of this with a high Ray Depth Limit, you'll see you
05:59get a slightly different shadow effect.
06:02So those are some of the basics of how to do reflections and refractions in mental ray.
06:09Now remember, you probably want to keep the number of reflections and
06:13refractions high to create the maximum amount of realism.
Collapse this transcript
Using Final Gathering for natural lighting
00:00One of the big advantages of mental ray is that it allows you to create what's
00:04called indirect lighting.
00:06Now in the most basic form, indirect lighting is bounce lighting.
00:10So if you shine a light at a wall, the wall will bounce some light back into the room.
00:17Now typically, we can't simulate this unless we have something like mental ray
00:22which has options that allow us to do this sort of lighting.
00:27So let's take a look at how this works.
00:29I've got a basic scene here and I want to make sure that I'm lighting using mental ray.
00:36And under Indirect Lighting, we have an option here called Final Gathering and
00:42this is the first step in creating bounce lighting.
00:45Now I'm going to keep this off for just a second and let's just do a render of the scene.
00:51Now this scene has two lights;
00:53it has one light shining through the window, it's a spotlight, and then we have
00:58a point light up here just illuminating the scene in a general way.
01:03So I'm going to make sure I'm in my Camera 1 Viewport and let's go ahead and render this.
01:08Now it took a little while to render this on my machine.
01:12But as you can see, we've got the basic lighting from these two lights.
01:16Now one of the things I'm noticing here is we get a lot of darkness right here
01:21on the back of the chairs, and the shadows under the table are pretty dark.
01:24This is because we're not getting much bounce lighting, we have this really
01:28white floor and these yellow walls and they are not contributing any light to the room.
01:34So let's go ahead and add in some bounce lighting using Final Gather.
01:38Now before I do that, I'm going to hit this button here which keeps this
01:42image, and that way, we can compare image to image as we go through the rendering process.
01:48So I'm going to make sure I keep my image, and then let's go into Render Settings.
01:52I'm going to go down to Indirect Lighting > Final Gathering and turn on Final Gather.
01:59Now we have a number of different options here for Final Gather;
02:03one is Accuracy, Point Density, and a bunch of other ones.
02:07We're not going to get too into these, the defaults work pretty well.
02:11We also have another one for Quality, for a Final Gather Map which allows you to
02:16make it more efficient and Final Gather Tracing.
02:20Do we want to actually gather reflections and refractions?
02:24We're not going to do any of this, we're just going to leave this at the default.
02:27I want you to understand the basics of Final Gather.
02:30So once we turn this on, let's go ahead and render.
02:32Now this may take a little bit longer.
02:36Okay, now we've got our image, and you can see how the backs of the
02:40chairs aren't as dark.
02:41In fact, if we scroll through these here, you can see this is the previous image.
02:46And Final Gather added in a lot of bounce lighting, and you can see this
02:50particularly on the legs of the chairs and under the table.
02:53Now one of the things the scene doesn't have is a back wall.
02:57I'm going to go ahead and minimize this.
02:59I want to keep this window open, but just minimized, and I'm going to hop out
03:04into my three views here, and let's go into this top view here.
03:10In fact, let's change this into a Perspective view, so that way, I can see
03:15what's in the scene.
03:16And as you see there's no back wall to this scene, but conveniently, I've
03:22actually created one here and we can slide that into place.
03:26Now the reason I'm doing this is because this will bounce additional
03:31lighting into the scene.
03:33So when you start working with things like Final Gather, you want to make sure
03:38that your scene is reasonably realistic.
03:40That way, you get the most realistic lighting.
03:43So now that I have that slid into place, I'm going to go ahead and bring up my
03:48Render View window here one more time, and I'm going to save out this image.
03:53I'm going to make sure I do a Keep Image here, so I've got my dark image, and my
03:58light image, and we're going to do one more here.
04:01I'm just going to render this one more time, and again, this may take a
04:05little bit of time.
04:06Okay, so now we've got our final image here, and we've got now three separate ones.
04:12So I've got my initial image which is no Final Gather, this one which has Final
04:20Gather but no back wall and this one which has a back wall.
04:25Now notice how all I had to do was turn on Final Gather, and make the room
04:31complete, and now I have much more realistic lighting.
04:34And so this is a great way to get realistic lighting without too much additional
04:40effort, but perhaps a little more render time.
Collapse this transcript
Turning objects into light sources
00:00Another really cool thing about Final Gather is that it allows you to create
00:05light sources out of objects.
00:07So this is great for creating things like soft boxes and large aerial lights
00:13that create very soft shadows.
00:15Now I have a simple scene here with this little kind of futuristic car, and I
00:21want to make sure that I'm in mental ray, and I am, and let's just go ahead
00:25and do a quick render.
00:27Now when I do, you'll see that I've got a basic light source in the scene.
00:32But if I actually go out, you'll see that I don't really have a light in the scene.
00:37Let's go into our Outliner here, and you'll see that I've got a lot of objects
00:42in the scenes but no lights.
00:45So where does the light come from in the scene?
00:48Well, when you don't have a light in the scene, Maya will create one.
00:52So if we go into Display Render Settings, and go into our Common tab here, and
00:58scroll all the way down to the bottom under Render Options, you'll see this
01:02little check light here that says Enable Default Light, and that was the light
01:07that it used to render that previous scene.
01:10So if we click this off, we should have no lights in the scene.
01:15So if I render, I should get black and that's what we want.
01:19So what we can do now is we can add an object into the scene, and pretend that it's a light.
01:24So I'm going to go into my Surfaces tab here, and just create a NURBS plane here.
01:31I'm going to go ahead and move it up and tilt it a little bit.
01:36So what I'm going to do is make this into a light source.
01:40Now I can do this by adding a material onto this that creates a glowing effect.
01:48So we can go into our Rendering tab, and under Lighting/Shading, we're going to
01:53assign a favorite material that's called a Surface Shader.
01:58Now if you want, we can also get to that on the Rendering shelf and it's right
02:02here, it's called Surface Material.
02:04But under Surface Shader, you'll see that basically, it's just a color.
02:10So we have an Out Color, Transparency, and a Glow Color.
02:14Well basically, all I want to do is just turn this up, and make it into a white light.
02:19Now when I do that, it will create a light source in the scene.
02:25Now when I render, you'll see that this actually is pretty much just a solid
02:30white object, and I'm getting a little bit of reflection but no light.
02:35Now in order to turn this into a light source, we need to turn on Final Gather.
02:40Now before I do that, I actually want to position this a little bit off screen.
02:45So I'm going to hit my Spacebar, go under my quad view here, and just move
02:50this up so that it's basically just outside of the Camera View and shining on the car.
02:56Now I'm going to go back into my Camera View here, and let's go into our
03:00Render Settings window.
03:03So under Indirect Lighting, I want to scroll down and just turn on Final Gather,
03:08and again, we're just going to leave this at the default.
03:12Now that Final Gather is turned on, it will start to do bounce lighting, and it
03:18will also take into consideration the light coming from this Surface Shader.
03:25So when we do a quick render, you'll see that well, it comes up kind of dark,
03:31but we are getting light.
03:32You can kind of make out the outline of the car.
03:37So what we need to do is to make this light brighter.
03:40Well, there are two ways to do that.
03:43The first way is to simply increase the area of the light.
03:46So if I were to again hop out to my quad view, select my NURBS plane, and just
03:53scale it up, I would actually get more light.
03:55So the size of the surface is one way to create more light.
04:00So if I go into my Camera View here and render again, you'll see that I'm
04:06getting more light in the scene simply because I have more area projecting
04:11light, and you can start to see the softness and the detail in this lighting model.
04:19Now if we want, we can also do another way of increasing the amount of light.
04:25So again, I'm going to hop out to my quad view here and select the NURBS plane again.
04:30Now the other way is to just increase the brightness of this Out Color.
04:36Well, right now my slider has actually gone over to the very end.
04:41I want to go further than that.
04:43Well, we can do that simply by clicking on the color here.
04:48When I do that, I want to make sure I'm in HSV Mode, and then I want to take V
04:54and I want to bring it above 1.
04:56Right now it maxes out at 1, but let's go ahead and bring it up even further.
05:01Let's go ahead and bring it up to say 8.
05:03So when I bring it up to 8, it actually makes it brighter than 1, and gives you
05:09an oversaturated light.
05:13So again, let's go ahead and render, and as you can see, we've got a much
05:19brighter light, and we also have a very nice soft shadow that's starting to happen.
05:26Now one thing I'm noticing is that this car is reflective, and it is
05:31reflecting that rectangle.
05:33If we want to turn that off, we can.
05:35I want to go back out and make sure that my NURBS plane is selected, and then
05:40under the nurbsPlaneShape2, I want to scroll down to Render Stats.
05:49What this is, is it just ways to turn this object off in certain parts of the renderer.
05:55If I want, I can make it cast or not cast or receive shadows, but really what I
06:00want to see here is make it invisible in reflections and refractions.
06:05So I'm going to click off Visible In Reflections and Visible In Refractions.
06:08So now it will not reflect or refract that object.
06:13So if I go into my Camera View again and render, now I don't see it.
06:18So there are some of the basics of Final Gather, and how to create an object as a light source.
06:26So Final Gather is not just for bounce lighting, you can actually apply surface
06:31shaders to objects and turn them into area lights.
Collapse this transcript
Creating global illumination in mental ray
00:00Let's talk about a second additional way of adding bounce lighting into Maya
00:05with mental ray, and that's called global illumination.
00:09Now this works similarly to Final Gather, but you actually get more control over it.
00:15Now I have a simple scene here.
00:17In fact if I go out to my quad view here you'll see I have a simple spot light
00:21and a sphere on a plane.
00:25So if I go into my Camera 1 Viewport and do a quick render, making sure I have
00:30mental ray turned on, I'll get this scene.
00:34Now this scene basically has a lot of dark here.
00:37We only have one light casting a shadow here and anything really above
00:43that shadow is pretty much black, and so we really don't have any sort of
00:47bounce lighting here.
00:49Now if we want we could go into the Render Settings window, go into Indirect
00:53Lighting and turn on Final Gather.
00:56And let's take a look at that.
00:58Now when we do that, you can see we get a little bit of bounce lighting up here
01:03on the top of the box and so we don't have a complete shadow.
01:07But we don't have a lot of control over how Final Gather works.
01:11So I am going to go ahead and turn this off and we're actually going to do a
01:16different type of rendering and that's called Global Illumination.
01:19So let's go ahead and turn that on in the renderer.
01:23Now before we actually render global illumination, we have to attach it to a
01:28light, and this is where we start getting more control over it, because we can
01:32do it on a light by light basis.
01:35So I am going to hop out to my quad view here and select my spot light here.
01:40You can see it's right here, it's a little small in the Viewport, if you
01:44want you can use the Outliner, it's called spotLight1 and let's go over to
01:49the Attribute Editor.
01:50Now in order to turn on global illumination I need to scroll down to the
01:56mental ray tab here.
01:59When I open that up you'll see I have an option here called Caustic and
02:03Global Illumination.
02:05And so what we need to do is turn on Emit Photons.
02:09Now what this does is it actually turns on a secondary light source.
02:14So this light is now emitting regular light up here through the regular Spot
02:20Light attributes, and if we go down here it's also emitting a secondary
02:25light source called photons, and these are used to calculate the bounce
02:30lighting in the room.
02:31Now just like with a regular light, we have a color to the photons.
02:37We also have an intensity, in other words, a brightness to the light, and we have
02:42what's called an Exponent and this is basically the same as your light decay.
02:48So the default for Photons is an Exponent of 2, which means it falls off with
02:54the square of the distance, in other words, reality.
02:58If the Exponent is lower, the light will fall off less drastically and if the
03:03Exponent is higher, it will fall off more drastically.
03:07So let's keep everything at the default, highlight our Camera 1 Viewport and
03:12let's go ahead and do a render.
03:14Now with Global Illumination on and my photons on, and my light, you're seeing may
03:19be a little bit of additional light, but not much.
03:23And what we need to do here is actually turn up the light.
03:26Now we can do that in one of two ways.
03:29We can increase the Photon Intensity or we can decrease the Exponent.
03:33But because I want this to be realistic I am not going to touch this Exponent
03:38which is at the inverse-square law.
03:39So we're going to go ahead and increase our Photon Intensity.
03:42So I am just going to go for the heck of it, multiply it by 10 and make it
03:4780,000 rather than 8000, and let's do another render.
03:50Now once we've done that, you can see that we're getting a nice secondary light
03:57effect, you are starting to get a little bit of light along the top.
04:01And this is actually a different character that you would get in Final Gather.
04:05If you can look closely, you'll see a little bit of a green tinge on this.
04:09That's because this green ball is actually reflecting that color light.
04:14And you're also getting a little bit of bounce light back on to the ball.
04:18Now if we want to really amp this up we can certainly increase the Photon
04:21Intensity a little bit more.
04:23So let's go ahead and bring it up a lot.
04:25Let's go ahead and bring it up to 250,000 rather than 80,000 and let's do another render.
04:34So as you can see more Photon Intensity really brightens up the scene.
04:38You can also start to see how this green starts to permeate the top of this
04:43as well as down here.
04:45So you're really also getting a bit of reflected color which is kind of nice.
04:49Now when you're working with global illumination, you do have to balance
04:54your photon energy or your intensity of your photons against the intensity of your light.
05:01So if I go up to my Spot Light here and go up to my Attributes, and let's go
05:06ahead and just turn the Spot Light completely off and let's do another render.
05:10Now what's happening here is that we're not getting any light directly from the
05:16Spot Light, this is entirely the bounce lighting.
05:19You can see how the green of the ball is reflecting on the top and along the bottom here.
05:25You can also see a little bit of these little circles here, which are
05:29basically the photons.
05:31So I am going to leave this Intensity off here, and let's go down to Caustic and
05:35Global Illumination and there's one more value here and that's the number of
05:41Global Illumination Photons.
05:43So this is the accuracy of the solution.
05:47So in order to see how this works, I am going to take it from the default which
05:51is 10,000 and bring it down to a really low number.
05:55Let's bring it down to 50, and let's do another render.
05:58Now again, I am just rendering the photons, and with such a low number you
06:03can see how this works.
06:05What mental ray does is it beams these circles of light all over the scene and
06:12those are used to calculate the bounce lighting.
06:15Now the more circles you get, the better the solution.
06:19So let's go ahead and bring this back up to 10,000.
06:25And also remember that the number of global illumination photons will increase
06:30render time, so the more photons you have, the better the solution, but also
06:34the longer the render.
06:35So you kind of have to balance that against the needs of the scene.
06:40Let's go ahead and bring the Intensity back up to 1 and then I am going to
06:44scroll back down one more time and let's bring that Photon Intensity down in half.
06:48So let's cut it down 125,000 and let's do one more render.
06:53Now we have something that looks pretty good.
06:56So remember in order to do global illumination you need to turn it on in Render Settings.
07:01And then for each light that you want to be part of the solution, you need to
07:06turn on Emit Photons.
07:08After that, it's just a matter of balancing your photon solution against the
07:13solution of your regular lights and getting a good balance.
Collapse this transcript
Rendering transparent materials with caustics
00:00Let's take a look at one more lighting effect that we can do in mental ray and
00:04that's called caustics.
00:06Now caustics has basically two things that it can do.
00:09It can create an effect of light transmitting through a transparent material,
00:15or it can also simulate light reflecting off of highly reflective materials,
00:21such as say the water in a swimming pool or a metallic object sitting next to a table.
00:27So basically what it does is it creates some very realistic highlights and
00:31transmission effects.
00:33So let's take a look at this basic scene here.
00:35I've got a martini glass with a little bit of martini and an olive in it, and
00:42let's go ahead and just render this frame.
00:44So as you can see, we've got a pretty realistic glass going on with this
00:47martini glass, some nice refractions, but we really don't have anything
00:52connecting the glass to the table.
00:54We need a shadow and maybe also some caustics.
00:57So let's go ahead and add in some caustics.
01:01I'm going to pop out to my quad view here and you can see we've got a light
01:06right here which is illuminating the scene, it's called spotLight1, and let's go
01:12into the Attribute Editor.
01:14Now it's got a Color, it's got an Intensity, now it does have a quadratic
01:19falloff, so it is a fairly realistic looking light, and if we want we can add some shadows.
01:25So let's go ahead and add some Raytrace Shadows here under the Raytrace Shadow
01:31Attributes, and let's go ahead and highlight our Camera1 Viewport and do a quick render.
01:36So when I add in the shadows you can see I'm getting just a faint, faint shadow
01:41from the glass as well as from the olive in the martini, but I'm not really
01:46getting any of that transmission effect that I will get of a light going through
01:51such a glass material.
01:53We can fix that by adding caustics.
01:55So I'm going to go ahead and reselect my light and let's go down all the way to
02:00Caustic and Global Illumination.
02:02Now you might be familiar with this, we used it in the last lesson, and basically
02:07for this light we have to emit photons just like we did for global illumination.
02:12And just like with global illumination we need to turn it on in the renderer.
02:17So I'm going to go into my Render Settings window, go over to Indirect
02:21Lighting, scroll down to Caustics and turn those on, and we're going to leave
02:26those at the default.
02:29So with Caustics turned on, let's go ahead and go into our Camera1 Viewport
02:35and do a quick render.
02:36Now we're getting a little bit of an effect but not much, so just like we did
02:40before we need to up the level of the photons.
02:44The intensity of these photons will determine the intensity of the effect.
02:49Just like with Global Illumination, you want to balance the intensity of your
02:52light against the intensity of your photons.
02:56So let's go ahead and bring this up to really big number.
02:58I'm going to bring it up to 100,000, and let's go ahead and do another render.
03:04Now with the light at 100,000 you're starting to see the Caustic effect.
03:09Basically what it's doing is it's brightening up the area where there is more light.
03:14The glass is acting somewhat like a lens and so it's going to push some of the
03:18light into more concentrated areas, and this is really what we're seeing here.
03:23So if we want to get a really strong effect, we can just keep bumping up
03:27our photon intensity.
03:29Let's go ahead and bring it up to 400,000 and do another render.
03:34Now this brings it up quite a bit, in fact this may be just a little bit too much.
03:39But as you can see we're getting a really strong Caustic effect on the floor, and
03:44we're also getting light bouncing around inside the liquid and that's
03:48illuminating the olive as well as the stem.
03:51We're also getting a little bit of a highlight here along the lip of the glass.
03:58Now this is a little bit too much, so let's go ahead and back this off.
04:01I'm going to bring it back down to say 250,000 rather than 400, and let's go
04:07ahead and do one more render.
04:08Now that looks like a pretty good balance between my photon intensity and the
04:14intensity of my light.
04:16And again, just like with global illumination, you want to balance your photon
04:21energy against the intensity of your light.
04:24Now I want to show you one more thing and that's the number of photons.
04:30Now in this case we have 10,000 photons, which is the default.
04:34And if you look at the Caustic effect here you can see it's kind of blotchy,
04:39it's not really sharp, and that's because we don't have enough photons.
04:44So let's go ahead and add in some more.
04:47I'm going to make this go from 10,000 to 100,000 and let's do one more render,
04:53now this may take a little bit longer.
04:55Now with 100,000 photons you can see I'm getting a lot less of that blotchiness
05:02and I'm getting a much sharper effect.
05:03Now typically I find that caustics does take a few more photons than
05:10global illumination,
05:11but what's really nice is that Maya allows you to set these values
05:16independently, so that way you can do global illumination and caustics and have
05:21different numbers of photons for each solution.
05:25So those are some of the basics about how to do caustics.
05:28Now remember caustics is not just for transparent material such as this glass,
05:33it can also be used for reflections as well.
Collapse this transcript
5. Final Output
Batch rendering
00:00Up until this point we've just been rendering single frames and that's just
00:04using the Render Current Frame, so if I click this button I get a render.
00:08Now if want to get a little bit more control of the renderer or if we want to
00:13render animation, we can do what's called a Batch Render, so let's show you
00:17how to set this up.
00:18Now under the Rendering menu set we have a Render option here, and under
00:24this we have Batch Render.
00:26Now before I click this we need to set this up.
00:30So the first thing we want to do is tell Maya where we're putting the files, we
00:35need to set our project.
00:36So I'm going to go File > Set Project and make sure it's set to the FinalRender
00:43folder, go ahead and set that.
00:45Now when I know where it's going and let's go ahead and tell it a little bit
00:50more about what we're rendering.
00:51So I'm going to go into my Render Settings window, and I'm going to scroll down
00:56here and under File Output we're going to add in a number of things here.
01:01The first one is the File name prefix, in other words, what's the name of this file?
01:07If we don't type in anything it would just use the name of the scene as the default.
01:13If you like that then go ahead and use that. I'm going to go ahead and just
01:17type in the word SUB.
01:19Next we need to select the Image format.
01:22By default it uses Maya IFF but we have a lot of other options.
01:28For the sake of brevity I'm just going to go ahead and choose JPEG.
01:31Now the next one is the Frame/Animation.
01:35So if we want to render a single frame we can pick these first two options,
01:42either the name or the name with the extension.
01:45If we go further down you'll see each one of these has a hash sign, for number
01:52and each one of these will render animation.
01:55So I'm actually going to pick the last one which is name_# and then the extension,
02:01and when I select that notice how up here it's telling me exactly what
02:06it's going to render.
02:07It's going to render from File name SUB_1 to SUB_10.jpg.
02:14Now I'd like to have leading zeros on my file name and I can do that here in the
02:20next option which is Frame padding, so as I dial this up it gives me leading
02:26zeros on the numbers.
02:29So now I'm going to do SUB_001 to SUB_010.
02:33Now if I want to render more frames I can scroll down here to Frame Range and
02:38type in a new number, so let's go from 1 to 25.
02:41And we can also specify in increment, so if I want to render every other frame
02:46or every third frame I can do that here.
02:50Now finally, what camera are we rendering and presets such as the aspect ratio
02:56as well as the pixel width and height.
02:58Now once I have all of these set and I've set my project I can render.
03:03So all I have to do now is go into Batch Render, select this option and it will
03:09ask me if I want to use all of available processors or I can specify a specific
03:14number of processors to use.
03:16Sometimes you'll want to reduce the number of processors so you can Batch Render
03:20in the background while you work.
03:23We're going to go ahead and just use everything we got here and then let's just
03:27do a Batch Render and Close.
03:29Now once we do that you will see on the command line here that it's actually
03:34rendering, and so as it starts to render each frame it will tell you.
03:39So as you can see it's going through pretty quickly, each frame, and once it gets
03:44through all of these it'll say Rendering Completed.
03:48Now I've created these files in my project folder and if I want to see them I
03:52could go here to View Sequence.
03:56And it should bring me to the \images folder in my project.
04:00So all I have to do is select this and Open and it should show me my render.
04:06So those are some of the basics of how to do batch rendering in Maya.
04:11Now you can use this either for individual frames or for multiple frames as well.
Collapse this transcript
Using Backburner
00:00Finally another way to do multiple renders is to use Backburner which is
00:06Maya's network rendering software.
00:08Now I'm not going to get into setting up Backburner, we actually have a
00:13course in Maya 2010;
00:15it's called Getting Started with MatchMover, Toxik and Backburner.
00:18So the last couple of chapters of that course will tell you all you need to know
00:25about setting up Backburner.
00:27But if you want to do multiple render drops over the network, you can do
00:33it using Backburner.
00:34So all you have to do to submit a Backburner job, is go ahead and setup your
00:39render settings like you did before and then create a Backburner job.
00:45Now it'll ask you if you want to save your scene or not. I've already saved
00:50the scene so I'm going to go ahead and ignore this, and then it creates a Backburner job.
00:56We can give the job a name, a description, we can also set a Backburner
01:02priority, give it start and end frame numbers, as well as do you want to choose
01:08the Renderer from the scene file or do we want to explicitly specify what
01:14renderer we are using.
01:17Then we need to type in the Backburner Manager Name, and here we type in the
01:22Backburner Manager Name which is the name of the render server.
01:26And once you do that, you just can submit the job and close.
01:30So those are some of the basics of how to do multiple rendering as well
01:35as network rendering.
01:37Now if you really want to use Backburner go ahead and watch the Maya 2010
01:41course, it will have a lot of good information.
Collapse this transcript
Conclusion
Goodbye
00:00So that's just about it for Maya Essentials 6 Lights and Rendering.
00:04Now I hope you enjoyed the course and found it valuable.
00:07So I'll be seeing you soon and goodbye.
Collapse this transcript


Suggested courses to watch next:


V-Ray 2.0 for Maya Essential Training (4h 46m)
Brian Bradley


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