a rendering test shows that the shadows of the scene is not accurate. All the shadows are generated by some rough modelling of the ceiling and pillars with a directional light. It does not account for shadow of the trees.
Therefore this time I try to generate a more accurate shadow by using the clip. With a lot of trial and errors (spend a whole day solving small problems) and finally get things done. Here are the basic ideas:
1. a texture is rendered out on the ground plane based on the back plate.
2. Extract the shadow inside NUKE
3. Map the B&W texture onto the ground
4. Render out the shadow using a orthographic camera. Need to match the direction of the camera with the directional light.
5. Map the above texture onto the opacity channel of the texture of a plane ( need to match the size of the plane with the camera size) which is put between the light and the scene.
6. more accurate shadows of the trees!