22
$\begingroup$

I would like to have full control of the shadows in post production.

That's why I would like to have

  1. A shadow render pass containing only the shadows of my scene
  2. A shadowless render pass containing everything else but not the shadows

I know how to accomplish the shadow pass, but the shadowless pass is giving me trouble.

Someone told me to subtract the shadow from everything else using nodes. But how do you do something like that in practice? I tried if using the math node in different modes like "subtract" would help, but the results were weird.

So to recap my question: How can I create a render pass that has no shadows in Blender?

EDIT: I should mention that I'm using cycles as the render engine.

$\endgroup$
  • $\begingroup$ Hey Oliver and Gandalf ! Great Great workarounds.... thanks for your answers. Both works depending on the case. What i do sometimes is to use some environment light, very soft... this kind of ilumination do not apear on the shadow pass. So, you just have to create a renderlayer pass without your lamps to have your unshadow and unlit pass. Kind regars. $\endgroup$ – user1528 Nov 4 '13 at 2:55
19
$\begingroup$

Blender Internal:

You can exclude a pass from the Combined pass by toggling the camera icon next to the appropriate pass in Render Layers > Passes:

enter image description here

Cycles:

The trick with cycles is that there is direct lighting and indirect lighting.

If you only want to filter out shadows, then it's as simple as dividing render by the Shadow pass with a Mix node. However, indirect lighting gets in the way of this. If you combine the Indirect pass with the Shadow pass, then use that to divide, you will remove all the indirect lighting and shadows. (you end up with a Color pass that has no shading at all).

here are some workarounds:

Renderlayers:

There might be a better way to do this, but you can use two renderlayers:

Layer 1 contains the cube object.
Layer 2 has the lights, floor and background.

Settings for Renderlayer1:
For this render layer all scene layers are enabled to render the object and background.

enter image description here enter image description here

Settings for Renderlayer2:
For the no shadows layer, the scene layer with the cube is excluded and masked to remove shadows cast by the cube and to create a mask to combine with the other layer later.

enter image description here enter image description here

Composite nodes:
All that remains to be done is combining the cube into the no shadows layer. If you have Render settings > Film > Transparent enabled you could use an Alpha over node, or you could use a Mix node with the Alpha of the no shadows layer as a mix factor:

enter image description here

Material nodes:

You can filter out shadows per material with material nodes, e.g. for a shadowless and bounceless diffuse shader:

enter image description here

This will let light through the object when it's bounced indirectly of a diffuse object and when sent directly from a light source:

enter image description here

The obvious downside to this is you have to use two scenes and recreate your materials to use this for compositing.

Object shadow property:

You can also remove shadows per object by unchecking the Shadow box in the Properties Editor > Object > Ray Visibility:

enter image description here

To do this for all objects for use in compositing, you could

  1. Create a new scene from your current scene.

  2. A> select all

  3. After disabling the Shadow box in Object > Ray Visibility, right click it and select Copy to selected to set this for all selected objects.

This will prevent all objects from casting shadows.

You can now use this scene in the compositor as a renderlayer.

$\endgroup$
  • $\begingroup$ Thank you! This definitely seems to work for Blender internal. However cycles doesn't seem to have this option? $\endgroup$ – Antti Sep 26 '13 at 20:04
  • $\begingroup$ @Antti I'll update my answer. Also see this post here $\endgroup$ – gandalf3 Sep 26 '13 at 20:09
  • $\begingroup$ This sounds like a possible solution, but one thing bothers me a little bit: Does this technique basically require that shadow casting objects (cube) are separated from shadow receiving objects (floor)? Then am I right in assuming that this approach wouldn't work if some objects are both casting and receiving shadows? $\endgroup$ – Antti Sep 26 '13 at 20:59
  • $\begingroup$ @Antti Yes. like I said, there is probably a better way to do this.. $\endgroup$ – gandalf3 Sep 26 '13 at 21:03
3
$\begingroup$

Just had a though as to how to do this. Not sure if its what you want but I will post it anyway.

This only works with lamp lighting (Not mesh lights - although maybe a node setup on the mesh emitter can be done)

What you can do is duplicate your lamps onto a separate layer and turn off cast shadows in the lamp settings. Then you can use render layers to create a layer with no shadows.

enter image description here

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.