Important Notice:

On July 31st, 2017 the Digital-Tutors library will be retired along with Digital-Tutors concurrent licensing. Effective August 1, 2017 any active group plans will be redirected to www.pluralsight.com. Each group plan will receive one individual user license on Pluralsight for each active Digital-Tutors license. Please contact your account representative for any additional questions.
How to render alpha channels in a luminance depth render layer
See Details
Dan LeFebvre

Guest Tutor

Dan LeFebvre
Hi, my name is Dan. And I'm one of the DT evangelists here at Digital-Tutors. In this video, we're going to look at a question from one of our users on how to set up a technique for rendering a luminance depth render layer with alpha channels. So here to illustrate this I have a simple scene set up here. So if I were to just do a quick render. And let's pull this over-- it kind of rendered off screen here. So basically, what we can see is I have a plane set up here. And I have a file texture on that plane that has a transparency map on there. So we can see that there's some objects behind it. If I were to, say, hop into my top view, we can see basically I have my plane that has the transparency map on it. And then I have a couple objects that are behind there that we'll want to look at. If we look in the Hypershade real quick, we just see basically on this plane here-- if I were to select that-- we can see that I just basically have a simple file texture that's being piped into the transparency. So let's set up a luminance depth render layer for this scene. So I'm going to come into my render layers here. And just to make sure that I get everything, I'm going to go ahead and just copy this master layer by right clicking and going to Copy Layer. Let's rename this, maybe something like luminance depth render layer. And once we have that created, we can go into Layers, Attributes, and then apply the luminance depth preset. So once we have that set up, let's go ahead and open up our Render View here. Now when we render this out, there's a couple things that we'll notice. The first thing is that we lost our alpha channel, and we're no longer able to see the objects behind the plane. The other issue is actually that our luminance depth is all white. And this is a common issue that I've come across in my projects. And it's pretty easy to fix. So let's come in and fix that first. So basically the luminance depth preset is going to set up a shading network here. If we were to look at the shading network that gets set up, it's a surface shader with a set range node, a multiply divide node, and the sample info node in order to actually create our luminance depth shader. Now, here on this Set Range Node, there's actually a plug-in that determines the distance from the camera in order to actually determine the gray scale values for the shader. But I found that this doesn't really work that well. So very often I have to come in and actually break the connection and then come in and manually input the minimum and maximum values. Now, the actual values that you put in here are going to depend on your scene size. But usually, I find a good place to start off is by coming in and typing in something like 0.1 and 100. So let's start off with that and see how that looks when we render it out. Open up my render view. Save that off. And when we re-render, we can see we're getting a nice depth later here like we would expect-- so much better than before. So the next issue that we want to fix is the issue that we're not able to see our objects through this plane with the transparency map on there. So basically, what we're going to want to do is to apply another shader to this plane and apply the alpha channel-- or the transparency map that we have into that shader. So let's come in and create something like a Lambert here. Pull in new material. You can see we have this Lambert. Now, if we were to try to select our plane and apply that, it's not really going to let us do that. So if I try to render this out again, it's going to look exactly the same as before. Now the reason for that is this luminance depth preset is actually setting a material override. So everything on this layer is going to be using the surface shader that was created. So let's come in and break that layer override so that we can apply another shader to just this plane and then keep this surface shader on the rest of our objects. So I'll right click, go to Overrides, and remove the material override. And once we have that removed, we'll actually need to come in and reapply our surface shader to everything in our scene. So we can come into our Outliner. Select everything. And hop back to the Hypershade. And right click and apply the surface shader to the selection. So what we should see when we render this out is that there's absolutely no change. And as we can see there is no change. But the difference now is that we can come in and apply a different material to this plane. So I'm going to apply this Lambert material here. So we have that applied. And when we render that out we can see that that plane actually does have a different material. If we look at the alpha channel, it's rendering out. It's just completely black. We don't actually have any lights or anything like that set up in our scene. And that's OK, because for this depth layer, we don't really need any lights in there. So what do we want to do with this Lambert now that we have that applied? Well, let's come in, and actually I'm going to select both the surface shader as well as the Lambert, and look at the connections for both of those, so that we can come in and basically take this same shading network and plug that into our Lambert. So I'm going to come in. And I'll hold down Shift and middle click and drag the set range into the Lambert. That'll open up our Connection Editor. So if we take a look at how these set range is plugged into the surface shader-- if we hover over the little connection here, we can see that the out value x is plugged into the out color RGB. So let's plug in the out value of x and plug that into the color of our Lambert. OK, so we have that connected. And let's go ahead and render this out. We can see that not a whole lot has changed. And the reason for that is actually because this Lambert here still has some shading on it, which is what differentiates it from the surface shader. So if I come in and double click on the Lambert, I can bump the ambient color all the way up. And that almost basically makes it a lot like a surface shader would act. However, I found that this technique really doesn't work too well with a surface shader, which is why I'm using a Lambert instead of a surface shader just because of the way the surface shader handles the transparency. So let's bump the ambient color all the way up and go ahead and render this out. As we can see, basically we're back to having the depth as we would expect. But we're still on having the alpha. So now that we have all of this set up, we're finally ready to actually plug in the transparency map. So let's come in. I'm going to select the color that we had on this plane, and also select my Lambert, and pull both of those up in my hypershade here to make it a little bit easier to see. Here we go. So we have our transparency map. Let's plug that into our Lambert. So I'll just middle click the file and drag that into transparency. And now what we should have when we render this out is that we get our luminance depth render layer. But we're also able to see all of the objects behind that due to the transparency map. So let's go ahead and render this out. And as we can see, we're getting our transparency map that's being included within our luminance depth. So we're able to see the plane down here on the bottom, as well as these sphere in the background. So that's one technique that we can use in order to get an alpha channel to work within our luminance depth render layer. Now, if you want to learn some more great rendering tips, check out the mental ray tips and tricks course.
Each video in this course is a self-contained lesson focused on answering questions that Digital-Tutors customers have had as they learn rendering in Maya.
Introduction to Rendering Ask DTs in Maya
1

Introduction to Rendering Ask DTs in Maya

 
01:03
How to determine differences between FG rays and GI photons
2

How to determine differences between FG rays and GI photons

 
05:13
How to determine differences with the dielectric and architectural materials
3

How to determine differences with the dielectric and architectural materials

 
05:25
How to fix a stereo camera rig that is rendering out a white depth layer
4

How to fix a stereo camera rig that is rendering out a white depth layer

 
04:22
How to fix black reflections when using the Use Background material
5

How to fix black reflections when using the Use Background material

 
03:50
How to get a shadow effect in light fog
6

How to get a shadow effect in light fog

 
08:00
How to resolve an issue with blown out lights
7

How to resolve an issue with blown out lights

 
04:58
How to hide an object that is casting light from renders
8

How to hide an object that is casting light from renders

 
01:56
How to set up a couple alternatives to the mental ray depth pass
9

How to set up a couple alternatives to the mental ray depth pass

 
11:58
How to set up a technique for adding a shadow into an occlusion render
10

How to set up a technique for adding a shadow into an occlusion render

 
08:52
How to begin troubleshooting renders that complete too quickly
11

How to begin troubleshooting renders that complete too quickly

 
02:16
How to begin troubleshooting renders that won't finish
12

How to begin troubleshooting renders that won't finish

 
03:02
How to access the legacy render layer presets in Maya 2011
13

How to access the legacy render layer presets in Maya 2011

 
03:49
How to blend two textures for rendering with mental ray
14

How to blend two textures for rendering with mental ray

 
09:11
How to get a shadow to pass through a transparency map
15

How to get a shadow to pass through a transparency map

 
04:27
How to begin troubleshooting an absence of an alpha in a render
16

How to begin troubleshooting an absence of an alpha in a render

 
04:15
How to get a shadow to disappear with animated transparency
17

How to get a shadow to disappear with animated transparency

 
04:06
How to resolve an issue where new objects are green
18

How to resolve an issue where new objects are green

 
06:33
How to begin troubleshooting a batch render that isn't completing
19

How to begin troubleshooting a batch render that isn't completing

 
02:52
How to better understand what has an effect on render speeds
20

How to better understand what has an effect on render speeds

 
06:50
How to render alpha channels in a luminance depth render layer
21

How to render alpha channels in a luminance depth render layer

 
08:23
How to resolve an issue when the mia_material_x isn't rendering passes
22

How to resolve an issue when the mia_material_x isn't rendering passes

 
04:10
How to begin troubleshooting Physical Sun and Sky in Maya
23

How to begin troubleshooting Physical Sun and Sky in Maya

 
09:47
How to render a turntable as a QuickTime in Maya and After Effects
24

How to render a turntable as a QuickTime in Maya and After Effects

 
11:43
How to apply a label while maintaining caustics
25

How to apply a label while maintaining caustics

 
06:45
How to smooth out a render that utilizes Global Illumination
26

How to smooth out a render that utilizes Global Illumination

 
01:57
How to set up mental ray's subsurface scattering with a physical sun and sky
27

How to set up mental ray's subsurface scattering with a physical sun and sky

 
03:51
How to add a little more control to a glow effect in Maya
28

How to add a little more control to a glow effect in Maya

 
03:47
How to render out a diffuse without shadow pass and a shadow pass and composite them back together
29

How to render out a diffuse without shadow pass and a shadow pass and composite them back together

 
03:35
How to avoid a hot spot of light with three point lighting
30

How to avoid a hot spot of light with three point lighting

 
04:33
How to set up a technique for outdoor lighting
31

How to set up a technique for outdoor lighting

 
03:03
How to find a light that isn't visible in the viewport
32

How to find a light that isn't visible in the viewport

 
02:07
How to set up some custom buffer nodes with render passes
33

How to set up some custom buffer nodes with render passes

 
04:34
How to begin troubleshooting a render that isn't working as expected
34

How to begin troubleshooting a render that isn't working as expected

 
03:16
How to use the mental ray architectural material to render with passes
35

How to use the mental ray architectural material to render with passes

 
02:02
How to catch global illumination photons that spill outside the scene
36

How to catch global illumination photons that spill outside the scene

 
02:08
How to convert NURBS to polygons to try to reduce crashing at render time
37

How to convert NURBS to polygons to try to reduce crashing at render time

 
02:57
How to get a shading network to display in the viewport
38

How to get a shading network to display in the viewport

 
03:40
How to enable mental ray
39

How to enable mental ray

 
01:26
How to set up custom color render passes
40

How to set up custom color render passes

 
05:43
How to get soft shadows
41

How to get soft shadows

 
05:12
How to render a PSD texture in mental ray
42

How to render a PSD texture in mental ray

 
06:27
How to get PSD textures to reflect in a mental ray architectural material
43

How to get PSD textures to reflect in a mental ray architectural material

 
03:42
How to render multistreak particles with mental ray
44

How to render multistreak particles with mental ray

 
04:38
How to begin troubleshooting a mental ray batch render
45

How to begin troubleshooting a mental ray batch render

 
02:58
How to fix lighting for subsurface scattering
46

How to fix lighting for subsurface scattering

 
05:53
How to set up air turbulence in Maya
47

How to set up air turbulence in Maya

 
09:20
How to get started using Photoshop with Maya
48

How to get started using Photoshop with Maya

 
03:00
How to begin troubleshooting a render that isn't finishing as expected
49

How to begin troubleshooting a render that isn't finishing as expected

 
04:10
How to troubleshoot issues with paint effects and transparency maps
50

How to troubleshoot issues with paint effects and transparency maps

 
03:01
How to maintaining caustics while applying a label to a bottle
51

How to maintaining caustics while applying a label to a bottle

 
06:45
How to get a playblast to match the render output
52

How to get a playblast to match the render output

 
09:18
How to make particles visible through dielectric materials
53

How to make particles visible through dielectric materials

 
03:37
How to increase the quality of subsurface scattering effect
54

How to increase the quality of subsurface scattering effect

 
03:23
How to eliminate flickering in renders that use image-based lighting
55

How to eliminate flickering in renders that use image-based lighting

 
05:06
How to troubleshoot a render that isn't giving us any rendered images
56

How to troubleshoot a render that isn't giving us any rendered images

 
03:15
How to create a transparent effect
57

How to create a transparent effect

 
07:28
How to set up a technique for creating a cartoon style effect
58

How to set up a technique for creating a cartoon style effect

 
05:53
How to change camera settings for an anamorphic image
59

How to change camera settings for an anamorphic image

 
03:05
How to set up a technique for creating a depth pass
60

How to set up a technique for creating a depth pass

 
08:11
How to set up render layers
61

How to set up render layers

 
06:01
How to troubleshoot unwanted light in a render
62

How to troubleshoot unwanted light in a render

 
05:38
How to set up a technique for clay renders
63

How to set up a technique for clay renders

 
06:36
How to begin troubleshooting a render that isn't completing
64

How to begin troubleshooting a render that isn't completing

 
03:26
How to set up a technique for hiding half of an object
65

How to set up a technique for hiding half of an object

 
03:25
How to troubleshoot an issue where fur isn't rendering as expected
66

How to troubleshoot an issue where fur isn't rendering as expected

 
02:51
How to stop black reflections showing up in chrome material when using the Use Background material
67

How to stop black reflections showing up in chrome material when using the Use Background material

 
03:50
How to get fire to show up in reflections
68

How to get fire to show up in reflections

 
02:04
How to set up a technique for controlling bump maps on objects
69

How to set up a technique for controlling bump maps on objects

 
05:22
How to set up a technique for a clay render
70

How to set up a technique for a clay render

 
07:44
How to set up a technique for getting a shadow in an occlusion render
71

How to set up a technique for getting a shadow in an occlusion render

 
08:57
The difference between fur rendered with Maya Software and mental ray
72

The difference between fur rendered with Maya Software and mental ray

 
03:10
How to set up a technique for optimizing a render in mental ray
73

How to set up a technique for optimizing a render in mental ray

 
03:31
How to create a light fog effect
74

How to create a light fog effect

 
05:59
The difference between Final Gather rays and Global Illumination photons
75

The difference between Final Gather rays and Global Illumination photons

 
05:13
How to determine the differences between the dielectric and architectural for creating glass
76

How to determine the differences between the dielectric and architectural for creating glass

 
05:25
How to fix an issue where luminance depth layer is rendering out white through stereo camera rig
77

How to fix an issue where luminance depth layer is rendering out white through stereo camera rig

 
04:22
How to get an outline around a dielectric material
78

How to get an outline around a dielectric material

 
07:54
How to apply a decal on top of a mental ray architectural material
79

How to apply a decal on top of a mental ray architectural material

 
05:00
How to get a shadow effect in fog
80

How to get a shadow effect in fog

 
08:00
How to set up displacement maps with mental ray materials
81

How to set up displacement maps with mental ray materials

 
07:40
How to relink IES data for lights
82

How to relink IES data for lights

 
04:58
How to hide an object that is casting light into our scene from our renders
83

How to hide an object that is casting light into our scene from our renders

 
01:56
How to set up alternative techniques for depth of field
84

How to set up alternative techniques for depth of field

 
11:58
How to apply a PSD texture while using an mi_car_paint_phen material
85

How to apply a PSD texture while using an mi_car_paint_phen material

 
07:02
How to find differences between mental ray and Maya Software rendered fur
86

How to find differences between mental ray and Maya Software rendered fur

 
03:10
How to disable multiple shadows when using the Use Background material
87

How to disable multiple shadows when using the Use Background material

 
06:16