navigate site menu

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

Photorealistic Lighting with Maya and Nuke

Photorealistic Lighting with Maya and Nuke

with Mark Lefitz

 


This course demonstrates how to light an object on a live-action still plate, using Maya, Nuke, and Adobe Photoshop. Author Mark Lefitz shows how to capture and use a high dynamic range image (HDRI) as the main light source, as well as how to analyze the plate to determine lighting direction, intensity, reflection, and shadow information. He layers in additional key, fill, and bounce lighting, plus ray-traced shadows, using the mental ray render engine. The course also demonstrates how to render various passes from mental ray to composite the final image in Nuke. The composite is finished off with some motion blur and vignetting in Photoshop.
Topics include:
  • Understanding image-based lighting
  • Analyzing and color correcting the background plate
  • Creating a 3D camera to match the plate
  • Lighting with low-quality settings and proxies
  • Setting light samples
  • Setting up render passes
  • Rendering mattes ground shadow, and occlusions passes
  • Adding gamma correction in Nuke
  • Adding the object to the plate and rendering the final composite
  • Retouching the composite using Photoshop

show more

author
Mark Lefitz
subject
3D + Animation, Rendering, Textures, Video, Materials, Compositing, Visual Effects
software
Maya 2013, Nuke 6
level
Intermediate
duration
2h 24m
released
Dec 20, 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:00(music playing)
00:04Hello! My name is Mark Lefitz, and welcome to Photorealistic Lighting with Maya and Nuke.
00:09In this course, I am going to be guiding you through the essential tools,
00:13techniques, and workflow to effectively light, render, and composite a CG object;
00:20in this case, a futuristic vehicle to a photographic plate.
00:24I will start by discussing image-based lighting, including HDRI image
00:29creation and manipulation.
00:32Next, we will jump into Maya to explore shading, lighting, and rendering.
00:36In Nuke, we will look at how to use our output passes to render our final composite.
00:43Finally, we will put some finishing touches in Photoshop.
00:47So let's get lighting with Photorealistic Lighting with Maya and Nuke.
Collapse this transcript
What you should know before watching this course
00:00It is worth mentioning that when it comes to standard Maya and Nuke
00:04operations, I will work with the assumption that you have a basic working
00:08knowledge of these applications.
00:10If you are new to 3D, Maya, and compositing, I would suggest you check out some
00:15of the essential training courses here at Lynda.com.
00:18A basic working knowledge of photography is also helpful. Here are some
00:22additional courses you might want to view.
00:24All these skills are helpful, but they are by no means essential for you to
00:28follow along and understand this course.
00:30I will briefly go over some of the more important principles as we proceed
00:35with the course.
Collapse this transcript
Using the exercise files
00:00If you are a premium member of the Lynda.com Online Training Library, or if you
00:05are watching this tutorial on a DVD-ROM, you have access to the exercise files
00:10used throughout this title.
00:13As you can see I have an Exercise folder here on my Desktop; we have another
00:17folder called Concept_Car. Within that we have all our Nuke files that I'll refer
00:23to. In our scenes folder, we have all our Maya scenes that I also refer to
00:29throughout the course.
00:30We go up one more directory; in our assets directory, we have our reference
00:36files that our Maya files will reference throughout the course.
00:41And if we go into our images directory, we have our images that have been
00:46rendered out from Maya that are used in Nuke.
00:49Back in the Concept_Car directory, we also have our sourceimages.
00:55In sourceimages, you will find our HDRI files, as well as our RAW file used
01:01for our back plate.
01:03We also have some texture files that are being used in some Maya shaders.
01:09In Maya, it is important to make sure that you set your project accordingly.
01:14You may add your Exercise File directory to projects, or you can keep it on the Desktop.
01:20Wherever you put your Exercise Files, make sure you set Concept_Car as your
01:25project folder, and all your Maya files will then pull in the proper images,
01:29and work accordingly.
01:31If you are a monthly subscriber, or annual subscriber to Lynda.com, you don't
01:36have access to the exercise files, but you can follow along from scratch
01:40with your own assets.
Collapse this transcript
1. Image-Based Lighting
Explaining image-based lighting
00:00Most commercially sold 3D render engines that use ray tracing as their primary
00:04means to render a scene can accommodate image-based lighting, or IBL for short.
00:10To do this, an artist must use a spherical image that captures the real world
00:15lighting information of the scene that is being lit.
00:18The resulting image is called a high- dynamic-range image, or HDRI for short.
00:24The dynamic range are the values from the darkest point to the lightest point in the image.
00:30This is also called the contrast ratio.
00:34To achieve this range, the image is created with multiple bracketed exposures
00:38crunched together in a single 32-bit image.
00:42During the post-processing of the image, it must be made into a 2:1 spherical
00:48map, which can then be projected onto a dome or sphere.
00:52Once this image is mapped, it will allow the ray tracer to extrapolate the
00:56information, resulting in highly detailed, real world lighting.
01:01This is not a photography course on creating HDRIs, but now that we know
01:05about image-based lighting, let's see how we created that HDRI specifically
01:10for this course.
Collapse this transcript
Examining how the HDRI was created
00:00Let's take a look at how our HDRI was created.
00:03For our shoot, we used a standard, non-full frame Canon 7D DSLR,
00:09keeping in mind that full frame DSLRs are sometimes cost-prohibitive.
00:14Because we were using a DSLR with a smaller sensor, we therefore cannot
00:17accommodate the use of a fisheye lens.
00:20We can, however, use a rectilinear wide-angle lens.
00:24This just means we have to take more pictures to cover the gaps that would
00:27normally be covered using a wider angle lens.
00:31One of the side benefits of using a normal lens is that more stitching software
00:35supports normal lenses.
00:38On our 7D, what we used was a 10-20 mm extra wide-angle lens.
00:44Since the 7D has a cropped frame, a crop factor of 1.6 has to be taken
00:50into consideration.
00:51Therefore, the focal length was set to around 10 mm, giving us the equivalent of
00:57a 15 mm lens on a full frame camera.
01:01Also, since our 7D can only auto-bracket three total stops, we manually
01:07bracketed seven full stops;
01:09three stops up, three stops down, and one stop in the middle.
01:14Mounting the camera on a tripod, we shot a full circle taking care to create a
01:19bit of overlap from one view to the next.
01:22For each camera position, we bracketed our exposures three up, and three down,
01:27with one in the middle, for a total of seven exposures.
01:31The bracketed exposures were then stitched using PTGui Pro, giving us a file
01:37size that is roughly 17,000 pixels wide, and 4000 pixels tall.
01:43Notice the gaps at the top and bottom of the image.
01:46This is because we did not cover the nadir directly below, or the
01:50zenith, directly above.
01:52So we had to extend both the sky and ground to end up with a roughly 17,000
01:58pixel wide, and 9000 pixel tall image.
02:01A lot of paint work to end up with the correct 2:1 aspect ratio suitable for
02:06spherical mapping in mental ray.
02:09This file size is too large to work with, so I saved out a half- and
02:13quarter-sized versions.
02:15I simply imported the final large image into Nuke, placed a Reformat node after
02:21the image, and set the Reformat Type to Scale.
02:26Then I set the scale to either 0.5, or 0.25, and wrote that file out.
02:33I could do the same thing using Photoshop as well.
02:36So now that we know how our HDRI was created, let's examine the best way to
02:40capture our background plate.
Collapse this transcript
Shooting the background plate
00:00On some projects, the plate photography or video is provided to us via the
00:05client, and we have to match whatever is given to us.
00:08Other times we are in the position of creating or choosing these assets.
00:13If you are fortunate enough to be in this position, then I would recommend that
00:16the background plate photography be taken at the same time as the HDR image to
00:21ensure the same lighting conditions.
00:24When shooting props or vehicles, it is a good idea to analyze those objects
00:28before going to the location.
00:31Make note of the body lines, the proportions, the paint color, and the overall
00:35styling. This will help you in choosing your lens, and lens height.
00:40Low, aggressive sports cars almost require a wider lens, and a lower mounting point.
00:46With sedans, you can lift the camera maybe a bit higher, and choose a narrower lens.
00:51In either case, it is a good idea to shoot the vehicle with several lenses, and
00:56create a contact sheet of your results.
01:00Shoot front, back, and side to get full coverage. See what looks good, then match
01:05the angle of view and lens height when shooting the plate.
01:09Sometimes, as in the case of this course, we don't have an actual object to shoot,
01:14but we can do the same exercise within Maya by simply changing the focal length,
01:19and rendering several angles, using the default light.
01:23If I open up the Render Settings window, and we scroll down to the bottom under
01:28the Common tab, we're going to notice there is pulldown under Render Options.
01:33Let's make sure Enable Default Lighting is selected for making this contact
01:37sheet, but turn this off for the rest of the course.
01:41You can also see that I've chosen to Render Using mental ray that I'll be using
01:45throughout the rest of this course.
01:47Next, let's select our camera, and I'm going to open up the Attribute by
01:52selecting Control+A. Now what I can do is I can go to my Perspective view, under
01:58View > Camera Attribute Editor.
02:01That will give us the parameters to change the focal length.
02:05In this particular case, my Focal Length is set to 50.
02:09Let's give it a render.
02:12So here we have our car, with a focal length of 50, and our default lighting.
02:17So I went ahead and I change the camera Focal Length to various numbers, and I
02:21rendered out several different renders.
02:24So let's take a look at that, and see what that looks like in Nuke.
02:27So, within Nuke, I brought in all my renders.
02:31In this particular case, I rendered the camera from a High position, a Medium
02:36position, and a Low position from the height of the ground. And then from each
02:41of those positions, I rendered out three focal lengths; a 30 mm, a 40 mm, and a 50 mm,
02:48do you can see the differences, and how the car looks within each of those focal lengths.
02:55Once the renders were complete, I brought all the renders into a contact sheet node.
03:02This mimics the contact sheet we were looking at before, so now I can view all
03:07the vehicles, and all the different focal lengths in a single image.
03:12I happened to like the lower, more aggressive look for the concept car.
03:15Also, the lower length lens seems to make the front end of the vehicle too
03:20bulbous, which is the Low 30 mm lens, as we can see here.
03:29So, based on this analysis, we shot our background plate using a 50 mm lens
03:34mounted on a tripod about 3 feet off the ground.
03:37Now that we know how our background plate was shot, let's take a more in-depth
03:41look at what we have to work with.
Collapse this transcript
Analyzing and color correcting the background plate
00:00Once the background plate has been shot, we need to carefully study it to
00:04determine how to light our object. What is the sun and shadow direction? What
00:09are the darkest darks, and the brightest brights?
00:12Let's open the following image, which can be found in the sourceimages directory.
00:17Notice in the image, we chose that the shadows are not fully black, and that the
00:21color of the sun is warm, not midday white.
00:25We need to take this into consideration when setting up our lighting.
00:29A good photographer will get the right lighting, framing, and lensing, but there
00:33will typically need to be further enhancements on the image.
00:37The great thing about shooting RAW is that with the 32-bit file format, there is
00:42plenty of pixel information to manipulate.
00:45There are several ways we can color correct an image. We can do it now in
00:49Photoshop, or we can do it in our composite.
00:52Here is a quick way to color correct the RAW image in Photoshop.
00:57Let's close our preview. We notice in our sourceimages directory our Camera RAW
01:03file. Let's just Click+Drag, and drop into Photoshop.
01:08This will automatically initialize Camera RAW.
01:11Now that we're in Camera RAW, let's first tint the image, so it's a little
01:15bit warmer overall.
01:17And now let's bring down the Exposure, which basically darkens the image, and we
01:23can lift our blacks, which basically gets our shadows darker.
01:28Let's do an overall Brightness increase, and increase our Contrast.
01:33Once we have color corrected it, let's save it in the sourceimages directory as
01:37a JPEG image. Click Save; I will denote a .cc, which means color corrected.
01:45We have to save it as something other than a RAW file, like a .JPEG, or .TIFF for
01:51Maya to read it as an image plane.
01:54Save the file. Now we're going to close our Camera RAW; say Done.
01:59Another great way to color correct the image is in Nuke.
02:02Since Nuke does not read Camera RAW files, like CR2s from Canon;
02:07we have to convert it to another file format.
02:11Here we are in Nuke.
02:12Now let's bring our saved TIFF image, that is, non-color corrected, into the file.
02:18Here we can Click+Drag, and bring it directly into the application.
02:23I hit 1, which is going to select Viewer1 onto our TIFF image, so now we can view it.
02:30We can now add a color correct. We can do this in a couple different ways.
02:35We can either hit the Tab button, which brings up all our Nuke nodes, and we type
02:40in color correct, and within a list we select ColorCorrect.
02:43Let's delete that, and I'll show you another way to do it.
02:46Select the Read node, and this time let's just hit the letter C, and that will
02:51also create the ColorCorrect node.
02:54Now that our color correct is ready to use, let's go ahead and bring up our
02:58contrast, dial down our gamma, and let's increase the gain.
03:05These are very similar operations that we did in Photoshop to get the same
03:09type of look as before.
03:11It seems as though the ground is a little bit bright, so we need to adjust that as well.
03:16Let's create a Rotoscope node, so we can just change the ground portion.
03:21So Tab, and we type in Roto, set the Rotoscope apart to the side here.
03:28Then we're going to double-click to bring up our parameters.
03:31Now, by selecting the Control and Alt key, we can lay down some beginning points of
03:37the Rotoscope just to outline the road.
03:40The final click will enclose the Rotoscope, and we can even hit the spacebar to
03:46enlarge the entire image onto the screen.
03:48So now let's go ahead and fine-tune those points, highlighting just the road.
03:56Spacebar again, so we can get back to our Node window.
04:01What I like to do is I like to have the in leader, which is this leader right
04:05here, come from the image file, so it knows the size of the image.
04:10Now what we can do is add another color correct.
04:14Hit the letter C, we bring our mask leader into the Rotoscope.
04:20Now what we can do is double-click this second ColorCorrect, so we have our parameters.
04:26Back to the Rotoscope node, we invert it.
04:29So now only the inside of the Rotoscope is going to be affected by this color correct.
04:36So with the ColorCorrect selected, we can bring down the gamma, and also the
04:41gain to darken the road.
04:43Finally, what we want to do is we want to write this image out, so we can use
04:48that now in Maya as an image plane, and also in our final comp.
04:54So let's move this viewer to the side, Tab, and we can type in write.
04:59The other thing we can do is we select the ColorCorrect node, and hit the
05:03shortcut key for W; that will create a Write node.
05:07Let's go into our Explorer browser window, let's Copy+Paste; Control+C, and now we go
05:15into our file, and we Control+V, telling where we want to write our image.
05:20Let's add one more Backslash, and type in the name of the file that we want to save.
05:27So in this case, we're going to type in IMG_2117_colorcorrect, and we can say .jpg.
05:38We have to make sure that the JPEG quality is set to 1, and now we can render
05:43that out by simply hitting the Render button, and saying OK.
05:47I am going to Cancel that out. I already have a version of that saved.
05:52I have shown a couple of different ways to color correct the background plate.
05:55Now let's take a look at how we can color correct the HDRI as well.
Collapse this transcript
Correcting the HDRI
00:00Just as we color corrected our background plate, we can do the same to the HDRI image.
00:05Let's read in our panoramic HDRI quarter-sized image into Nuke.
00:10The first thing we are going to do is add a ColorCorrect node.
00:13Let me hit the spacebar; zoom out here.
00:16We are going to open up our Windows Explorer window, and here is our
00:23quarter-sized panoramic image that we created in a previous lesson.
00:27So minimize that, and let's view the HDRI image.
00:33And again, we're going to create a color correct node.
00:35We can either tab ColorCorrect, or press the letter C for the hot key.
00:42Let's first bring up our contrast just a tad, and we are going to bring down our
00:48gamma, and let's bring up our gain.
00:50And the point of this is, we are going to look now at our ColorCorrect for our
00:54background image; put that on the number 2,
00:57so now we can toggle between number 2, and number 1, number 1 being our HDRI image.
01:03We are trying to get them roughly in the same world,
01:06so when I bring this HDRI image into Maya, the lighting will match.
01:11The HDRI was taken in a slightly different location and time of day than the back plate,
01:15so we have to accommodate for these changes.
01:18The HDRI was taken on dirt, but the back plate shows very little very dirt.
01:22We need to adjust the color of the dirt to more closely match the background
01:26plate, to get the proper bounce lighting, and mimic that color reflected onto
01:30the vehicle from below.
01:32Let's create a constant at the same resolution as the scaled down HDRI.
01:38Tab button, Constant, and now let's double-click the Constant, so the
01:44parameters are now shown.
01:46Let's select the ColorCorrect. Hit number 2,
01:49so we bring that into the viewer.
01:52Now, within the Constant, we select our color picker.
01:56Holding down the Ctrl and Shift key, we can now select the color of the ground.
02:03Back to the Constant, make sure that the Constant size is going to be the
02:07same as the HDRI image.
02:10Select the ColorCorrect, number 1, and now under Format, we select the
02:164383 by 2185 resolution.
02:20So now they are both going to be the same resolutions.
02:24Next, I'm going to add a Bezier.
02:27Click in the workspace, select X, and we are going to make sure the TCL
02:33option is selected.
02:35We are going to type in Bezier, with a capital B. Hook that up to the Constant.
02:41Holding down Ctrl+Alt key, we are going to place a Bezier carefully around just
02:47the dirt area to isolate that area.
02:50So, we are going to set some points on the Bezier,
02:54and now what we can do, just one click in our viewer window, hit the spacebar,
03:00and now we can bring that full size up.
03:03This gives me the opportunity now to go in and finely tune the Bezier curves.
03:10I'm only isolating just the ground.
03:16Open this one up a little bit. There we go!
03:19That looks good for now. Spacebar to resize it back.
03:24Lastly, what we want to do; we want to bring this Constant color on to the ground.
03:29To do that, we have to create a Merge node.
03:32So we can either hit the Tab bar, and type in Merge, or we can use Nuke's
03:39hot key, which is M. Make sure that our Merge node, the operation is selected to screen.
03:47Now set the A leader to the Bezier; the B leader to the ColorCorrect.
03:54One last thing we need to do; as you notice, the color is outside of the
04:00Bezier. We have to now go to our color, and set it to black.
04:07Back to the Bezier tab, we are going to invert that color.
04:11Finally, back to the Screen node by double-clicking, we now can mix in the
04:16amount of color that we like.
04:18Now, with our ColorCorrect selected, we can hit the number 2, and we can dial
04:24between the two, and see if that is what we like.
04:28So, let's go back to the screen, I think it might be a little bit heavy. Bring that down.
04:33Now we can compare our original HDRI with our color corrected HDRI.
04:39Our last order of operation here is we have to write out the file.
04:44So we are going to hit the Tab button, type in write, or the Nuke shortcut is
04:49simply W. Let's go ahead and bring our Explorer window up.
04:53Let's Copy+Paste where we want it to write to; in this case, our sourceimages
04:57directory, and in the file, we are going to paste.
05:01And add a backslash, and type in the name of the file that we want to save.
05:08Once that file name is in, we simply hit Render, and it will render it into our
05:13sourceimages directory.
05:15Now that we have our HDRI and our back plate color corrected, and sized properly,
05:20let us use them in Maya.
Collapse this transcript
2. Asset Integration
Using Maya references to import the geometry
00:00We need to do some organizational work before we can begin to light our vehicle.
00:05The general idea is that we will store a progressively changing unshaded model
00:10in our assets directory.
00:12In another Maya file, this unshaded file will be referenced in using
00:17Maya's Reference Editor.
00:20This is where we add shading and lighting.
00:23We will call this our shading file, and progressively save changes to the scenes directory.
00:29In a fresh version of Maya with nothing in it, we are going to
00:32File > Reference Editor.
00:36In Reference Editor, we are going to go File > Create Reference.
00:41Now what we do is we have to browse to our assets directory.
00:45In our assets directory, this is where our unshaded geometry only model lives.
00:52So let's go ahead, and we are going to select version 3 of our reference file.
00:59Go ahead and minimize our Reference Editor, and we are going to select 5 to turn
01:04on hardware shading.
01:06So now, if we open up our Outliner by going to Window > Outliner, and let's open
01:13up our hierarchy, we can see our grouped car.
01:18What I've done is I've gone ahead and I've grouped it in terms of windows,
01:23we have an interior layer;
01:25turn off the shading, so we can see inside the car. Hardware shading back on.
01:30This is our sheet metal.
01:32I separated out the front wheels;
01:34We have a front wheel left, and we have a front wheel right, and we have a rear
01:42wheel right, and we have a rear wheel left.
01:47I primarily do this so I can go ahead and select the two front wheels,
01:53and now I can rotate them, to give the car maybe a more aggressive look.
01:59I also have all the axles, and the light assemblies, and finally, the side mirrors.
02:09The reason we do this is that any time our geometry changes -- pieces added,
02:13deleted, separated, or UVed -- we don't have to go through the process of
02:18re-shading our geometry.
02:20We simply update the model, version up to a higher number, then version up our reference.
02:26So let's go ahead and open up that Reference Editor again.
02:30This is a good setup when multiple artists are working on the same project in
02:33different capacities.
02:35One artist can be modeling, while other artists are shading and lighting.
02:39When the model is progressed, the shading file is simply versioned up to the
02:43latest geometry file.
02:46Let's go ahead and open up our Shading file.
02:49Tab over to another Maya file.
02:52This is our shading file.
02:54Open up our Reference Editor.
02:55You will notice it's bringing in a fresh reference.
02:59In here, we are going to open up our Hypershade window,
03:02so we go to Window > Rendering Editors > Hypershade.
03:07Inside, you will notice several mia material shaders, specifically designed for
03:13the mental ray render engine.
03:15We can put the vehicle off to the side, and now we can start selecting various
03:21pieces of our geometry.
03:23Let's go ahead and open up our Outliner window, open up our hierarchy, and now
03:31we can select, for instance, all the sheet metal.
03:35We find our paint shader, we right-click, and Assign To Selection.
03:40Now all our paint material is assigned simultaneously.
03:44We can do the same thing now for our windows.
03:48Let's select our windows group.
03:49Let's find our Window shader, right-click, Assign Material To Selection.
03:58We can continue on assigning materials to the car.
04:01So, for instance, maybe what we do is we assign the insides of our wheel to
04:07a nice Chrome shader.
04:08Let's find the Chrome shader.
04:11They're actually listed alphabetically.
04:13Right-click, and Assign To Selection.
04:17We can also select individual pieces outside of the hierarchy.
04:22So for instance, this piece right here on the front, maybe I don't want that as
04:25red paint; I actually want it as silver paint.
04:28So we are going to right-click, and Assign To Selection for our SilverPaint shader.
04:34So no matter what kind of geometry you are shading and lighting, it is
04:38important to use references with a well organized hierarchy.
Collapse this transcript
Creating a 3D camera to match the plate
00:00To match the Maya camera to the camera that shot the plate, we need to get the
00:05metadata from our RAW image.
00:07This data will tell us our file size and lensing information that we
00:11can replicate in Maya.
00:12Open Photoshop, and click+drag our RAW file into the application.
00:18We get our Explorer window, we click+drag in our CR2, which is our RAW image, and
00:24that will bring up Camera RAW.
00:26Now, we are not going to do any color correcting here; we are simply going to
00:30use this to get the information from the lens.
00:32We notice it was taken with an ISO of a 100, the lens was shot with 24-105, and
00:39it was shot at 50 millimeters.
00:41So, what we want to do is, in Maya, we want to create a 50 mm lens based on this data.
00:48We are done with that, and let's open up Maya back to our shading file where we left off.
00:54First thing we want to do is we want to create a single node Maya camera, and
00:59name it something like shotCam.
01:01So, let's go up to the Create menu, Cameras, and we are going to create a
01:05single node camera.
01:07In the channel box, we're going to select that, and we are going to call this shotCam.
01:12Now let's go ahead, and under panels, we're going to go to Perspective, and we
01:16see our shot camera.
01:17Let's go ahead and look through that.
01:19Let's open up our Attribute Editor for that camera.
01:23Back in Camera RAW, Focal Length was set to 50.
01:26Here in Maya, the default is 35,
01:28so let's go ahead, and set that to 50 to match our live-action camera.
01:34We need to open up the Render Settings window.
01:38If we scroll down to our Image Size, we have to set an initial Image Size.
01:43Let's try HD 720 for now, under Common > Image Size > Presets.
01:50Let's open up the Presets, scroll down, HD 720,
01:55and we can lock that.
01:56So any time we change this number, the aspect ratio will be locked.
02:01We can always make this smaller at render time if we want to, because it is still
02:06a fairly large image to render.
02:09Let's scroll back up here under Renderable Cameras, and make sure our shotCam is selected.
02:15That way, when we render in Batch mode, we have to change our menu selection to
02:20Rendering, Render > Batch Render.
02:22The shot camera will be the proper camera that is being rendered.
02:27Let's go ahead, and under View > Camera Settings, let's turn on our Resolution Gate.
02:34Now we know we locked in our 1280 by 720 to our shot camera. We can dolly, tumble,
02:42and track, and position our car.
02:45Our next step is we need to create a polygon plane with at least three
02:49subdivisions, and we will try and match that up to the ground plane of
02:53the background image.
02:55We go to Create > Polygon Primitives > Plane.
03:00I like to turn Interactive Creation off;
03:04Create > Polygon Primitives > Plane. Hit R for scale.
03:09Let's scale that up in the Channels box.
03:12Let's select Polygon Plane 1.
03:14Reduce the subdivisions, let's say, to around 5.
03:18We can always increase those subdivisions, or reduce them.
03:22Let's go under View > Camera Attribute Editor.
03:24We are going to scroll down under Environment.
03:29We see the Image Plane > Create button. Let's select that.
03:34Now, we need to browse for our image plane.
03:37We select the Browse button, and in this particular case, we are going to select
03:41our TIFF that we color corrected in Nuke.
03:45Hide the Attribute Editor. Select 4 to turn hardware shading off.
03:50We're now working in a 50 mm lens.
03:54Dolly, tumble, track, and move, and rotate the camera into position in such a
03:59manner so the polygon plane will match the perspective of the road.
04:03Let's scale up our ground plane, maybe make it a little bit longer, and we use
04:09the lines of the ground plane to match the lines of the road.
04:13Let's center the car as well.
04:16Once we are satisfied with our camera positioning, we need to lock our camera.
04:21So let's go back up to View, select Camera, and in the Channels box, we need to
04:25select the Translates, the Rotates, the Scale, and the Visibility.
04:29We simply select the top one, the first Translate X, select the last Visibility,
04:34Shift+Select, right-click, and we lock selected.
04:39Now our camera is locked into position.
04:41So, this is one method to match still plate photography.
04:45If you're using running footage, you might want to check out Matchmoving
04:49Software, such as Boujou, SynthEyes, 3D Equalizer, Matchmover, and PFTrack.
04:56Now that we have our Maya camera, we need to set up our image-based lighting.
Collapse this transcript
Setting up image-based lighting
00:00Now, we can use our HDRI image to begin lighting the geometry.
00:04The workflow I suggest you use is to dial in your image-based lighting first,
00:09then add your physical lights to the scene.
00:12Tweak the intensity of the IBL until it feels comfortable using final gathering
00:17to get the desired look and feel.
00:19Let's go ahead and hide the ground plane; select it, Ctrl+H, and let's open up
00:25our Render Settings window.
00:28Next, let's go to the Indirect Lighting tab.
00:31Next to Image Based Lighting, select Create.
00:34Next to the Image Name, let's browse for our quarter-sized color corrected HDRI image.
00:41Select it, and Open.
00:44It's important to make sure that the Mapping is set to Spherical.
00:47Also, if we scroll down, notice that there is a Primary Visibility toggle.
00:53This is very important, because when we do our final render, we want to make sure
00:58Primary Visibility is set to off.
01:01That way, when we render, we don't see the IBL in the background.
01:05But for our purposes right now, let's select it to on,
01:09so when we are in our viewport, we can actually position the IBL, and view it.
01:14Let's go back to the Render Settings window, and turn on Raytracing, and Final Gathering.
01:20So, under Features, Raytracing; on. Back to Indirect Lighting, and let's
01:25turn Final Gathering on.
01:28Let's just leave these at default settings for now.
01:31And now is a great time to do some test renders.
01:34Let's minimize our Render Settings window.
01:37Render the current frame using mental ray.
01:42So, as you can see, we are starting to get a little bit of lighting in here,
01:46but what we are going need to do is we are going to increase the value of the IBL.
01:52Let's go back to the Render Settings window, Indirect Lighting tab; let's go to
01:57the Image Based Lighting file.
02:00Under Color Gain, let's select the color swatch, and increase the value to 4, and
02:07go ahead and save this render in our render buffer, and let's do another render.
02:14We can always go back to the Color Gain in the Render Settings window, and
02:18dial it in to taste.
02:20If we close our Render view for a moment, let's go to our Perspective view;
02:25spacebar, and then right-click; Perspective View.
02:29Now, let's turn our lighting hardware to 6.
02:33That way we can view our IBL in our Perspective view.
02:38In the OpenGL view, we see a seam where the ends of the image meet.
02:43This is not the most desired effect,
02:45but because we used normal lens, and had paint in the gaps, the HDRI is not
02:51perfectly spherical.
02:52But we can position it in such a way where we will not see that seam in our final render.
02:59Also notice that our sun is coming from the opposite side of the car from where
03:03it needs to be, based on our back plate.
03:06This is because the HDRI image was taken at a much later time of the day than
03:13the early morning of the back plate,
03:15nut this can be corrected in Nuke.
03:18So, let's go ahead and open up Nuke.
03:21We have our color corrected HDRI file.
03:25We view our color correction node.
03:26What we can do is we can add a reformat to flop the sun to the
03:32opposite direction.
03:34So, let's go ahead and hit Tab, type in Reformat to bring the Reformat node
03:39below the ColorCorrect.
03:41Now, under type, we set it to scale.
03:45We make sure the scale is 1.
03:47So there's no change in scale from the original image file.
03:51Now we simply select the Flop node, which takes the sun, and the entire image, and
03:57flops it around, keeping the same scale.
04:00In the Write node, let's go ahead and add the word flopped, with an underscore,
04:08and let's go ahead and render that out, which I already have done.
04:12So, let's go back to Maya.
04:14Back into our Render globals; our Render Settings window. Let's go to our Image
04:19Based Lighting, and now we browse for the flopped version, color corrected.
04:28Now when we view the HDRI in the OpenGL, we notice that the sun is coming
04:34from the opposite side of the car, much more in line from where the sun is
04:38coming in the back plate.
04:40Let's go back to our shot camera, and let's do another render.
04:46Let's put this one in the buffer, and hit Render.
04:50Now, we can look at the different types of images that we get.
04:53We notice here that the sun is coming from the left side. In our new render, the
04:57sun is coming from the proper direction of where the back plate was shot.
05:02Feel free to play around with the rotation and the intensity of the IBL to
05:06create different looks.
05:07Once you have something you like, we need to determine how large to render
05:11our file.
Collapse this transcript
Determining render resolution
00:00The render size I've been using is primarily used for video.
00:04What if I wanted to render for print?
00:06Let's look a little more in depth our render resolution.
00:09In order for us to figure this out, let's open the background image in Nuke,
00:14using our background color correction file. Open up Nuke.
00:18Here we are in our color corrected background file.
00:21We are going to select our last node in the chain, which is our ColorCorrect. Tab.
00:26Let's type in Crop, and add the Crop node below our ColorCorrect.
00:30Let's manually bring in the edges of our crop.
00:34What I like to do is I like to try and leave about the same amount of black
00:37space on both sides.
00:39So, what we're doing is we're going from a landscape image, which is more
00:43horizontal, to an image that has more height than it has width;
00:48something that is going to be much more workable for print.
00:51What we need to do next is we need to jot these numbers down; the width, and the height.
00:56So we have 4620 by 3456.
01:01Now, once we have those numbers down, we go back to Maya, open up our Render
01:06Settings window, turn off Maintain width/height ratio.
01:10That way, the width and the height are not locked.
01:14Let's type in our numbers that we wrote down; 4620
01:18-- and let's minimize our Render window -- by 3456.
01:25Let's minimize our Render Settings window.
01:27Now, our Render view in Maya matches our Crop window in Nuke.
01:33What are we going to render for this course?
01:35Well, since we want to render more for video, we are going to go back to
01:40Maintain width/height ratio, we're going to use our Preset, and we are going
01:44to set it to HD 720.
01:47You might want to experiment rendering a little bit higher. The same aspect
01:50ratio of 177 is also HD 1080, which is what is normally called a 2K image.
01:58Now that we have our render resolution, we need to add lights to our scene,
02:02which we will do in the following chapter.
Collapse this transcript
3. Lighting
Exploring mental ray light types
00:00Since we are getting a majority of our reflections and some lighting from our
00:04HDRI, we still need to add more lights to our scene to enhance the shape of
00:08the vehicle, and also to accentuate areas of the object that might not be
00:12getting enough light.
00:14Adding lights also creates more separation of the object from the background.
00:19If we go under the Create menu, under Lights, we can see a variety of different
00:24lights that are accessible to us.
00:27Typically, I never use ambient lights; I only use directional lights,
00:31spotlights, or area lights.
00:34So, let's go ahead and take a look at our first selection, which is the
00:37Directional Light, and hit the W key.
00:41Let's go into Panels > Perspective, and let's just move that directional light out
00:47of the way, hit the E key to rotate the light, and back to W.
00:52What we can do is we position the light such as we are mimicking the direction
00:59of the sun, based on the back plate that we have.
01:02If we open up our Outliner, if we go under Window > Outliner, I went ahead and I
01:07created three different lights here.
01:09So, let's go ahead and delete the Directional Light, and we are just going to
01:12use the one I already have in here.
01:14And we are going to go to Display, and Show Selection.
01:17So, we can see the Directional Light up here.
01:21One more thing, if we go to Ctrl+A, look at the lights' attributes; we scroll down here.
01:27For each of these lights, I turned on Line Ray Trace Shadows, so we can see what kind of
01:30shadow quality we get.
01:32Close that out, back to Perspective view, shot camera, and render out our first light type.
01:39I just put a Lambert shader on the ground, so we can kind of see the effects of
01:45the shadow, and let's go ahead and save this render in our render buffer.
01:51Directional lights are really good at simulating the sun, but their shadows are
01:55generally too crisp; they have very sharp edge to it.
01:59Also, their specular highlights, bright shiny parts that reflect in the shader
02:04material is generally too focused and round.
02:08The other thing about directional lights that I typically don't like: the light
02:12quality is very even, and I generally like to have pockets of light.
02:18That way, I can accentuate different parts of the car.
02:21Let's take a look at another light type that we have, which is a spotlight.
02:25So let's go back to our Window > Outliner.
02:29Let's go ahead and hide the directionalLight, minimize the Render window,
02:32and I am going to go into Perspective View, just so you can kind of see what I'm doing here.
02:37You can see light type right up over here.
02:40I'm going to hit the Ctrl+H button; hide it.
02:42Let's select the spotlight, Display > Show > Show Selection, and now here's our spotlight.
02:49Another little trick I like to do is I like go into Panels > Look Through Selected.
02:54So let's go ahead and do that.
02:56We can just basically look through the selected light, and that way it's a much
03:00easier way to position the light; make sure that the vehicle or whatever object
03:04we're lighting to is fully framed into our light.
03:08So back to Panels, let's go back to our shot camera, and let's do another render.
03:14We have this one in our buffer.
03:16So now we're just going to hit the Render button; redo previous render in mental ray.
03:22So now let's save that one in our buffer as well.
03:24And let's go ahead and open up the Attribute Editor for our selected light
03:28type: our spotlight.
03:30Ctrl+A. Spotlights are great, because they give us a lot of different attributes
03:35that we don't normally have in other light types, such as our Cone Angle, how
03:40big the cone is, and the Penumbra, which is the falloff, the softness of the cone,
03:45and also the Dropoff.
03:48But as you can tell, spots are particularly good for interior scenes, because
03:54they create soft shadow effects,
03:56but they're also difficult to match to exterior scenes like we have here,
04:00because they really don't mimic the effects of the sun, which leaves us to our
04:05final light type, and that is our Area Light.
04:09So, let's minimize our Render view, and let's close out our Attribute Editor for now.
04:15Let's go back to our Perspective.
04:17We are going to hit Ctrl+H, hide our spotLight, and I created an areaLight in
04:24here, and let's go to Show > Show Selection.
04:27Now, we'll go finally back to our shot camera, and let's go ahead and take a
04:35look real quickly at some of the parameters into our areaLight.
04:40And just to let you know, I turned on ray trace shadows. Let's scroll up.
04:44I cranked up that the Intensity to about 10, and I am able to adjust the Color.
04:49In this particular case, I just made it warm to kind of match the rocks behind it.
04:54Let's go ahead and open up our Render view, and I know we've put that one in our
04:59render buffer, but let's do it again anyway,
05:01and let's go ahead and re-render our shot camera.
05:07Here's our render with our area light.
05:10So you notice that we are getting a nice pool of light closer to where the light source is,
05:16so the light tends to fall off, and we get those big, broad, more specular
05:20highlights closer to the light, which is going to basically require us to add
05:24more area lights, depending upon where we want those pools of light, and where we
05:29want those specular highlights.
05:31But, as we add more area lights, the render times are going to increase.
05:36Area lights are also dependent upon their size.
05:40So, if we minimize our Render view, let's close out the Attribute Editor, and
05:45let's go back to Perspective.
05:46Area lights can be scaled.
05:50So I can scale them in a singular direction, or I can scale them overall.
05:56Keep in mind, as I scale my light, we are going to be throwing more light onto the object.
06:02More light means longer render times.
06:05But, there's also a fine balance between the scale, the coverage, and the
06:09intensity, as well as the render times.
06:12Take some time to create different light types, taking time to change color,
06:16shadows, and intensity to see the different results you get.
Collapse this transcript
Lighting with low quality settings and proxies
00:01Rendering multiple test renders when lighting takes a lot of time.
00:04Here are some workflow tips to help you speed up that process.
00:07Let's go ahead and open up our Render Settings window.
00:11Down in the Image Size, we're rendering HD 720.
00:14I don't want to do test renders in this size.
00:18What I want to do is render something about half that, or a third of that; make
00:23the process a lot quicker.
00:24What we want to do is let's close out of our Render Settings window, and this time
00:28we're going to open up our Render View.
00:31Under Options > Test Resolution, I've selected 50%.
00:36So I'm going to be rendering 50% of whatever is in my Render Settings window.
00:42We're going to be rendering 50% of HD 720.
00:46Let's go ahead and do a quick render; see what we get.
00:50Let's move our Render View off to the side, and let's open up our Render
00:53Settings window again,
00:55and this time we're going to go to our Quality tab.
00:58First thing we want to do is we want to set our Sampling mode to something like Custom.
01:03That way, our Min Sample, and our Max Sample can now be adjusted independently of each other.
01:10So let's set our Min Sample Level to 0, and we'll keep our Max Sample Level to 1.
01:15Next, let's scroll down, and we're going to open up our Raytrace Settings.
01:19I'm going to keep our Raytrace Settings down to its minimum, which is 1, 1, and 2;
01:25Reflections: 1, Refractions: 1,
01:27and Max Trace Depth to 2.
01:31I can always change those higher as we prepare for our final render.
01:35Finally, let's go to our Indirect Lighting tab.
01:38Let's turn on our Final Gathering, and we're going to leave these all at minimum settings;
01:43our Accuracy to 50, our Point Density to 1, and our Point Interpolation to 5.
01:50Now let's do one more render.
01:52Let's save this current render in the buffer, and we're going to redo our
01:56previous render, which is our shot camera.
02:00So now we can see some of the effects of turning on final gather. Let's scrub
02:04between the two images.
02:07Another trick I like to do to speed the render process up, especially when
02:10working with very large scenes or CAD data is to create a low resolution proxy scene file.
02:17We still get the basic shape, but not all the detail.
02:20There is a great way to initially set up the lighting, then we swap out the
02:25low resolution proxy for the higher resolution final model, which is what
02:29we're looking at here.
02:30So let's go ahead and do that.
02:31I'm going to minimize my Render View window.
02:33Let's take a look at the low proxy file I have saved already.
02:37So, we notice in the low proxy file, we don't have a lot of detail, for
02:41instance, like on the wheels;
02:42we don't have all the rims, and the hub caps.
02:45Also notice that the model is much more faceted.
02:47That's because it's not smoothed.
02:49Smoothing adds a lot more geometry to the model, which takes time to render.
02:54So, we are going to want to bring this low proxy model back into our shading
02:59file, and then light that, and then we can swap back out the low proxy file
03:04for a high-res model.
03:06So, let's go back to our shading file.
03:09We're going to open up our Reference Editor.
03:12Let's move this off to the side, so we can kind of see what's happening here.
03:16Let's turn off our high-resolution model.
03:19Now we're going to browse for our low-res proxy in our assets directory, and
03:25here it is: loresProxy.
03:26So now in our Reference Editor, we can see we have both the high-res, and the
03:32low-res, and simply by clicking on these checkboxes, I can go between the two.
03:37Also notice that the low-res proxy is only gray-shaded.
03:40This is great, because I only want to be lighting to a gray-shaded car for now.
03:45I'm only interested in light coverage and values.
03:49I'm not really interested right now in how the light is interacting with the shaders.
03:52So let's go ahead, open up our Render View window, put this one in our render
03:57buffer, and let's do one more render.
04:01That render was much faster than having our fully shaded car in the scene.
04:06Let's minimize that.
04:08Let's go ahead and open up our Reference Editor one more time, and now
04:12let's turn on our high-resolution model, turn off our loresProxy, and now we
04:19can continue lighting.
04:21Notice too that all our shader assignments are still assigned to the proper geometry.
04:26As long as the name of our objects do not change, those assignments
04:30will continue to hold.
04:31So, these are some good ways to make your lighting workflow quite a bit faster.
04:36Now we need to add more area lights to our scene to finish off the lighting
04:40of our vehicle.
Collapse this transcript
Working with area lights
00:00Now that we know what kind of light types we are going to be using -- the area
00:04lights -- let's start lighting.
00:06Let's go back into our Create menu > Lights > Area Light.
00:11We need to scale and rotate this light in the place, taking advantage of our
00:16background image analysis from chapter 1, as well as looking at our IBL in our scene.
00:22So we go to Panels > Perspective.
00:26Let's dolly in, and tumble and track out, hit the W key; let's move the light out.
00:32Let's swing around here.
00:33We notice in IBL that there is a lot more light coming from this general
00:38direction, because this light is going to be our key light, mimicking the sun.
00:42Back to panels, and Look Through Selected,
00:45and let's back this camera out.
00:48We are actually looking through our light right now.
00:51Now back to Panels > Perspective.
00:55Another nice little trick I can do is I can hit the T key.
00:59That gives us another manipulator.
01:00This second manipulator is actually our look at point, where the light is
01:04going to be following.
01:06So let's hit our spacebar.
01:08We look in our top view.
01:09This is just an easy way in which to place the look at point.
01:13So we are looking down; I want to get it centered in the car, and maybe little
01:18to lower here in our front view.
01:20Spacebar, so it goes full screen again.
01:24Notice that on the area light, there is a little toggle that comes out.
01:28That indicates the direction of the light.
01:31We want the light to be shooting towards the car,
01:33so we have to be aware of that toggle.
01:37Now let's move the light more in place where our sun is coming from.
01:44That looks pretty good.
01:46Let's hit our R key, and we can scale the light up.
01:50Maybe make it a little bit wider to get more coverage of the car.
01:54Let's go back to our Perspective View, and our shot camera.
01:58Now let's do a render.
02:00Looking pretty good so far, but there is still quite a bit more work to be done.
02:05Let's minimize our Render View.
02:06Our light is selected.
02:08Let's go ahead and isolate the light, so we are not getting any influence from the IBL.
02:14Let's open up our Render Settings window, Indirect Lighting tab > Image Based Lighting.
02:20Let's scroll down to our Color Gain.
02:23If you will recall from a previous lesson, we set our value to 4.
02:26Let's set our value to 0,
02:29so now we will have no influence from our IBL.
02:34Let's do another render.
02:37Let's save that into our render buffer.
02:39So now we are only seeing just the effects of the light, without the influence of the IBL.
02:45Let's go ahead and take a look at the actual light itself.
02:50So let's close out the Render Settings window for now.
02:53Let's make sure the light is selected right here.
02:55Ctrl+A to open up the Attribute Editor.
03:00Now we are looking at some of the light parameters of our Area Light.
03:04First thing we want to probably do is set the color, maybe a little warmer.
03:08I can just dial this towards warmer color here.
03:12And then using this little icon, we can change the color of the light, but we just do
03:17this very sparingly.
03:20Next, we want to change the intensity of the light.
03:22Right now the car looks quite a bit dark just from that one light.
03:26So let's crank that up, maybe even 10.
03:28Also, let's make sure Emit Diffuse and Emit Specular are both turned on, so we
03:33get both diffuse and specular highlights from our light.
03:37Since our image is now saved, let's do another render.
03:41Obviously, that is bright,
03:43so you might be tempted to adjust the Intensity back down to a lower number,
03:47like 2, but the reason why our light is so bright is because we have no Decay selected.
03:52So we are going to have to set our Decay to at least Linear or Quadratic.
03:59Quadratic decay rates mimics real world decay, where light falls off at a rate
04:04of about a quarter,
04:05whereas Linear decay falls off at around half, meaning every time you double your
04:11distance, you halve the light intensity.
04:15I find that Linear decay reduces clipping of whites, because the falloff is
04:20less abrupt than Quadratic.
04:23Let's keep our Decay Rate to Linear, and let's reset our Intensity back to 10, and
04:28let's do another render, and see what we get.
04:32Starting to look a little bit better now.
04:34Let's scroll down here, and the last parameter we are going to look at is Use Light Shape.
04:40We want to make sure that we are using a Rectangle light shape.
04:45This translates the Maya area light to use with mental ray.
04:48Since we are using a Rectangle area light, we need to set this to Rectangle.
04:53This translation will ensure the light performs according to the input parameters.
04:57You will notice several other shapes that area lights can be set to.
05:02We have Discs, Sphere, Cylinder, Custom;
05:04there is not a huge visual difference between the shapes,
05:08but there does seem to be changes in the shape of the shadow.
05:12So experiment for yourself to see which shape might work best for you.
05:16In the meantime, let's set this to Rectangle.
05:20Let's do one more render.
05:22Now that we have our key light in our scene file, we need to further fine-tune
05:26it to get our desired results.
Collapse this transcript
Setting light samples
00:00One of the most important parameters we need to address when improving the
00:04quality of our area lights are light samples.
00:07If we were to leave our samples set to the default settings, we get a lot
00:14of grain and noise.
00:15Here is a render that I did with our area light, which is our key light, set to
00:19our default settings.
00:20Notice quite a bit of noise and grain in the image.
00:24Let's look at the sample settings get a better idea on how to fix these issues.
00:28Minimize the render window.
00:30Let's select our area light, and we're going to hit Ctrl+A to bring up the parameters.
00:36The area light sample settings are under the Area Light rollout, and we set our
00:42light shape to a Rectangle.
00:44The default settings are 8 for High Samples.
00:47The High Sample Limit is set to 1, and the Low Samples are set to 1 as default.
00:52High Samples are the amount of samples that get shot toward the light when an
00:57I-ray strikes an object.
00:59This is the most important level of quality.
01:02The larger and closer the area light, the more samples you need.
01:07The High Sample Limit can be set lower than the High Samples.
01:11Once this number of combined reflections and refractions is exhausted, the sample
01:16can draw fewer samples, as defined by the Low Samples setting.
01:20The Low Samples are the amount of samples to draw from, a sample taken after the
01:26number of reflections and refractions in the high sample.
01:29If Visible is checked, the area light will be visible in the render.
01:34For our purposes in this course, we want to make sure that the Visible
01:37checkbox is unselected.
01:39If it is selected, then we actually see the shape of the light.
01:43We don't want to see that,
01:44so make sure that Visible is unselected.
01:48Changing the Area Light samples reduces grain, not only the shadows, but in the
01:54highlights, and lit areas as well.
01:56Let's reset the High Samples to something like 64.
02:00Let's set the High Sample Limit to 32, and the Low Samples to something like 16.
02:06So basically, it's a cascading array of numbers.
02:10The High Sample Limit is typically the highest, and the Low Samples is
02:13typically the lowest.
02:15So now let's do another render and we can compare.
02:18So let's open up a render view.
02:19This time let's create a render region.
02:22So I'm going to just select that portion of the car, and now we're going to hit Render Region.
02:29Let's save this render in our render buffer, and now we can compare the two renders.
02:33This was our render with the samples set to default, and this is our new render
02:38with a higher sample limits.
02:41If we look at the difference, we've eliminated the grain.
02:45Let's go back to the light in our Attribute Editor, and these are some of the
02:49production quality settings I typically use.
02:52So we can set our High Samples to something like 256, our High Sample Limit
02:58maybe to 64, and our Low Samples we can either do 64, or maybe even 128.
03:05I would suggest that you play around with these numbers to see what best suits
03:09your needs to get the grain and the noise reduced, but also keeping render times low.
03:15But for a photorealistic image, you need shadows,
03:18so let's next look into how to set up shadows.
Collapse this transcript
Using raytrace shadows
00:00In real life, whenever we have light and an object, we usually have a shadow.
00:05Right now we don't have shadows on.
00:08Let's look at some of the shadow parameters we need to address with our area lights.
00:12So, if we select our area light, and we hit Ctrl+A, we'll bring up the parameters
00:17of the selected object.
00:19Let's scroll up to Shadows.
00:22Our first parameter is our Shadow Color.
00:25I generally leave the Shadow Color to Black. With final gather on, it will add
00:30indirect lights to our scene, lifting shadow color by default.
00:34If our background plate that we shot has lighting that shows very little
00:38shadow detail, we can simply increase the value of the shadow color. We simply
00:42select the Shadow Color, and increase the value.
00:47You'll notice that very small increments make a big difference,
00:50so I typically leave this to a very small number.
00:53So let's bring it back to black.
00:54We're going to render with a black shadow color.
00:58Next we have Depth Map Shadows.
01:01Depth map shadows are generally not used when ray tracing.
01:06Depth map shadows are a type of shadows that are rendered out, and saved to disk,
01:09so you actually have a physical shadow map file.
01:13Those shadow maps are then mapped back into the light.
01:15Since we're ray tracing, Use Depth Map Shadows are not going to be in use.
01:22So let's close that pulldown.
01:24Now we are going to use Raytrace Shadow Attributes, and we're simply going to
01:27Use Ray Trace Shadows.
01:30Let's take a look at render, and see what we get.
01:33We can see the shadows affecting the areas of the wheels, as well as the tires,
01:37creating shadows on the body of the car.
01:40We can easily control the shadow quality by the amount of rays, and the depth limit.
01:46I typically like to keep these to default; 1, and 1.
01:50We can open up our Render settings.
01:53In the Raytracing pulldown, in the Quality tab, there's a Shadow quality
01:57setting right here.
01:58This is a global quality setting.
02:00This global quality setting will set the shadow quality overall to all our
02:06lights in our scene.
02:08I typically set it to 2, but let's not deviate too far from that.
02:13Now that we know how to manage our lights, next let's add some additional lights
02:18to accentuate the body lines, and to better integrate the car to the plate.
Collapse this transcript
Lighting the body lines
00:00We have our key light and our HDRI starting to get dialed in,
00:03but looking at our render, I still want to see more body lines, and the concept
00:07car more integrated into the plate.
00:10What we're going to have to do is we are going to have to create couple new lights.
00:14The first one is going to be an area light that is just going to
00:18accentuate those body lines.
00:19So let's minimize our render view.
00:20Let's go into to Panels > Perspective,
00:22then select our key light; Ctrl+H to hide.
00:26Create > Lights > Area Light.
00:29Hit the number 4 on our keyboard, and then the letter W. 4, just so we can
00:35turn off hardware shading.
00:36Kind of easier to see it.
00:39Lets hit E, rotate the light, and now R to scale it.
00:44We're going to get it nice and narrow, and really long. W key, and now let's
00:49just move into place.
00:51Something like that.
00:54Let's hit the spacebar.
00:56We're going to go into the top view.
00:57Just rotate it, so it's in line with the car.
01:00Something like that.
01:01Middle-mouse button, perspective view, spacebar;
01:06now let's Look Through Selected.
01:07This is always very helpful.
01:11Get much closer on it; kind of get a downward angle on it.
01:15Something like that.
01:17Panels > Perspective.
01:21Now let's scale the light a little bit longer, and maybe a little bit over too,
01:24so we are getting the whole car.
01:26Let's go ahead and open up our Attribute Editor for our selected object.
01:32We're going to use a Rectangle light.
01:35Let's turned on Ray Trace Shadows, and let's turn on Linear Decay, and let's crank up
01:42our Intensity, maybe to around 5.
01:45Close out of our Attribute Editor for now.
01:47Back to Panels > shot camera, and let's open up our Render View.
01:53Let's go ahead and save this render in our render buffer, and let's just
01:59select the car here.
02:01All we have on our scene is just the IBL, and our new body lines light.
02:06So now let's render the region.
02:09So, let's kind of compare the two.
02:11What we need to do, if we hit the Ctrl+A button,
02:16we're going to get our Attribute Editor, and we're going to want to set our High
02:20Samples to some thing like 64, because we're getting some noise in here.
02:24High Sample Limit to 32, and our Low Samples, maybe to 16, and then also
02:31let's rename this light.
02:33Maybe we'll called bodyLines.
02:36Now that we have an area light that accentuates the body lines of car, we still
02:40need to add a third area light behind the car that is going to accentuate the
02:46back of the car, and act as a bounce light from the rocks behind.
Collapse this transcript
Adding a bounce light
00:00So, the next step is we need to add some bounce light to make it feel as though
00:04the light is bouncing off the rocks from behind.
00:07This is frequently used by photographers to really integrate an object into its
00:12surroundings, and we kind of want to the same thing in CGI.
00:15So let's go ahead and do that.
00:17Let's minimize our Render View, select our bodyLines area light, and Ctrl+H to
00:22hide it, and now let's go ahead and go to Create > Lights > Area Light.
00:30Panels > Perspective. So let's move the area light to the back of the car this time.
00:38This is the light that's coming off the rocks from behind the car, and I am just
00:43going to manipulate the light, moving it, scaling it, rotating it into place.
00:49Let's hit E to rotate the light, and now R to scale it.
00:53We are going to get it nice and narrow, as we can see here.
00:56Now let's go into Panels > Look Through Selected.
00:59Let's get a little bit higher on the car; center it in frame.
01:03Let's go back to Panels > Perspective.
01:07Bring up our Attributes for the light; select Ctrl+A. We are going to set the
01:12Decay Rate to Linear.
01:14Shadow Color is to black, by default.
01:17Use Ray Trace Shadows, and we have to select Use Light Shape,
01:22so mental ray knows that the area light that we want is a Rectangle.
01:27Since our Decay Rate is Linear, let's really bring up that Intensity, maybe to
01:31around 15, and let's go ahead back to Panels > shot camera, and let's do a render.
01:40Save that one in our buffer.
01:41Make sure this time, though, that we are rendering the shot camera.
01:47There's a couple things that we are going to have to address.
01:50We are seeing quite a bit of noise here, which is an artifact of our specular
01:54highlight, and we're going to want to change the color of the light to more
01:58closely match that of the background.
02:01So let's just move the Render View out of the way. With the area light selected,
02:07we are going to hit Ctrl+A to bring up the Attribute Editor.
02:10In order to get rid of that specular noise, we are just going to simply select
02:14Emit Specular off.
02:16So now the area light is only going to emit just diffuse.
02:19Let's bring up the Intensity, maybe to around 20, and finally, with our Render
02:24View open, we can select the color swatch, and in here there is a little color
02:29picker, and let's go in here and we can select different areas.
02:33As you can see, the color now matches where I just selected.
02:37So let's go back to the color picker.
02:39Let's pick, maybe, a lighter area. There we go.
02:41That looks pretty good.
02:43Let's put this one into our buffer.
02:46Now let's do another render, and see what we have.
02:49That's starting to look pretty good.
02:51We are starting to get some light wrap from behind the car.
02:54Let's compare it to our previous render, and we got rid of a lot of that
02:57specular noise as well.
02:58So the last step we want to do is we want to actually change the name of light,
03:03so each light in our scene, we know what they're called.
03:06With the light selected, let's go over here to the Channels box, and let's just
03:11call this bounceLight.
03:12So, if you have lit objects from behind, make sure you add bounce lights to
03:17further enhance the realism of your images.
Collapse this transcript
4. mental ray Rendering
Using render layers
00:00Since we're going to be rendering output passes, like diffuse, specular, and
00:05reflection, we need to create render layers to tell Maya that we want those
00:09passes rendered exclusively for a specific set of geometry.
00:13Each render layer can then be composited separately, giving you much more control
00:18in your final composite.
00:20If we go into our Perspective view, we can add geometry a couple different ways.
00:25We can either select everything here in the viewport, or we can go to
00:30Window > Outliner, and then we select the geometry, and then add the render layer that way.
00:36Let's do it in the viewport instead.
00:38I am going to just select my geometry in here.
00:42Then I am going to select this icon, which basically means we are going to add
00:47the selected geometry to a new render layer.
00:50Next, we are going to select the new render layer.
00:53We are going to double-click, and inside we are going to give our render layer a name.
00:59In this particular case, let's call it Car.
01:01Let's switch back to our masterLayer.
01:03Notice that we don't have our IBL icon attached to our new render layer.
01:09Let's go back to our new render layer, and we can add any geometry to our new render layer.
01:16So how we do that is we simply right-click, and we say Add Selected Objects.
01:22Now our IBL icon is associated with that render layer.
01:26Had we not done that, and we rendered our Car render layer, we would not be
01:30getting the effects of the IBL on that render layer.
01:33The next step that we want to do is we want to go into our Render Settings
01:38window, and under the Common tab, we need to rename our file name prefix.
01:44So let's right-click in the area, and this time we are going to
01:48select RenderLayer.
01:50As you can see, Maya is smart enough to give us the correct path of where our
01:55render layer is going to be going, and what our file name is going to be called.
01:59Our file name is now going to be called Car.tif, which is the same name as our render layer.
02:06Another thing we can do is we can actually instruct Maya to render this
02:11RenderLayer into its own folder outside of the images folder.
02:15For instance, I can now say Car, add a forwardslash, hit Enter;
02:21now the path name changes.
02:23So now we are going to be rendering to images, a new directory called Car, and
02:29then the file name called Car.tif.
02:31This just gives us another added layer of control for more organization.
02:36This is very good when multiple artists are working on a single asset.
02:39Their outputs do not want to be populating the same directory.
02:44Now that we have singled out our vehicle to render on its own, we need to render
02:48out passes associated with this render layer.
Collapse this transcript
Setting up render passes
00:00One of the great benefits of using render layers is that we can now render
00:04unique passes associated with the selected render layer.
00:07This gives us a lot of flexibility in our composite, where we can make
00:11adjustments to a single pass.
00:13Let's take a look at how we can create these render passes.
00:16Here in Nuke, I'm going to show you what these passes actually look
00:20like separated out.
00:21So here's our car render layer that we rendered out, and here is our ambient
00:26occlusion which I call AO.
00:28I'm simply hitting the number 1 button, so our viewer is now viewing that node.
00:33I can also just grab the Viewer node, and move it to a different node.
00:36So now we're looking at our Indirect pass, Specular, Reflection, and Refraction.
00:44If we were to add all these up using the Merge add node, we would end up with the
00:49same render that we started with.
00:51Let's go back to Maya, and see how I output these render passes.
00:56Here in Maya, I have to make sure, first and foremost, that my Car render layer is
01:02selected. That way, when I go into my Passes tab, any associated passes I add will
01:08be added to my Car render layer.
01:12Let's go back into our Render Settings, and Create new render pass.
01:17Now we have this big list that comes up. Let's go ahead and find those passes
01:21that I rendered out.
01:22First one is Ambient Occlusion, and now let's scroll down; we can use this side
01:27scrollbar here. Holding down the Control button, I'm adding a selection; in this case,
01:33Diffuse. Let's go ahead and add Indirect. Let's continue down. Let's go ahead
01:38and add Reflection, Refraction, and finally, Specular.
01:44And we can say Create and Close.
01:47Since these Render Passes are up in here in the scene selection, we still have to
01:51associate them with the render layer.
01:54So let's select this button right here, which associates the selected render
01:58passes to that render layer.
02:01Next, let's go back to our Common tab.
02:04Right now we're only rendering out images, car.tif. If we want to render out
02:09separate render passes, we simply right-click; go down to our render pass name,
02:16let's insert a forward slash, and hit Enter.
02:20Now we're rendering to Concept_Car/images, to a directory called Car; within that
02:27directory, we're going to be getting our associated render passes. Let's go ahead
02:32and open up our Hypershade window. Go to Window > Rendering Editors > Hypershade.
02:40Notice that each of these shaders is a mia_material_x_passes shader. This is very
02:45important. If these materials don't have the x passes truncated on to the end,
02:52then when we render out our render passes, these passes will not render.
02:58So we select mental ray, we scroll down, and notice several of the shaders have
03:06passes associated to them.
03:08In this particular case, we're using the mia_material_x_passes.
03:12Now we know that our passes will be rendered out when anything is assigned to
03:16that object with that shader.
03:19To properly composite these passes, we must make sure they have the highest
03:23bit depth available,
03:24so let's examine how to make these passes 32-bit.
Collapse this transcript
Creating 32-bit files
00:0032-bit images are great at showing values brighter than white, and subtle
00:04variations in hue and tone.
00:0632-bit images contain millions more colors per pixel than 8-bit and 16-bit images.
00:12Let's compare this in Nuke.
00:14So, here is my rendered car, and my associated passes.
00:20Let's use our specular pass to show the comparison between 32-bit, and 8-bit.
00:26Let's view our specular pass here in our 32-bit, and here I rendered out a
00:30separate 8-bit pass that I'm only going to be using here for
00:34demonstration purposes.
00:35Already, you can see a huge difference, not only in the brightness of the pass,
00:42but also in how the brights are maintaining their highs, and the darks
00:47maintain their lows.
00:49So, I simply select my node, I'm hitting 1, I'm on the specular pass for my 32-bit,
00:55and here on my 8-bit, I'm selecting 2, and I'm just toggling between the two.
01:01To show you a little more in depth what I'm talking about, let's go ahead and
01:04add a glow node onto each of these images.
01:07So I'm going to hit Tab. Let's type in Glow, and let's just view that first
01:13in our 32-bit image.
01:14So now we can kind of see the difference.
01:15I'm going to go between 1 and 2 here; so we add some glow.
01:20And let's go ahead and add some color; make it pretty saturated. Let's close that out.
01:28What I'm going to do is I'm going to simply Ctrl+C, Copy that node. I
01:32select my Reformat, because I rendered it out a little bit smaller than
01:35HD. Ctrl+V for Paste.
01:38And now I'm going to put that on my Render buffer 2.
01:42So now my glow is on number 1 for my 32-bit image, and number 2 for my 8-bit image.
01:48This just really further enhances the idea that when you add color corrects,
01:54and other operations, like glow, 32-bit images are very important to render out from Maya.
02:00So let's go into Maya, and see how I did that.
02:02Let's open up our Render Settings window, go to our Passes tab, and our Associated
02:09Passes, to our Car render layer.
02:12For our ambient occlusion pass, we do not have to set this to 32-bit; it's just
02:16simply a black and white image that we're going to multiply into our comp.
02:20But for our diffuse, our indirect, our reflection, our refraction, and
02:24our specular we will.
02:26Let's double-click each render pass, and change them individually. Under Frame Buffer Type,
02:32let's open up the rollout, and select 32-bit Float. Indirect, reflection,
02:43refraction, and finally, specular.
02:48This only affects the render passes. There might be some other things that you
02:53render in your scene other than the passes.
02:56Now we have to set the entire Maya file to render 32-bit.
03:00Let's go to our Quality tab, let's scroll down to the bottom to the Framebuffer.
03:07Let's open up that rollout, and under Data Type, right now any other elements in
03:12our scene would render at 8-bit. To ensure that everything renders in 32-bit,
03:17let's scroll down, and under RGBA (Float) 4x32 Bit, let's select that.
03:24RGBA (Float) 4x32 simply means four channels, the R, G, B, and A, will now render at 32-bit.
03:33So when rendering your render layers and passes, make sure your settings are
03:38at 32-bit.
Collapse this transcript
Adjusting the render quality settings
00:00A quick word about quality level settings in mental ray.
00:04Notice here, I pre-rendered an image that I have set to low quality.
00:10Unfortunately, rendering low quality produces aliasing artifacts, jagged edges,
00:15as you can see here in the image.
00:16This is okay, because I'm not actually going to be rendering out and saving
00:20these images for final output, but what I am going to be doing is just doing
00:24quick test renders.
00:25I'm going to show you those settings, and then I'm going to show you how to get
00:29better quality settings for final output.
00:31So if we go into our Render Settings window, here in the Quality tab, we have to
00:35make sure that are Sampling mode is set to Adaptive, which simply means that both
00:39the max and min samples are going to be constrained.
00:43So for low quality settings, -2; Max, 0. Maybe for high quality, I typically go with
00:50something around 0, 2. Anti-aliasing Contrast threshold; low quality settings, .1.
00:57When I want to render my final quality settings, .05.
01:00Multi-Pixel Filtering, low quality settings, I set to Box Filter Size in X 1, and
01:11the Filter Size in Y 1.
01:14For final renders, let's set that to Mitchell, which automatically sets the
01:19Filter Size to 4, 4.
01:21Scrolling down here, Raytracing; Reflections 1, Refractions 1, Max Trace Depth 2.
01:27Final quality settings, I typically do something around 2, 2, and 4. Okay.
01:34Now, if we take a look real quickly at the difference between low quality
01:38settings, and a high quality setting, that would be our difference.
01:43But notice render times are quite a bit higher.
01:47We go from around 48 seconds to about 5 minutes.
01:50Let's jump over here real quick to our Render Passes.
01:54When we do test renders, we want to make sure our Render Passes are set off,
01:58especially when we are rendering batch mode, because when we render in batch
02:02mode, that's when the render passes are output.
02:04So there is couple of different ways we can turn these off.
02:07One way is we Shift+Select all the passes, and we can de-associate the passes.
02:13Now they're not going to be rendered.
02:14Let's put them back down into the Associated Passes section.
02:18The second way we can do that is we select Shift+Select again,
02:22right-click > Set Non-Renderable.
02:24Just remember that when you are ready to batch render, or render on a render farm,
02:29we have to make sure that we are going to set these back to Renderable.
02:32So that's just to real quick overview on how to get our render settings both to
02:36a low quality, and high quality, and hopefully save you some time in the
02:40rendering process.
Collapse this transcript
Explaining final gathering
00:00We need to talk a little bit about final gather.
00:02Final gather in mental ray is like a global illumination cheat when global
00:08illumination is not set.
00:10Final gather is mental ray's method to calculate diffuse reflections, where light
00:15bounces from non-reflective surfaces.
00:18This gives a render a lot more realistic look, especially when large
00:22light sources are used.
00:24As we've seen, I am using large light sources in our area lights.
00:27So this is just another great reason to use area lights.
00:31So let's go ahead and look at our final gather settings.
00:34With our Render Settings window open, we're going to go to our Indirect Lighting
00:38tab, and we're now going to go under the Final Gathering rollout. Let's scroll down.
00:44Open this up.
00:45What I have here are my lower quality settings.
00:48So here in our Render View, these are my lower quality settings.
00:53We are going to increase our Accuracy, which is how many rays are used during
00:59the render of the final gather.
01:01Higher values are going to improve quality.
01:03So let's go from 50, which is our lower quality setting, to something around 200.
01:09Next, let's look at Point Density.
01:11The more final gather points in the scene, the better.
01:14So, the Point Density increases the amount of final gather points.
01:19Our low quality setting is .5.
01:21Let's set our higher quality setting to maybe around 1.
01:26The Point Interpolation increases to smooth the render.
01:30It is not as accurate as increasing your Accuracy, but it is a much faster way
01:35to improve the quality.
01:36So lower quality setting, I typically leave it to around 5.
01:41Bring that up to maybe around 30 for a higher quality setting.
01:45So these are my high quality settings now.
01:47Lastly, let's look at the Final Gathering Quality rollout, and we notice that
01:52there's a Filter number here.
01:54Always set that the final gather quality filter to 1.
01:57As you increase this, less spots will be visible in the final render.
02:02Now, I keep this setting to 1 for both low and high quality renders.
02:07By increasing the number doesn't necessarily increase the time of the render,
02:10so let's just keep that at 1.
02:13Experiment with different settings, and see what works for you, but the settings
02:16I've described above should work really good for this course.
02:20Our last step in setting up our renders is to add ambient occlusion.
Collapse this transcript
Rendering the final image
00:00A quick word about our file format before we render out our final lighting file.
00:05We have all our lights, geometry, and IBL assigned to a unique render layer called Car.
00:12Right here is our render layer Car, and our lights, our geometry, and our IBL
00:17are assigned to that render layer.
00:20Let's open up our Render Settings window, or just bring that forward; it's
00:24already opened up, and we have to change our image file format to OpenEXR, so
00:29let's scroll down, and select OpenEXR file format.
00:34Make sure the File name prefix is set to RenderLayer only.
00:38Right now I have RenderLayer/RenderPass, so let's clear out that selection,
00:42and right-click, and we're going to scroll down here, and say Insert layer
00:46name <RenderLayer>.
00:48We have to make sure that the File name prefix is set to RenderLayer only,
00:52because if we include the RenderPass, then when we batch render, you'll only get
00:58passes into separate files.
01:01You'll find it quite a bit easier to have a single .exr file, and then extract
01:06those passes manually in Nuke,
01:08but you should try both ways to see which works best for you.
Collapse this transcript
5. Creating Secondary Passes
Rendering matte passes
00:00In order to color correct, or make changes to parts of the vehicle in Nuke, we
00:05need to single out bits and pieces of the object.
00:08To do this, we need to assign and render individual parts of the geometry: Red,
00:13Green, and Blue; primary colors that can easily shuffled out to white by the
00:18Shuffle node in Nuke.
00:19And then we can use that as a matte to do any number of different color corrections.
00:25So, for example, if I want to darken down just the paint, let me put a Shuffle
00:30node on the paint matte that I created.
00:33We're going to hit the Tab button, let's type in Shuffle, and let's set this all
00:39to red, because that's where all my paint is.
00:43That sets the paint to white.
00:45Under the Grade node here, let's hit the Tab again, and let's type in Exposure,
00:50just to darken it up a bit.
00:52Now let's bring our mask up to our Shuffle, and we have the Exposure node in
00:58our Properties, and now let's just view the Exposure node, and bring down just the paint.
01:05What it basically is doing is it's isolating bits and pieces of the car, so now we
01:10can make color changes.
01:12Now let's go over to Maya, and I'm going to show how I actually output those passes.
01:16So, in Maya, what I first like to do is let's select the entire car, and let's
01:23create a couple of different render layers.
01:26I think what I did is I actually created four of them.
01:29So we are going to double-click on each render layer, and we're going to say M1, for Matte 1.
01:34We're just going to our work our way up.
01:39So we go back to our M1 render layer.
01:42Now we open up our Hypershade window;
01:44Window > Rendering Editors > Hypershade.
01:49Now, for each one of these, I am going to have to assign what I call the blackHole shader.
01:53Let's double-click that, open up the Attribute for that, and all it is just a
01:56Lambert shader, and you could put any color on it.
01:59I like to do anything other than black, so when I assign constant colors -- the
02:04Red, Green, and Blue -- then you can easily see the geometry.
02:07The other thing I like to do is set the Matte Opacity to Black Hole, because
02:11that will just give us a lot more flexibility in my composite.
02:14So let's close out the Attribute Editor, and so for each one of these render
02:18layers, I'm going to just select my geometry in here, and now let's just
02:24right-click, Assign Material.
02:25Let's go to M2, and assign to selection, and then M3, and then M4.
02:36We need to create our Surface shaders with the constant color on there.
02:41Notice, I already have my green and my blue already created.
02:44I'm going to show you what I did in order to do that.
02:48I just went down here to Surface Shader. Let's make that a little bit easier to see.
02:52Let's bring up the Attribute by double-clicking, and under the Out Color, we just
02:56select Red, Green, or Blue.
02:58Well, since I don't have Red, let's just select that one. Close that out.
03:02So now we have all three primary colors.
03:05So, let's go back to our M1.
03:08Window > Outliner, let's open up our conceptcar, and we can select, let's say, our sheetMetal.
03:15In our Hypershade, we had it selected to red, so we right mouse click over our
03:21red shader, Assign Material to Selection.
03:23Now let's go back to the Outliner. Let's select our windows, and I believe they
03:31were blue; right-click, assign selected.
03:35Lastly, the little piece here in the front, and I think we assigned that to green,
03:39so we right-click, assign material.
03:43So now, for each of these render layers, we would canvas the car, and select
03:49different pieces, just as I have done here in Nuke.
03:53So, for instance, on our M2 layer, I cover the wheels. On our Matte 3 layer, I
03:59got the little bits and pieces of the front of the car where the headlights are,
04:03and the trim around the windows. And on our M4 layer, I got the interior.
04:09So let's go back to Maya one more time.
04:12Let's open up our Render Settings window.
04:14What I did here is, in the File name prefix, I make sure that we have
04:19RenderLayer/RenderLayer, and this simply means that each of the render layers
04:25are going to render into a separate directory, with its own unique name.
04:30Under images/M1, and then M1.exr, or whatever file extension you're using.
04:37Also, under Features, I turned Raytracing off, and finally, Indirect Lightning, I
04:42turned Final Gathering off.
04:44We don't need those when we're creating mattes.
04:47So the final step would be to do a batch render to get all the render layers into Nuke.
04:52So let's close out our Render Settings window, and I just want to change the
04:55Perspective to shot camera (ShotCam).
04:58Let's just simply go up to Render, and Batch Render.
05:02Once I select that, we are going to start to render with mental ray.
05:07So that is one way to create matte passes in Maya, and how to use them in Nuke to
05:10isolate and color correct parts of an object.
Collapse this transcript
Creating a ground occlusion pass
00:00This is a good time for us to create a way for the vehicle to look grounded
00:04onto the road surface.
00:05I like to create two separate passes for this.
00:08The first pass is an occlusion pass, just for the ground, where the wheels come in
00:13contact with the ground,
00:14and also we see darkening where the body is over the road.
00:17And then the second pass is actually a shadow pass.
00:20But let's start with the occlusion pass first.
00:24I can start with any of my lighting files, and I like to strip the file out of
00:28the IBL, and the area lights.
00:31So, first thing we've to do is create a new render layer. Let's open up our
00:35Outliner to select our geometry.
00:37We go to Window > Outliner. Let's select the shot camera, the concept car, and the ground plane.
00:45Now we are going to create a new render layer, and rename that default render
00:50layer to something like groundAOC; ground ambient occlusion.
00:55Let's display our ground plane; Display > Show > Show Selection.
01:00Next, we're going to want to create a shader to apply to all the geometry in the
01:04scene. We have to go into our Hypershade, so Window > Rendering Editors > Hypershade.
01:12First thing we need to do is create a Surface Shader. As you recall from previous
01:16lessons, a surface shader is not affected by any lights in your scene,
01:19so it just renders flat.
01:22Next, let's select mental ray, and type in amb.
01:27This will just shorten the list to provide us a quick way to get the ambient
01:30occlusion texture map. Let's move this off to the side; middle mouse button,
01:35Click+Drag over the surface shader, and select Default.
01:39By selecting Default, the connection will be made to the surface shader's Out Color.
01:44We can confirm this by double-clicking the Surface Shader, bringing up it's
01:47Attribute Editor, and noticing now that the connection is made to Out Color.
01:51If we select the arrow, that will now show us the parameters for the ambient
01:56occlusion texture map. We need to now assign our shader to all our objects in our scene.
02:03So let's push this off to the side, and we're going to select everything in our scene.
02:09Right-click, Assign Material To Selection.
02:12Let's open up our Render Settings window, and let's just make sure Raytracing is set to on.
02:18Let's render out our scene, and see what we get.
02:20So, there are a couple things we have to address here.
02:24First, we have to make sure that the primary visibility of the car is set to
02:29off, so we're not seeing the car; we're only going to get the occlusion on the ground.
02:33Secondly, we don't want the image plane in our final render, so we're going to
02:37have to turn that off.
02:39So let's go ahead, save that in our buffer, and let's do that.
02:43So let's Shift+Select our ground, so it unselects it,. We're going to go to
02:48Window > General Editors > Attribute Spread Sheet.
02:52In the Render tab, we're going to select Primary Visibility, and we're going to type off.
02:57Now all the objects that are selected, their prime visibility is going to be turned off.
03:03Next let's go into View > Image Plane, and let's select our Image Plane.
03:10We're going to turn the Di,splay mode to None. Let's render out our scene and see what we get.
03:16We're almost there. We're noticing that there are some issues with the quality of
03:21our render, so we're going to have to address those now too. Let's save that in
03:25the render buffer. Let's open up the Hypershade one more time, so we have access to the shader.
03:30Let's double-click the material, and let's set the Samples to something like 32;
03:35increase the quality.
03:37And one last thing is, we notice that the spread where the occlusion shader is
03:42rendering too far out from the object. We want to bring that in nice and tight,
03:47so let's bring the spread maybe to half; something like about .4, and let's render that out.
03:55And now let's compare our two renders here.
03:56So the quality got better, and the spread got brought in a little bit.
04:02Now that we have our ground occlusion pass, we need to create a ground shadow pass.
Collapse this transcript
Creating a ground shadow pass
00:00So, as I mentioned earlier, I like to mix the ground occlusion with the ground shadow.
00:06Let's use our latest lighting file to spawn from in order to create
00:10the groundShadow file.
00:12The reason is because we already have our key light in there, and we don't have
00:16to re-create a key light just for this file.
00:18So here we are in the groundShadow file I made from my latest lighting file, and
00:23the first thing we want to do is we want to select the key light, and let's make sure
00:30the color of the key light is set to white, because the end result is we just
00:34want a black and white image. We don't want much color in this.
00:37So let's select the color swatch, and let's just set to white, and now let's open
00:43up our Outliner. Window > Outliner, and we are going to select just the elements we
00:50want in our new render layer, which we are going to call groundShad.
00:55So, the key light, the ground plane, the shotCam, and the car.
01:01So let's go over here and select the icon, which is going to create a new
01:04render layer with just the selected objects. Double-click; I am going to call this groundShad.
01:11Next we are going to want to assign a white Lambert Shader to the ground.
01:18Window > Rendering Editors > Hypershade, and let's create a Lambert Shader; a new one.
01:26Double-click, let's select the color to white, select our ground plane, and let's
01:32assign that material to the ground plane. Minimize that.
01:37In our ground shadow renderer, we do not want the car's primary visibility on, just
01:42like we did in the ground ambient occlusion.
01:45Let's select the car Window > General Editors > Attribute Spread Sheet. In the Render
01:52tab, Primary Visibility let's turn it off. Let's close that.
01:58Finally, what we are going to want to do is create a unique shadow render pass.
02:04We go here to Render Settings, and now we select Create new render pass.
02:09It's going to give us our list. Since they are alphabetized we just scroll down;
02:15here is Shadow. Create and Close.
02:18Now we need to drop that shadow down into the Associated Passes.
02:22Notice I'm doing this while on the ground shadow render layer.
02:27That means that this shadow pass is only going to be associated to this render layer.
02:32Double-click the shadow pass, and now we can set the Frame Buffer Type to what we
02:38like; maybe 32-bit Float.
02:40Let's go ahead and render out, and see what we get.
02:46To make our compositing easier, we do not want to render on black, so we are going
02:51to set the camera background to white. Under View > Camera Attribute
02:54Editor > Background Color, white.
02:59Let's put this render in our buffer. Let's do another render.
03:04So now we should be ready to batch render.
03:08Once we have batch rendered -- let's go to Nuke, I have a pre-rendered one right
03:11here; our ground shadow, notice it's on a white background now.
03:14This will make it a lot easier when we mix it with our ground ambient occlusion
03:19to our back plate in Nuke.
Collapse this transcript
Adding ambient occlusion
00:00Ambient occlusion is a black and white render pass that is an approximation of
00:05global illumination that darkens pieces of geometry that are in close proximity
00:10to one another, and that will add a more realistic effect to our final image.
00:15So here I have a pre-rendered image of our ambient occlusion render pass, and as
00:21you can see, on the side here where the surface geometry is not close to another
00:26piece of geometry, it's all white.
00:29As the geometry gets closer to other pieces of geometry, we get a darkening
00:34effect, and we're going to want to bring that into our composite, and
00:38multiply that, which is just going to give us a more realistic render for our final output.
00:43So, there are a couple of different ways in which to create this ambient occlusion
00:47pass, and let's go into Maya, and I'm going to show you those different ways here.
00:52The first way is in our Render Passes, we have the AO, which is short for ambient
00:59occlusion, and we can bring that down into our Associated Passes,
01:05and we can double-click that to bring up its parameters.
01:08And we now can set the Frame Buffer Type to either 8-bit, 16-bit, or 32-bit.
01:15Now, since we are using the ambient occlusion as just a black and white pass,
01:20it's really not necessary to render it out at 32-bit; it just adds a little
01:24more render time in the final stages of the render when it's rendering all the render passes,
01:28so let's just keep it to 16-bit for now.
01:32If we scroll down here, we have a set of parameters that we can now dial in
01:37specifically for that render pass.
01:40When we render this out we will get, along with the indirect, reflection,
01:46refraction, and shadow, and the other passes, we will also get the AO pass into
01:51our final EXR file.
01:54There is a second way in which we can create an ambient occlusion pass, which
01:58gives us a little more control over our render settings, and that is if we
02:05create a custom ambient occlusion shader, and assign it to the car on its own render layer.
02:10So let's go ahead and bring that AO pass out of our Associated Passes. Let's
02:14close our Render Settings.
02:16Let's go ahead and create that new render layer. I'm going to just select the lights;
02:21we're not going to use those. I'm going to do a Ctrl+H and hide that.
02:25Let's select this entire car, and with that selected, I'm going to create a new render layer.
02:30And I'm going to double-click that render layer, and we're going to call this
02:33something like carAO.
02:36I am going to go ahead and open up my Hypershade. I have got a quick key
02:40which is H; opens up the Hypershade without going up to our Window > Rendering
02:46Editors > Hypershade.
02:47And I'm going to create a new Surface Shader.
02:51Let's back out of here, and create a little more room here.
02:55And now I'm going to select mental ray, and I am going to shorten up this list a
03:00bit, so we don't have to go looking for our ambient occlusion shader.
03:04So I'm just going to type in amb, and now I'm going to select the
03:08mib_amb_occlusion shader.
03:12With it selected, I'm going to middle mouse drag on top of the surfaceShader. I'm
03:16going to select Default, which is going to automatically attach it to the Out
03:22Color of this surfaceShader.
03:23I'm going to follow along where that attached here by selecting the little arrow
03:28key, and now that will give us our parameters, which is basically the same thing
03:32as double-clicking the mib_occlusion here.
03:35Our final step here is we want to assign that shader to the geometry, so let's
03:40select all the geometry.
03:42And it's very important;
03:42we're on our carAO render layer, and right-click, Assign Material to selected.
03:52Finally, let's go into our Render Settings window and make sure Raytracing is
03:58set to on, which it is.
04:00And let's go ahead and hit our Render button, and let's see what we get.
04:06So, there's a couple of things that we're going to have to adjust here.
04:10The first is that we don't want to render on a white background; we want to
04:15render on a black background.
04:17Let's scoot the Hypershade out of the way, select View > Camera Attribute Editor,
04:23and let's scroll down to our Environment rollout, and let's set our Background
04:28Color to black. Let's close that out.
04:31And now we want to adjust the quality of the ambient occlusion render.
04:37Notice, right around areas of darkening we're getting little speckles.
04:43That's because our samples are set a little bit too low, so we want to bring those up.
04:48So let's double-click our shader, and let's bring our Samples from the default of
04:5216 to, let's say, around 32. Save that into our render buffer.
04:57Let's go ahead and do another render.
05:01Let's compare it with what we had from our previous render.
05:04The Samples really helped improve the quality of the render.
05:07We're not getting all of the little speckles that we were getting before.
05:12We can also make some other minor adjustments here.
05:14We can bring down the Spread, which takes the dark areas, and spreads them out a
05:19little bit wider. So maybe let's reduce that.
05:23Our Max Distance is another very important parameter here, and that is
05:28dependent upon our scene scale; how big our geometry is in our scene, and how
05:34the ambient occlusion affects the geometry, based on that scale.
05:39For our purposes, let's select that to 1, and we're just going to have to do some
05:44test renders. Let's put that in our render buffer, and do another render.
05:47It looks like our Max Distance might be set a little bit too high. Let's
05:51bring that back to 0.
05:52Let's keep our Spread to 0.4.
05:55Let's put that in a render buffer, and let's do another final render.
05:59We're looking pretty good here.
06:00So, now you can see the differences in quality that we're getting, and I think
06:04that's about the darkening we want, roughly, and we got rid of a lot of the
06:08artifacts in our render.
06:10I showed you a couple of different ways in which we can create our ambient
06:13occlusion pass; either this custom way, which is manually creating the shader, and
06:18assigning it, and making a new render layer.
06:20The other one is adding the AO pass down into our Render Passes, and we get that
06:25one for free when we're creating our lighting pass.
Collapse this transcript
Adding a fresnel pass
00:00The next pass we are going to want to explore is the fresnel pass.
00:04Fresnel occurs when the object facing most perpendicular to camera has less
00:08reflection, giving the illusion that the reflected areas are actually greater on
00:13the edges, which is similar to car paint.
00:16So, here is an example rendered out on a shader ball, where if we look in the
00:22center of the image, there is very little reflection, but as we go out towards
00:27the edges, there is quite a bit more reflection, and we are going to want to
00:32mimic that in our composite.
00:34But in order to do so, we are going to have to create a unique render pass with
00:39a custom shader in order to render that out, and then bring that into our composite.
00:43So, let's go ahead and I am going to show you how to do that.
00:47We are here in our last file, and we are going to just use fresnel pass in order
00:52to create this separate render layer.
00:54And again, you can use any pass you'd like;
00:57you can start with a lighting pass,
00:59just as long as you make sure that we have the correct file that's being
01:03referenced into the shading file.
01:05So with the carAO selected, let's change that render layer name to fresnel, and I
01:11am going to hit the H key to bring up our Hypershade.
01:15We are going to now create a couple of new shaders in here.
01:19First one is our Surface Shader, so let's scoot out here a little bit to create
01:24some more working room.
01:26The next is we're going to select Utilities.
01:28Within the Utilities, we are going to create what is called a Sampler Info node.
01:35So we can scroll down, and try and locate that here, or again, just type in s, a, m,
01:42and it just shortens up the list a little bit, and makes it easier to find. Just
01:46bring the Sampler Info node in here.
01:49And the final shader we are going to want to bring in here, actually, it is going
01:53to be a 2D Texture, and it is a Ramp.
01:57So the Sampler Info node, let's open that up here, and the Sampler Info node
02:02takes its information from the facing angle of the camera, using the Facing Ratio
02:07parameter inside Utility.
02:09We are simply going to add color at that angle using a ramp.
02:15We use a ramp to then adjust the amount of the effect.
02:18So the first thing we need to do is let's select the ramp, and we're only going
02:23to really need two colors: black, and white.
02:26White will be the color of our luminance.
02:30Since the Ramp Type defaults to v, we are going to put the white at the bottom,
02:35and the black at the top, and then we are going to attach that ramp to the Facing
02:41Ratio of the Utility.
02:42We only need black and white.
02:44Let's get rid of this middle color by just clicking this little x here, and we
02:48are going to set the top color to black, and now we are going to select the
02:54bottom color to white, and let's just close that out for now.
03:00Let's middle mouse button, drag our ramp on to our samplerInfo node, and instead
03:05of selecting Default, this time we're going to select Other.
03:08By selecting Other, that is going to bring up our Connection Editor.
03:14So, let's go ahead and flop this from, and to, so our Output is going to be
03:19facingRatio, and we are going to connect that to the v coordinate of the ramp.
03:25And the reason why we are going to connect that to the v coordinate of
03:29the ramp is because our Ramp Type is set to v. We're now going to middle mouse
03:33and drag onto our surfaceShader, and we're going to select Default which simply puts
03:40our connection into the Out Color of our surfaceShader.
03:44Now we can select all the geometry on the car -- let's close out our Connection
03:49Editor, and let's select our car, and we are going to right mouse click, and
03:56Assign Material To Selection, and let's go ahead and render out of our first
04:02render, and see what we get.
04:04We got a render that's starting to work, but the effect of the fresnel is much
04:09too widespread over the entire car. Let's put that in our render buffer.
04:13The way in which we can now dial this in is through the ramp.
04:18Notice that my black color is all the way at the top the ramp.
04:23What we can do is just simply select the black color, and just drag it down
04:27somewhere here, and that will create more black color where the white color is.
04:34So let's do another render.
04:37That looks a lot better. Let's put that into our render buffer as well.
04:42Typically, the number I like to use to get a proper fresnel is the Selected
04:47Position of the black color is around 0.4.
04:49It's probably not going to be that much of a difference between our previous
04:53render, but let's go ahead and re-render it again.
04:56We can compare our previous render with our last render. So, it's a little bit different.
05:00As you can see just by looking at the render, we're getting a lot more of the
05:06edge brightness that mimics our fresnel shader that we saw before.
05:11We are going to take this pass, now, we are going to bring it into Nuke, and
05:15there is a couple of different ways in which we could use it into Nuke to mimic
05:19that fresnel look.
Collapse this transcript
6. Compositing the Rendered Passes in Nuke
Adding a gamma correction in Nuke
00:00The rendered image in Nuke looks bright and washed out, if you've noticed, when
00:03I've opened up Nuke, and brought in our car EXR file.
00:06That's because linear images from programs like Maya, and other 3D packages, do
00:11not take into account the gamma curve attributed to the monitor.
00:15And we can take a look here at what that monitor gamma curve actually looks like.
00:20So, if we go back into Maya here real quick, and I've rendered out what our latest
00:25car render looks like, with all its lighting, and its HDRI, it actually looks good.
00:30That's what I like, because when I'm working, I want what my final output is to
00:33look like here in Maya.
00:35So, Maya actually applies an sRGB gamma correction under the hood for this render
00:41view, so it's going to be in the right color space.
00:44Unfortunately, Nuke does not apply that same gamma correction.
00:47Let's go back to Nuke here.
00:51So, we can see that it's still washed out, and bright.
00:53Well, we can make some adjustments in Maya, so the image will have an sRGB gamma
00:57correction, but that requires changing all the textures and the colors to Linear,
01:03and that's quite a bit of work.
01:05So another way to avoid all this work is to simply make the change in Nuke.
01:09We can do that by adding a Grade node, so let's zoom in here a little bit,
01:14let's delete that, I'm going to go to Tab, and we're going to hit Grade, and
01:19another way to do that is just hit the G key, and we're going to set our gamma to .454.
01:27And the reason we set it to .454 is because the sRGB gamma correction is 2.2.
01:33The inverse of 2.2 is .454.
01:35When we invert 2.2 with .454, we end up with a linear image.
01:44So now we look at our Grade node, and now we can compare that to our Maya file,
01:50and now they're in the same color space.
01:53When rendering your own projects, make sure you either apply the gamma correction
01:56in Maya, or how we're doing it here in Nuke, using the Grade node.
Collapse this transcript
Getting started in Nuke
00:00So, now that we have all our rendered elements, we can now set up our Nuke composite.
00:06The first thing we need to do is read in our car.exr file, which I demonstrated
00:11how to create at the end of chapter 4.
00:14We can either click-drag it in, like this, and then view it. So, let's go ahead and delete that.
00:21The other thing is, we can hit the R button, which creates a Read node, and then it
00:27automatically browses for the location of the file.
00:31So, here we are in our car/images directory, in our Car.exr.
00:36So let's go ahead and open that up, and let's go ahead and add that Grade node
00:40that we have been working with in our linear workflow.
00:43Let's hit the shortcut G, and let's hit the gamma to .454, so now we have a
00:50properly gammaed image.
00:52I also like to set my Properties to less than 10, preferably 1, so I only have
00:58one Property node in Nuke at a time.
01:01The next thing we want to do is we want to set our Project Settings; the shortcut
01:06key for that is S, and within our Project Settings, we want to set our full size format.
01:12As you can see, everything we have rendered out from Maya so far was set to 1280 by 720.
01:18Nuke defaults something other than that.
01:21This simply means that if we bring in any script generated elements, such as
01:25constants, and color bars, and roto shapes, it'll automatically default to
01:30the full size format.
01:32So for instance, let's hit the Tab bar.
01:34I am going to type in a constant, and let's view that.
01:38So now we are at 2048 by 1556.
01:43We want to have all these script-generated elements to be the same as
01:46our rendered elements.
01:48So let's hit S again, and let's select 1280 by 720.
01:54We can also create new ones.
01:56So for instance, we can type in Car HD, and then we can type in 1280 by 720, and let's say OK.
02:07Notice right away that are Constant now sets its default size to 1280 by 720.
02:13Back in our Project Settings, we also have our proxy scale.
02:17Our proxy scale enables us to work at a much smaller resolution, making our
02:21workflow much faster, so we don't have to render everything out at 1280 by 720
02:26while we are in the Nuke comp.
02:28So, right now we are set at .5, which is 50% our HD scale.
02:32So, to enable proxy scale, we can go up to our Viewer here, and toggle proxy scale on.
02:38Let's view our Grade node.
02:40So we are at half-res now: 640 by 360.
02:44Our hot key in order to initiate our proxy scale in Nuke is Ctrl+P on a PC,
02:50and Command+P on a Mac.
02:52Also, in our Project Settings, notice that there is frames per second, and frame range.
02:59We can ignore that for now, because we're only rendering a still.
03:02These are very important attributes to set if you are working in animation.
03:06Now we are ready to composite.
03:09Our Car.exr has embedded render passes that we created out of mental ray.
03:14We're going to have to extract all those passes using shuffle nodes, and then
03:18putting them together into a single image.
03:21So then, once they are separated out, we can use our mattes that we created to
03:25color correct each of those render passes.
03:29So, let's hit the Tab key, and create a new Shuffle node.
03:34Let's bring the leader up to Grade, and under our rgba, let's select diffuse.
03:41Let's rename our Shuffle node to diffuse, because we are going to be creating a
03:46couple of these here now.
03:48Tab, Shuffle, into the Grade node, and now let's redirect that to indirect, and rename it.
04:00So now we can view the diffuse in indirect passes.
04:04There we go. That looks pretty good.
04:06So let's keep going here.
04:07We have several more to do. Shuffle, into the Grade node, next is reflection, and
04:16let's just call this reflection. Tab, Shuffle, let's bring the leader up to
04:22Grade, into the refraction, call this refraction, and take a look at that too;
04:30make sure we got it right.
04:31Bring the leader to the Grade, and under our rgba, let's select specular, and
04:41let's just call this specular. Let's take a look that.
04:45So now what we're going to probably have to do is we are going to have to use
04:52the Merge node with the operation set to plus, and add them all up.
04:55So the hot key for the Merge node is M, or Tab, Merge, bring the leaders here,
05:05double-click, make sure it's in our property window, set the operation to plus.
05:11Now that would be the diffuse and the indirect added.
05:13Let's go ahead and create another Merge node.
05:17We are going to keep adding all these passes up here. Set the operation to plus.
05:24We've got specular. Let's go ahead and create another Merge node. Make sure it's
05:31in our property window. Set the operation to plus.
05:36With the node selected, on the keyboard hit Ctrl+C, and in the empty space here
05:40Ctrl+V. We are going to keep adding all these passes up here; it saves me a bit
05:45of time. And now finally, we have to add a new Grade node.
05:49So let's just Ctrl+C; copy and paste that here.
05:54So now all our associated passes add up to what our original render looks like here.
06:00Now that we have our basic setup in Nuke, we can start to color correct
06:03our passes.
Collapse this transcript
Color correcting the passes using mattes
00:00Now that we've all our passes added together, we can begin to make adjustments to
00:04individual render passes.
00:06As mentioned earlier, this is where the real benefit of rendering in 32-bit lies.
00:11Here we are again in our Nuke file, with all our passes separated out.
00:17We're viewing our Grade node.
00:20First thing we want to do is we want to bring in our rendered matte passes.
00:23Let's go ahead and open up a Windows Explorer window, browse to our images
00:27directory, and Shift+Select our mattes, and click-drag them into our Nuke file.
00:33Let's minimize the Explorer window.
00:37And just by looking at our image, we can make some initial decisions about
00:42what we want to change.
00:43Looks like the tires might be a little bit dull; we want to bring those up.
00:47Also, we want more specular highlight, possibly just in the body paint. So let's
00:51separate out our mattes, so we can easily see them; get a little more organized.
00:57And since we want to bring up the tires, the diffuse channel is a really good place to do that.
01:02So let's bring our M2 node over here, and we're going to have it selected, hit
01:07Tab, type in Shuffle.
01:11If we just view just the M2 node, the tires are isolated on the red channel.
01:17So in the Shuffle node, let's do the same thing: R, G, B, and A for red, so now we
01:23have a matte just for the tires.
01:25Zooming out a little bit, select that Shuffle node just for the diffuse pass.
01:30And now we're going to hit Tab, and let's put in an Exposure node, and take a look
01:35at that too; make sure we have it right.
01:39And probably a good idea is here we're going to view the Grade node, so we can
01:44see our end result.
01:45So now we can see we're bring up those tires.
01:50Next, let's go to our specular channel.
01:54As I mentioned earlier, it looks like our specular channel could use a little bit
01:58of attention, just on the paint. Go ahead and find our paint matte, and let's
02:04bring that over to where our specular channel is. With it selected, Tab, Shuffle;
02:12let's view the node. So, we want to isolate out just the red channel.
02:16So we're going to select red for R, G, B, and A, so now we have just our paint.
02:23And with our specular shuffle node selected, Tab, ColorCorrect; let's bring that
02:30down over here. Let's take the mask leader, bring that into the Shuffle node. We can view that.
02:38Now we can bring up our contrast, bring up our gamma, and bring up our gain.
02:44So now let's take a look here at our Grade node, and kind of compare the two: our
02:52first Grade node here, and our second Grade node here.
02:55So those are just two very simple color corrects. One of them is just an exposure.
03:01I can continue showing you more adjustments, but I'm going to just quickly
03:05show you my end results.
03:07So, I actually have, here in the same comp, my adjustments to all of my render passes.
03:14So here you can see the adjustment for the tires. Here's the adjustment for the
03:20specular pass I showed. I also added a glow.
03:25Here is my adjustments for reflection.
03:29I actually added a merge node, with the operation set to plus, and I added more
03:34reflection, so we can look at the Grade node.
03:37And then finally, my refraction pass; I increased my refraction ever so slightly.
03:43So now let's select this Grade node at the bottom, the Grade node at the top, and
03:48we can compare the two.
03:51So as you can see, this is where the real artistry takes place.
03:55These methods can be applied to any new composites where you need to make
03:58adjustments to your render passes.
Collapse this transcript
Adding the secondary passes
00:00Next we need to bring ambient occlusion into our new comp.
00:04As you recall, we rendered an AO pass from the associated pass section in Maya.
00:10And here in our comp, I created a shuffle node, and I shuffled out the AO pass, so
00:18let's take a look at what that AO pass looks like.
00:21So now what we need to do is we have to multiply that into our composite, so I
00:28went ahead and I created a merge node, and I set the operation to multiply.
00:33Let's go to the end of our comp, and let's take a look at our Grade node. I'm
00:37going to put that on the number 2 for our viewer.
00:40And now let's unhook our multiply, so we can kind of see the difference of our
00:46Grade node image, with and without our ambient occlusion. So I'm going to select
00:50this leader. I'm going to just put it over here into our plus node.
00:53So now our ambient occlusion is not being rendered in our new comp.
00:57So, notice that the car actually became a little bit lighter. Put that leader
01:02back into multiply, and notice that where our geometry is in close proximity to
01:08other pieces of geometry, we get darkening. So, we want to include that ambient
01:12occlusion pass in our final new composite, because it just adds one more level
01:18of realism to our image.
01:20Another level of realism is our fresnel pass. We need to add that into our
01:26reflection pass that we rendered out from Maya.
01:30So let's go ahead and create a read node. I'm just going to select here in open
01:35space, hit the R key; we're going to go into images, and we're going to go to
01:41fresnel, select our fresnel.exr, and open that up. Take a look at that.
01:46So this is our secondary pass of just fresnel.
01:50As you recall, we only want just the outside edges of the paint to be affected.
01:58So, in order to do that, we have to have a Bezier. I actually created a Bezier; now
02:03I'm going to just copy and paste that. We're going to take a look at that.
02:07So, if you notice, if I select on the Color tab, set to Black, so the inside
02:12of that Bezier is black, so we're only having the outside edges of our
02:17fresnel being affected.
02:19Next, we want to have the fresnel, not only just the outside edges, but also
02:23just the car paint.
02:25Let's go ahead and take an existing M1 matte, which is our car paint matte, and
02:29we're just going to use that. I'm going to hit Ctrl+C on our keyboard just to
02:33copy, and I'm going to now hit Ctrl+V, Tab, Shuffle.
02:40And we're going to set this Shuffle to R, so now we're just isolating our car paint.
02:48Let's select the Shuffle, and Shift+Select our Bezier. Hit M for merge, and let's
02:55select our Merge operation to mask.
03:00So if we take a look now, the mask only affects the body paint with the outside
03:08selected from the Bezier.
03:10Finally, we want to incorporate that into our reflection pass.
03:15Here is an exposure node; let's create another one. Tab > Exposure.
03:23And we're going to want to take the mask leader of our exposure, and into
03:27our mask of our merge.
03:31And we have our new exposure node viewed.
03:34Let's bring up the red, green, and blue, which basically just brings up the
03:39overall level of the effect onto the reflection pass.
03:45So, as you recall, when we're creating the fresnel pass, just the outside edges
03:50are going to have more reflection. That's why we included it in just the reflection
03:53pass, and that's what we're getting here.
03:55So if we view a before and after of just a reflection pass, you can see the
04:00fresnel being affected here.
04:01So there is a pretty good way of adding that fresnel pass just onto our reflection.
04:05So our next step, we need to add our background image to our comp.
Collapse this transcript
Adding the background plate and the shadow
00:00So now that we have added all our color corrects to our render passes, now is a
00:05good time to add in our background image, and if we add our background image,
00:10we're going to have to add in our ground shadow, and our ground ambient occlusion pass.
00:17I think the best way to start is to open up our previous Nuke file, where we
00:22color corrected our background plate.
00:25So, here's our background plate pre-comp, where we color corrected the background plate.
00:29Notice that the image size here is 5184 to 3456.
00:34So we're going to have to reformat that into our Master comp.
00:40Instead of just taking out the Write node that we used, why don't we just go
00:45, ahead and take the color corrects, and just put that in our Master comp.
00:50With those nodes selected, I'm going to do a Ctrl+C. Now let's go back into our
00:56Master comp, and let's put those in here, and we're going to do a Ctrl+V to paste.
01:02Next, we are going to want to bring in our groundShadow pass.
01:07So let's hit the R key for Read, and we're going to go down to our images
01:13directory, and groundShadow, and we're going to open up our
01:17groundShadow.exr. Let's view that.
01:21Notice that when we rendered out our ground shadow, we have a darkened area of
01:26our shadow, and then it's on a white background.
01:29What we need to do is isolate just the dark area, and we can then multiply back
01:35onto our color corrected plate.
01:38So, the first thing we want to do in order to isolate that is create a Bezier.
01:41So, with the node selected, I'm going to hit X, and we're going to type in Bezier,
01:46and we're going to make sure the TCL is selected.
01:50With our Bezier selected, let's zoom in here a little bit closer, and holding
01:53down the Ctrl and Alt key, we're going to start creating a Bezier, just around
01:59the shadow darkened area.
02:02So we're going to set some points on the Bezier, and maybe one more point here.
02:08Let's go ahead on the Bezier, and let's invert that,
02:12so we're looking at just the dark area.
02:16Next we are going to want to invert that selection.
02:21Hit Tab, and we're going to type in invert to get the Invert node.
02:26Let's put a ColorCorrect node on there.
02:29So hitting the C key, and let's bring down our gamma; tighten it up a bit.
02:34Notice that we're getting some harsh edges around our shadow area.
02:39So let's go back to our Bezier, and now we can create some more feathered edges.
02:44So with our Bezier points showing, we're going to hold down our Ctrl key, and
02:49left-click on each of the individual points, and we're going to go around the
02:54shadow, and just soften up those edges.
02:59We can further tighten it up once we have it multiplied onto our background.
03:03Okay, so back to our background plate; remember, it was 5K, so we're going to
03:10have to put a reformat node on here. Tab, Reformat, and now our reformat is to
03:171280 by 720; the size of our composite.
03:21With our ColorCorrect node selected, let's view that.
03:24It's really important that what we see in our RGB is also going to be what
03:30we see in our alpha.
03:31So if I select our alpha channel, we're going to notice that the entire shadow
03:37is not selected; just the edges of our Bezier.
03:40So in order to get the rest of the shadow in our alpha, we're going to have to
03:45add a shuffle node on here, so Tab, Shuffle.
03:48Let's set the alpha red, and that will now bring our alpha into our color channel.
03:57So if we go back to our RGB, both our RGB, and our alpha now carry the white,
04:04which is what we want to use for our mask.
04:07With our Shuffle selected, our Reformat selected, let's hit M to bring in a Merge node.
04:16And instead of having A over B, what we're going to use, we're going to use that as a mask.
04:22Let's bring our mask leader up to our Shuffle node.
04:25Now instead of an over, we're going to set our operation to multiply.
04:31Now we're seeing our shadow on the ground.
04:34So, as you can see, our Bezier is a little bit wide.
04:37So we can go in and make some adjustments by bringing down the main points of
04:42the Bezier to the edge of the road in the back, because we don't want to have
04:46the shadow going up on the rocks in the background.
04:49So we are just going to bring this down here a little bit.
04:53Next, let's read in our ground occlusion, selecting in our open space, hitting the R key,
05:00I'm just going to go back up to the images, and now we're going to go to the
05:04groundAOC, and bring in the groundAOC.exr; Open.
05:09Now, this is just going to be a simple merge with a multiply.
05:13So we can either create a new one, or we can just copy paste what we already have here.
05:17So let's just do that. I am going to Ctrl+C, and Ctrl+V. Let's bring that down over here.
05:23We're going to view that, and we have our multiply onto our ground.
05:27We can adjust the amount of ground occlusion by simply dialing down our mix.
05:33Another little layer of detail we can do too is we can actually adjust the color
05:39of the ground shadow.
05:41Let's move our color corrected background images over a little bit here.
05:45Let's select Tab, and let's add a constant.
05:49Now we're going to hook our A leader up to our constant.
05:53Now we can change this constant to any color we want; that would be our shadow color.
05:58So it doesn't necessarily have to be black.
06:00We can have a little bit of color into this shadow.
06:03We can zoom into the window here a little bit, and we can select the color
06:08picker, and now, holding down the Ctrl key and left mouse button, I'm able to go
06:15in, and actually pick a very specific color for the shadow, and then we can even go
06:21in here now, and make it a little bit darker if we wanted to.
06:26So that's how we integrate the groundShadow and groundAOC into the back plate.
06:31Next, let's see how we need to finish our composite.
Collapse this transcript
Adding the car and rendering the final composite
00:00Now we need to apply our color corrected car onto our background.
00:04So, there's a number of ways we can do this.
00:06We can either create a new merge node right here in our open space, and then
00:10select the A and B leader, or even simpler, we Shift+select our Grade node, and
00:16Shift+select multiply, and hit M. Now the over, which is our default for our
00:24Merge node, will automatically set our A over B.
00:29Notice, though, that if we zoom in here towards the windows, that we are not
00:34getting any transparency to see the background plate through the windows.
00:40The reason is, if we look at our alpha channel, we have no transparency in our alpha.
00:47We need to get that transparency back before we do the over operation.
00:52Let's zoom up to our Car.exr, and view the Grade node.
00:56We have transparency in our alpha at the very top of our comp.
01:00We even have transparency in all of our passes.
01:04What happens, though, is that when we add our passes together, we lose that transparency.
01:10So if we work our way down the comp, by the time we get to our Grade node here,
01:14we are going to have no transparency.
01:16The best solution for this is to copy and paste our Car.exr with our Grade;
01:21Ctrl+C. Let's go here in open space, and Ctrl+V for paste.
01:29Select our Grade node here, and Tab, Copy, and we need to hook our Grade node -- and
01:35actually, we don't even need our Grade node at this case; all we are looking for
01:39is just the transparency, so we can delete that Grade node if we want.
01:43We need to hook our Car.exr into the copy.
01:47So we are going to just take just the alpha channel of our Car.exr file, and use
01:53it into the Master comp now.
01:56Before we do that, let's select the copy channel, and Shift+X to reverse the order.
02:03Now let's view our over. Let's select the Viewer back to RGB.
02:09Now we can see that we have transparency, because we're seeing the background
02:14plate through the windows.
02:16Now that our comp is almost complete, we need to write this, and render it to disk.
02:21So with our over selected, let's hit the W key to create a write node.
02:28Now we need to browse to where we want to render.
02:30So let's hit this little file folder, and let's set it to images.
02:37Now, here in the path, we can create a new render file name.
02:43Let's call it something like ConceptCarComp. Render it out as a TIF file,
02:49so we just put a .tif.
02:52The great thing about Nuke is once we add a particular file type, Nuke is smart
02:57enough to know what file type to set it to.
03:00So let's set the compression to none, and let's leave our channels to RGB,
03:04because we simply don't need an alpha channel for our paint work in Photoshop.
03:10So with our Write node selected, let's hit Render, and say OK.
03:16So now it's rendering through our comp, and now we have our final render in which
03:22to work with in Photoshop.
Collapse this transcript
7. Final Touch-Ups in Photoshop
Adding motion blur to the wheels
00:00Using Photoshop, we open up our tiff file that we just rendered from Nuke to make
00:06our final adjustments, and the first order of business is that we need to add
00:11some motion blur to our wheels.
00:13I can do this in Maya, but it will increase render times, and is probably
00:17not as art directable.
00:19So, I really prefer to do this in post, typically in Photoshop.
00:23So now that we have our rendered version in Photoshop, let's zoom in, and
00:30concentrate on our back wheel first. With our Elliptical Marquee tool selected,
00:37let's eyeball the center of the wheel, and holding the Alt key simultaneously and
00:42our left mouse button, we're going to create a new ellipse here.
00:46And I'm just going to eyeball it here for now, because we can always go in and
00:51make some fine tune adjustments to get it to be exactly lined up.
00:55That looks pretty good.
00:56Now I'm using my left arrow key, and we're just going to nudge the selection
01:01over, and it looks like we're going to have to bring maybe the top here down, and
01:06the sides over here.
01:07Let's go ahead and select Transform Selection, bring that selection over. That
01:13looks pretty good, and we're just going to bring this down just a hair. That
01:17looks pretty good. And let's say Enter.
01:19Let's go ahead and copy and paste this into a new a new layer.
01:22So I'm going to hit Ctrl+C, and Ctrl+V, and in the new layer, let's rename it
01:29motionBlurRear for our rear wheel.
01:35Let's go ahead and also hide our Background layer.
01:39We are going to need to make this circular. See, it's very oval in shape?
01:44The reason is because I'm going to be using a radial blur.
01:47Radial blurs work much better with round objects then oval objects. Select
01:54Edit > Transform > Scale, and we're just going to eyeball this into place here; it
02:01doesn't have to be exact. We've got a pretty good looking circle here.
02:04With our motionBlurRear layer selected, we Ctrl+left mouse click to load the selection.
02:11Now under Filter > Blur > Radial Blur; let's set the amount to around 20.
02:20That looks pretty good. Let's turn on our Background layer, and we're going to
02:24need to rescale our motion blurred wheels to match the original render. With our
02:31selection set, Edit > Transform > Scale, and all we do is just bring that back up to
02:39match what's underneath.
02:40We can actually set our Opacity little bit lower to see how close we are.
02:46Looks like I really nailed it here. I'm going to left mouse click here in the
02:50image, and hit Enter.
02:52And now Ctrl+D deselects our selection.
02:57And now let's zoom out; I am just going to hold the Shift key and the Alt
03:01key simultaneously.
03:03And that's what our rear motion blur looks like.
03:05So what you need to do now is go in and do the front wheel as well.
03:10Also, feel free to experiment a little bit, and notice that I only did just the
03:15chrome part of the rim. It might be cool looking if you also include the tire as well.
03:21And now the next thing we need to do is go in and make some paint fixes to
03:26the road.
Collapse this transcript
Fixing the road
00:00Next, we have to make some paint fixes to the road.
00:03Painting out the lane line will eliminate any problems that the car is actually
00:07driving on the wrong side of the road, at least here in the US.
00:10We can also tighten up the ground shadow a bit as well.
00:14Let's start by selecting our Background layer.
00:17Let's make a copy of that, and double-click in the layer, and let's call it roadFix.
00:26Now let's select our Polygonal Lasso tool right here, and what we want to do is
00:33make a very tight selection around that lane line.
00:36So zooming in on it here, let's start on the outside of the image, and let's just
00:42start creating a selection around it.
00:45So we can just pan down the image, and we are going to go outside the image, and
00:51then back around again.
00:52So now we are just going to backtrack here.
00:55Now we are going to complete the selection, and zoom out a little bit.
01:02Now, under Edit > Fill, we are going to make sure that our Use is set to
01:09Content-Aware, and Content-Aware simply takes pixels from outside the selection,
01:15and includes them in the new selection.
01:18So, we are going to say OK.
01:21Now let's do a Ctrl+D to deselect, and our lane line is gone, but as you can see,
01:28there are still some remnants of it. We have got to go in and make some painting
01:32adjustments in order to clean that up.
01:34Probably the best way to do that is we are going to use our Clone Stamp tool.
01:40We set our brush to Opacity of about 100%, our Flow to around 25 or so,
01:48and our Brush Size to 15.
01:49Of course, feel free to adjust any of those parameters.
01:53I am going to use my Alt key just to select next to the area I want to paint,
01:59and I'm going to start filling in the area that needs some adjustment.
02:03I am just going to be very careful not to paint onto the car, and also careful
02:09not to paint any of our valuable ground shadow pass, or ground occlusion pass.
02:14Let's change our Opacity a little bit, bring that down, and adjust the
02:21ground shadow here, so it's just not so stark of an edge. There we go; looks
02:27pretty good. And zoom out.
02:30I don't want to have two background layers, so we need to merge the two together,
02:35and create a new background layer.
02:37So in the Layers palette, we're just going to merge down, and now we have our
02:41new Background layer.
02:43So, let's continue adjusting our image, and add a vignette.
Collapse this transcript
Adding a vignette
00:00Once we have all our paint fixes, I think it would be a nice final touch to add a vignette.
00:05So back here in Photoshop, with our Background selected, let's go ahead and
00:10create a new layer.
00:12So I'm going to say New Layer, and let's call it Vignette, and let's slide that
00:18all the way up to the top, because we want the vignette to be over our motion
00:21blurred wheels, and our background changes.
00:24We need to create a new elliptical marquee, so with our Elliptical Marquee
00:31tool, again, holding our Alt key, we're going to emanate this from the center of the entire image.
00:37I'm going to Alt+Drag out, maybe something around here, and now we can adjust
00:44the location of it; Select > Transform Selection, and we're just going to bring
00:49this down just a hair.
00:50That looks pretty good, and I'm also -- right now I'm looking at the sides of the
00:55image, so I'm having about the same amount of space on both sides of the image;
00:59same amount of spaces from the top to the bottom as well.
01:02That looks pretty good. We're going to Enter, and now we're going to invert our
01:06selection, because we only want to darken up the outside edges of the ellipse.
01:13So I'm going to hold down Ctrl+Shift, and I am going to hit I, and that's going to
01:18invert the selection.
01:19Next I am going to use the Gradient tool, and I want the Gradient tool, instead of
01:25going from black to white, I want the Gradient tool going from black to
01:31transparent, so I am going to say OK.
01:34I want to use a Radial Gradient, so with the Radial Gradient selected, I'm going
01:39to go back to the center of my image, and I'm going to left mouse button click,
01:43and I'm going to drag beyond the corner of the image.
01:46So now we've got a nice gradient going from transparent to dark.
01:50Next let's Ctrl+D, so we deselect our selection, and now we add a nice blur onto it.
01:57So Filter > Blur, and let's go to Gaussian Blur, and go ahead and adjust the amount
02:05of blur that you like. Let's try and make it where we're not seeing the edges so
02:09much; probably say 50 pixel Radius blur. So we say OK.
02:15Now that we have the vignette on its own unique layer, you can go in, and you can
02:21adjust the transparency, depending upon how strong you want the effect.
02:25So we can just leave that at a 100% for now.
02:28So here we have our final rendered, composited, and painted image.
Collapse this transcript
Conclusion
Comparing the final composite with the original plate
00:00So here's our original image, and our final paint fixed image.
00:06The tools I showed you can be used for many purposes other than vehicles,
00:10but hopefully this gives you a good start in helping you set up your files, and
00:14dialing in all your parameters.
00:16Some other resources I have here are jeffpatton.net.
00:22jeffpatton.net is a great resource to show how a commercial artist shoots his
00:27HDRIs, and stitches them using PTGui Pro, as well as some other great tools.
00:33If we go to LAmrUG, which is the Los Angeles Mental Ray User Group, this is a
00:40fantastic Web site to show how other artists are using mental ray.
00:44There is mymentalray.com, which is a great place to get involved in the mental
00:50ray community, and to also see images other artists are creating using the same
00:54tools that I showed you.
00:56Finally, on the 2D side of things for Nuke, there is Nukepedia.
01:01Nukepedia is a great URL to go and download plug-ins, and to also view tutorials.
01:07Thanks for watching, and have fun lighting.
Collapse this transcript


Suggested courses to watch next:

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



Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

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

bookmark this course

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

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

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

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

get started learn more

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

Get access to all lynda.com videos

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

Get access to all lynda.com videos

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

Access to lynda.com videos

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

You don't have access to this video.

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

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

How to access this video.

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

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

learn more upgrade

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

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

You don't have access to this video.

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

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

Need help accessing this video?

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

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

preview image of new course page

Try our new course pages

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

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

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


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

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

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

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

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

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

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

   
submit Lightbox submit clicked