Problems with Shadow pass.


Hello people! :cool:
I recently started doing some 3D stuff again, and I decided to 3D track a shot, and add a object to the shot (an old C64 joystick modeled in Maya 2011).

I have come to one of the last stages, and that is rendering my stuff. I decided to go for a multiple pass render, with a shadow pass, and then composite in Nuke.

Here you can see my scene (click the pictures to get the original sizes):

All except for the Joystick have a useBackground material applied to it, and here you can see my render with white background (just so you can see the shadows)

Now, the problem I’m having is the shadow pass. Here it is:

And you can see that only the shadows on the joystick itself is in the pass (I can’t either see any white in the alpha channel). What I really was expecting was that the pass included ALL the shadows, including the shadows cast on the plane behind the joystick! :argh:

I have tried to find a reason behind this wierd problem, and I have sit around all day trying to figure it out. The worst thing is, this is maybe an easy solve! :frowning:

Please help! :beer:


You might be rendering the shadow pass just fine. Remember that when your shadow renders, it has a black color and shouldn’t be discernible from a black background. When you look at the alpha channel, can you see white where the shadow should be? Try saving out the image as a targa and bring it into Nuke (or any compositor). Create a merge node set to multiply with a white background going into the B input and the shadow image into the A input.

The one thing that concerns me is that your shadow image has red from the joystick buttons in it. Usually shadow passes are black and white and I’m not quite sure why yours looks the way it does. If this starts to present you with problems, try assigning the use background shader to the joystick as well. This should give you the result you’re looking for.

Remember to turn off all the spec and reflectivity stuff on the use background shader!


Thanks for answering.

When I look at the alpha channel, I can’t see any white at all! It doesn’t seem that it has an alpha channel at all either. I tried doing that in Nuke just now, but it still shows the same image. Also, when I render this way with a shadow pass, isn’t it normal for the shadows to be excluded from the MasterBeauty pass? It doesn’t in my case.

This is starting to get annoying :banghead:

  • Nunikasi


Wait, are you using render passes and not render layers? Render passes are REALLY buggy and often don’t work. Try doing this with a render layer. Shadow passes are just tricky - even renderman usually needs a separate render layer or scene file for shadow passes.


I’ll try that, but how exactly? Should I just make a layer for my planes, and how should I go with the pass?

  • Nunikasi



I tried making a new simple scene with a spotLight, a Sphere, and a plane with useBG applied it. I also made a shadow pass. However, the problem appears here too!

What I did:
[li]Created a polygonal plane and sphere, as well as a camera and a spotLight.
[/li][li]Applied a useBG material on the plane and enabled ray trace shadows on the spotLight.
[/li][li]Made a shadow pass and clicked “Assosiate”.


Results (the alpha of shadow pass on the right):

  • Nunikasi


I see now - if you’re using mental ray passes, don’t have a use background shader - just keep it how you want it to appear in your beauty pass. The passes won’t work with use background.


So there’s no way I can have a shadow pass that will work with a shadow catching plane? :sad:

Well, thanks for your help anyway… I appreciate it!


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.