SkyAtmosphere and World Rebasing

With the news of Large World Coordinates I decided I wanted to try this again, as I won’t have to worry about origin shift / world rebasing anymore. I’m now using UE5 Preview 2.

Everything is working really well - except for the SkyAtmosphere/DirectionalLight/SkyLight setup.
For some reason, it seems all of these are affected by the notion that Z+ is up.

This planet is exactly the size of the earth, and thus uses the default size for the atmosphere:

When having the sun light up the planet from different direction, some very weird lighting occurs.
This is exactly the same picture, just with a different angle on the directional light.


After having tested a lot of angles, I have concluded that the reason everything gets a red tint in the second picture is because the “north pole” (being the only place on the planet that has Z+ as up) has a sunset. And since this engine is so hard-coded to make Z+ as up, it somehow applies the sunset-tint to the entire scene, including a cube that is thousands of kilometers outside the planet/atmosphere.

@SebHillaire Do you have any input on why the DirectionalLight’s angle is causing this?

(To reproduce, spawn a DirectionalLight in C++ e.g on BeginPlay, with ZeroVector location and ZeroRotator rotation. When playing in PIE and selecting the DirectionalLight, notice that the rotation of the DirectionalLight is somehow changed to {0, -46, 0} and that it has an angle (actually realistic). Change it to 0,0,0 to get a completely vertical shadow, e.g the sun will always go perfectly on the equator, and see this tint happening everywhere. It happens with a lot of other angles as well, this is just one of them that’s easy to reproduce.)