Atmospheres & space
Last updated
Was this helpful?
Last updated
Was this helpful?
Plugin supports multiple atmospheres with unique settings on each and a background space skybox.
Everything is rendered by the engine into the Ambient Cubemap
that is used by SkyLight
to lit the shadows and apply ambient reflections that are drawn before any other reflections (Lumen or SSR) are applied.
Compare the results between a setup where the Ambient Cubemap
is left blank (rendered as black) and one where the atmosphere material is rendered into it.
Add BP_SkyManager
to the level, place it in the middle of your 'primary' planet. The placement only affects how mie scattering (halo around the sun) is distributed along the sky, it needs to know the relation between the planet surface next to you and the sun direction.
In the Atmosphere Settings
array specify the PlanetActor
reference. This is an actor you want this atmosphere to be tied to.
If PlanetActor
is not set, you're not paying the cost of rendering this atmosphere, but the engine will throw a warning. To get rid of it, remove the entry from the array.
Adjust PlanetRadius
and AtmosphereRadius
params to match the radius of your planet. The first determines at what distance from the planet center the atmosphere will fade in, the second — at what distance from the planet center it will fade off.
Play around with other parameters while also changing the sun direction. WaveLengths
parameter determines how each RGB color is absorbed over the distance travelled though the atmosphere. The default values are physically accurate for Earth's atmosphere, but adjusting them allows you to create the appearance of alien planets.
Be very careful with the ViewRaySteps
and OpticalDepthSteps
parameters. They determine the quality of the atmosphere. There is a nested loop in the shader and the overall iteration count is equal to ViewRaySteps * OpticalDepthSteps
. The lower these values the better performance you get.
In the MI_PlanetaryAtmosphere
you have Sun Disc
, Mie Scattering
and also Night Sky
(space background) settings. Check the ...\PlanetaryOceans\Content\Sky\SpaceCubemaps
folder for the additional space sky textures you might like to try.
Because you cannot pass arrays to the material, the max amount of the atmospheres in the is hardcoded to 5. If you want to extend the amount, contact me on our Discord server, I'll show how to do it. It's a matter of a little bit of a copy-paste type of work.