This is a pic of mymy robot walking through a park, But he needs a shadow. (Sun to the right, shadow to the left) But since the onkly thing done in Blender is the robot, I cant figure out how to cast the robots shadow. I could do it in a paint program, but this animation is 600 frames long, so thats out. I could make the grass in Blender, so I could then cast a shadow, but I want to use the grass in the video. I know this is a tough question, but is there a way to cast a shadow in this video? I was thinking of useing a transparent ground in Blender with a shadow onto it, so when I droped the Blender seqence onto the park video, only the shadow would show up… Any Ideas?
I haven’t tried it but I’m pretty sure what you do is something like this:
- Create a plane that matches the grass.
- In the “Render Layers” tab of the render panel, select only the “Shadow Pass”.
- Render your 600 frame shadow pass using the premul/RGBA settings to a format that supports alpha (ie: PNG).
- In the node compositor, take this shadow pass noodle that now appears on the render layer node… and… that’s where someone else needs to jump in.
sck5000 has the basic idea – use Render Layers to split the shadow pass out from the rest of the Blender rendering, and the Compositor to recombine the shadow pass with the BG footage and your robot rendering. You could probably do it all in a single Composite render pass through a well-designed noodle.
My approach would be to create a ground plane that matches the park, including different surfaces for grass and sidewalk so the shadow will be “true” to the surfaces. I’d use a white material for the fake ground so your shadow will have max definition for compositing, and probably a much darker shadow than is realistic – you can control the shadow density later in the Composite nodes, and I find it easier to cut back on than intensify a shadow pass.
By putting your robot in one Render Layer along with the “normal” lighting, and the Shadow elements on a separate Render Layer with whatever tweaks are needed to make it work best (could be made with lights separate from those lighting the robot, for instance), you’re now set up to combine them with your live footage in the Compositor, input as a movie or image sequence, I imagine, using an Image node.
Three sources into your noodle: robot render layer, shadow pass render layer, and live action. I’d start by laying the shadow over the BG, either by using the Shadow Pass limit as sck500 mentions, or using a Color>Mix node option like Multiply if you use the pure white Material for the fake ground. The node settings will allow you to adjust the darkness of the shadow. Then lay your robot over that, probably by using an Alpha Over node.
That’s basically how I did Mancandy’s shadow for this Icarus camera motion match test I did: Skunky Beer!
Thanks to both of you for your comments. Im not quite as smart as you guys but let me see what I can do with your advice. Always appreciated.
Not so much a matter of “smart” as just more experienced, I think. Render Layers & the Compositor can be a bit daunting at first, but if you have questions, just ask. Your “robot stroll in the park” looks promising!