New Sky/Atmosphere model in 4.24

Not anymore using a cvar.
The text is here to help understand the scene: it means you are using a skydome with a material having IsSky=true, but that sky dome is not covering some part of the scene. If you do not want to see the message you can hide your sky dome in case you get out of it for some reason.

Ok, so I’ve been working on this outer space scene using the new SkyAtmosphere system (current UE4 build 4.26.1) for a few weeks now. Everything went super smooth up to the point where I finished my planet (Earth) and focused on making the Moon. According to the documentation and some videos I watched, to achieve natural dynamic lighting, I should enable “Per Pixel Atmosphere Transmittenance” in my directional light (sun) settings. So, I did that and my moon started looking really good, however, I am now experiencing an issue with the planet surface:

I tried changing sky atmosphere parameters and maxing various CVARs for better quality but it didn’t help to resolve this issue. I am not entirely sure if this is a bug or an intended functionality, but so far I have thought about the following workarounds:

  1. Roll back the transmittance to default mode (unchecked), this would give me good looking planet but all other objects in space would be light incorrectly. Hence, I would need to change all shaders to unlit and rewrite them, as I understand this would be needed for all objects in space (moons, spaceships, props etc.). This sounds time-consuming and not user-friendly at all. I would prefer to avoid this path.

  2. Rewrite planet surface shader from lit to unlit and work with “Per Pixel Atmosphere Transmittenance” enabled. This sounds better coz only one shader needs to be rewritten and I would be able to benefit from beautiful outer space lighting. I am not sure, however, If I can replicate my lit shader 1:1 (will give it 2-3 days and see the effects).

If anyone has a different idea on how to fix this, please kindly reply. All suggestions are welcome.

@MJ_Klosowski I believe that is because, in this mode, everything that is hidden under the virtual planet (defined by the sky atmosphere planet/ground radius) will receive a black color (because we use the transmittance LUT and that property is needed for shadow in the the planet shadow in the atmosphere too). Two options:

  1. You should tessellate your planet mesh more and/or increase it radius a bit to get it out of the virtual planet
  2. Reduce the size of the atmosphere ground. You can then increase the atmosphere radius and tweak the Rayleigh/Mie scattering distribution to compensate if needed too.

I will look at adding that case in the documentation.

Thanks for your prompt reply and suggestions. My thoughts after today’s series of tests and tweaks:

  1. From the proposed scenarios only no 2 (changing atmosphere ground radius) seems acceptable for my case. I need to maintain proper scaling of celestial objects to their real sizes, if I start tweaking with planet radiuses, I will lose control over this very quickly.
  2. I managed to reduce the atmosphere radius by about 1 km (from 1000 to roughly 999 km). This fixes the issue of planet visibility and I can now see what’s “under the atmosphere”. On the other hand, a lot of other things went to bust:

a) My color grading scheme is no longer usable, I had to start over and managed to get some results today. Although I still cannot exactly reproduce my previous grading, I think I am getting somewhere.
b) The side effect of changing Mie parameters is that my specular map for Earth is no longer working properly (the sun’s reflection on the earth surface is not showing as it should be), I will investigate this further, maybe it can be fixed in the planet shader itself.
c) There were some weird dark circles showing on the atmosphere while zooming, I got rid of them by tweaking the atmosphere height parameter (reduced from 200 to 40).
d) The ugly lines from the previous post were still there but very faint (close-up shots only). I somehow managed to get rid of them by playing with Mie, Rayleigh, and Aerial Perspective View distance parameters for a few hours.
e) I experience more anti-aliasing flickering patterns while operating in the viewport. I have disabled AA for now.

On a good note, I gained proper rendering of the Moon and everything is dynamically reacting to the Sun’s position.