1
$\begingroup$

I am looking to produce an image like this:

enter image description here

Where there are two objects, with one object casting a shadow on the second object. The catch is that I do not want to create this by rendering two objects together in the same scene. I want to create this by combining separate images of each object, rendered separately.

Basically, I want to take this image:

enter image description here

And combine it with this image:

enter image description here

To get this:

enter image description here

Any ideas how to do this? To reiterate, I want to get this result through compositing or other post-processing means, not by rendering the images together. So far, I’ve messed around with the compositor a lot with various render passes, but haven’t figured it out. If you have an idea or method of how to do this, I would love to hear it!

zip file with renders and blend file: https://drive.google.com/file/d/1xR1FEJ3vdHYK5oZvHU1jwf8EZqUBtntq/view?usp=sharing

Thanks,

$\endgroup$
1
1
$\begingroup$

In this specific case you can fake it.

Since small monkey doesn't cast a shade in the shadow of big monkey ... you can just Z-Combine these two renders.

To fake the shadow casted by the big monkey on surface of the small one you can use Mix node > Multiply the Diffuse Indirection pass. It gives you an illusion - it is correct, but it is not, you are just lucky this pass looks like the casted shadow :)

enter image description here

enter image description here


But this will fail in other cases.

You can't get exactly the same result with totally separated files since the geometry of first one affects light bouncing on second one. So both renders needs to know about geometry of others. Some of those data can be saved in EXR (like Depth to be reused in Z-Combine node, or save Normal pass to try relight render), but there will be always parts totally impossible to composite in natural look.

So ... you would have to share object data info across those renders. Like by using Scenes (as suggested by HISEROD in comment) or View Layers ... or something similar that let you render thing separately, but already affected by shadows, indirect light, reflection etc. of other elements used in final composite.

Even with deep-compositing (used in other softwares) you can't mix everything, for the same reason. This deep-data just handles pixels in space in better way for combining, so these data contains also only pixels visible by camera, so back part of big monkey is not there to cast proper shadow with side light onto small monkey.

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks, I really appreciate the in-depth answer. Unfortunately my actual use case is different than the scene with the two monkeys, I had put that together to more easily convey my question. But, this still answers my question and is going to help me move forward. I was hoping to combine a few large renders via the compositor, to save on render time and increase flexibility, but knowing all this I guess I have to rethink my workflow. $\endgroup$ – MarcusR Jan 31 at 1:13

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.