Download

Sliding/Offsetting CSM Shadow on planetary scale with dynamic directional light

Hey there,
so I came across something weird…
I wanted to do a shot, looking from space onto a planet, another smaller planet is passing and it’s shadow drops on the larger one… the Large one with a atmosphere, the smaller one, without.

So I did a quick pre check and created this super simple scenario to wrap things up…
Instead of directly going to real scale (which is obviously not a good idea at all) I started with a smaller scale scenario…
My atmosphere in this case has a radius of 300km with a very small atmo height… so far so good…

Now to the issue,… using CSM Shadows on a dynamic Directional light (with proper distance and far shadow settings) I noticed that the shadow that is casting onto the atmo is correct, but the shadow on the larger planet is sliding and offsetting all around (the bigger I go in scale, the bigger the offset) …

Here to see in action:

https://youtu.be/YReSySl3W-8

Is there a way to fix this? What am I missing?

I could use raytrace shadows, it fixes this issue, but I’m loosing the nice atmosphere shadow.
I could go in a much smaller scale, which fixes this issue too,… but then I’m not able to scale the radius of the sky atmosphere down to the nececcary value (and the Atmo behaves obviously totally different with a ground radius of 1km and a atmo height of 0,2…)

Any help appreciated :pray:

and btw.; what’s your approach with extreme scales and shadows on planetary scale? especially in a “dynamic” scenario… Would love to hear some thoughts on this topic.

Cheers n thx
P.