A tutorial which uses Video Copilot Orb.
In this video for After Effects, I first demonstrate how to link a moon to a planet using null objects, parenting and the Orb effect. Then I combine the Circle and Offset effects with a Linear expression to range map a shadow to follow a planet.
This means I get to avoid ray-tracing, heavy render times and can adapt the eclipse size / moon shadow pretty quickly. I can also use this technique to cast words or even spaceship shadows on a planet.
After talking you through all of the above, I then show how to apply it to a Earth model you have already set up.