Render animation: moving object with its shadow without the rest of the scene

Hi, I am trying to render an animation but it’s really heavy. There is only one moving object and the camera is fixed. So in order to gain some render time I want to firstly render the background scene without the moving object as one frame then in a second time render the animation of the moving object.

The thing is that if I just put them in two separate layers, the shadow of the moving object doesn’t appear when I render the second layer. So the question is: how can I render the animation of the moving object with its shadow but without the background scene on which the shadow applies?

If this is possible it would also allow me to put different render parameters for the two. For exemple render the background with lots of samples and light bounces as it will be calculated only one time but for the moving object animation I can reduce everything to win time.

Thank you in advance

You could just render a shadow pass? You activate it in the View Layer->Light panel in 2.8 and in the Render Layers->Passes panel in 2.79.

Ok maybe this is the solution but I don’t get how to use it haha
Let’s say my background scene is layer 1 and that the moving object is layer 2.
Then I want to render layer 2 plus the shadow produced by the object in layer 2 (but not the background scene from layer 1).
What do I need to check or uncheck in the passes panel?

I’m on my phone so specific instructions are hard for me now, sorry. You need to layer them using the compositor.

BI has a “shadow-only spotlight” which calculates shadow placement but does not produce light. You can capture this Shadow layer separately. You can use the “layer-specific light” feature to precisely determine what casts shadows and what shadows are cast. (You can do several renders to get several shadow-only datasets for your “comp.”)

Use MultiLayer OpenEXR files as output to allow you to capture all of the digital data produced by the renderer(s).

So, your final “comp” consists of three elements:

  • The backdrop (one frame).
  • The moving object or objects, rendered however you like.
  • The shadow information – which lands on “shadow-catcher” planes in the case of moving objects.

Having the shadows as a separate thing is very useful, not only because they contribute much to realism and are trivial to generate, but also because in the compositor you can do many things to the shaded areas. For instance, you can inject a slight blue cast. You can slightly reduce the hue and saturation of objects within the shadow areas.

“Shadows and, separately, specular highlights” are very key to creating and maintaining the 3D illusion, and BI is excellent at quickly generating both to add to your final composites.