5

I've been trying to render only shadows in Cycles, is that possible? If so, how?

For example, when I render a character, I want Cycles to render only the shadow of the character.

someonewithpc
  • 12,381
  • 6
  • 55
  • 89
Hashir
  • 541
  • 4
  • 10
  • 17

2 Answers2

8

A shadow catcher was added in blender 2.79.

There is no reason to use compositor tricks any longer to generate a shadow. You simply add an object (In my case a simple plane) and check the Shadow Catcher box.

Go to the Object tab of the Properties Editor. In 2.79 the Shadow Catcher option is in the Cycles Settings section. In 2.8 the Shadow Catcher option is in the Visibility section.

2.79 2.8

Here is what my rendered scene looks like so far. rendered scene with object and shadow catcher plane

Now to get just the shadow you need to disable the Camera visibility on all the other objects. This setting is in nearly the same place as the shadow catcher. Go to Object tab of the Properties Editor. In 2.79 it's under the Cycles Settings section. In 2.8 it is in the Ray Visibility subsection of the Visibility section.

2.79 2.8

just the shadows now

David
  • 49,291
  • 38
  • 159
  • 317
2

Not sure if this is where you want to go.... but:

.blend: https://www.dropbox.com/s/wzf8haoxrs6yfwv/special_case.blend?dl=0

enter image description here

produces:

enter image description here

Here's why I called the file "special_case": the ground plane extends beyond the edge of the camera, and produces a shadow png. If the ground plane edges are inside the camera view, you will see a thin black line at the mesh edge. I am sure there is a way to eliminate it, but darned if I can figure out. Also, the masking box is a bit of a cheat.... but works for a still image. See .blend file for results. Node tree set-up here:

enter image description here

rcgauer
  • 2,247
  • 1
  • 15
  • 27
  • 1
    instead of just a file please summarize the steps taken. If the link to your file disappears the answer will be useless. –  Dec 06 '15 at 22:19
  • Also please add an explanation to your images and the logic behind the node tree you propose. –  Dec 06 '15 at 22:25
  • I found this very useful but cegaton is correct more details would be very helpful. I spent about an hour trying to get it to work correctly. – Dontwalk May 17 '16 at 19:19