I have a "proof of concept" version of this, but it seems that a proper solution is currently not possible with Corona, because the shadowcatcher does not correctly register environment lighting. We have this reported.
I was saving everything to 32-bit exr with alpha.
- Render the image as it should look like in the end - just for reference (the buildings, people, their shadows, etc - the beauty how it should look like in the end)
- Render the "buildings" without the "people" - this will be our backplate + the CShading_Shadows element for this
- Render the "buildings" with the "people" on top of a shadowcatcher. Make sure the "buildings" have Alpha set to "Always black" in their material properties (if it's a lot of materials, I guess a script could be used for this; or material override).
- In compositing app:
-- open the "buildings without the people" image, use it as the bottom layer
-- on top, add the CShading_Shadows image, set it to Add blending mode
-- lastly, on top, add the shadowcatcher image (transparent)
The attached image is showing the reference vs the composite.