Ok, ok! In the UFO scene, the shadows were falling away to the left side and the UFO was far above the treeline so we didn't really need to concern ourselves with having our 3D elements casts shadows.Of course, depending on the lighting of the original shot and depending on the 3D elements we want to integrate into our scene, they might have to cast shadows onto the ground, the walls or even the actors.
First of all, you have to enable the shadows for all the lights in your scene. By default, 3dsMax lights will have their shadow option turned off. You may also want to increase the shadow map resolution if you are using shadow maps to ensure that the shadows created are nice and smooth.Here is a quick render of the crows from my Dissolve Into Crows effect, including the pier geometry and the shadows they cast.
Unfortunately, we cannot take this image and composite it onto our original footage because it has the 3D geometry of the pier in it! But without the pier geometry, we wouldn't be able to render any shadows. So how is this supposed to work?The answer to the question is: matte shadow or shadow catcher materials!
Matte shadow materials are invisible when rendered, but they can be configured to receive shadows cast by other 3D elements in the scene. By placing this material on any geometry in our scene that needs to receive shadows, we get a final render that does not show any geometry, but it does show the shadows for our 3D elements as if they were cast onto the geometry.
In the material editor, you can create a 'Matte/Shadow' material by selecting it from the available material list.
Ensure that you tick the 'Receive Shadows' as well as the 'Affect Alpha' check boxes on the material and then assign it to the geometry in your scene.
Here is the scene from my Dissolve Into Crows effect where I have assigned the matte shadow material to the pier.
Huh? No pier, no shadows? Don't worry, the shadows are black - as they should be - and you only have to toggle the show alpha switch in the render preview window to see that our beauty render now includes the shadows for the crows
Of course, just like with all render passes, you can decide to render out the shadows as a separate layer. Just like the Z-Depth pass, you can configure this render pass in the 'Render Elements' tab in your render settings.