Post news Report RSS New Dynamic Atmosphere Shaders

I had implemented new shaders directly made for every planet. It changes rendering of every planet aspect, see the gameplay screenshots.

Posted by on

After a couple of weeks experimenting, I had implemented new shaders directly made for every planet. It changes rendering of every planet aspect, see the gameplay screenshots.

I used a source data from NASA and ESA maps but there is a limitation. While the source data are sufficiently detailed, the size of that data saved in any format is literally gigantic.

All stored data has hundreds of megabytes, so I decided to lose a bit of accuracy and make some enhancement using player's graphics card. As a result I decreased every planet data under 10Mb, which is acceptable for browser game.

Real photo of terminator


Cloud has a different color on the side facing the sun, then changing slowly to yellow/orange and there is something called TERMINATOR, a thin line where day changes at night, there are clouds brightly orange, like the kitschiest sunset. Clouds cannot be generated dynamically at all, because their shapes are different across land and oceans and this is something which I want to take from real Earth data.

So I used a noise distortion on an NASA map to displace hide edges of texels and to add effect like clouds are changing slowly shapes, but also it keep in form how NASA provided.

I also made this color changing shader using angle of light as interpolator. I also added a color change depending on cloud borders.

ezgif com gif maker


As a result I can get this mixed in real-time, so you feel the view is alive, it's moving and regrouping.


earth 3earth 6earth 4

earth 5


Next, Earth specific is city lights. NASA also supports me with a providing very concrete map of visible light sources on Earth. About 100 MB of data are available to use. There are no colors, it is again only BW map. So I wrote another similar shader to change color by size of point groups from bright yellow to deepest orange, to simulate photos from ISS. Shader also removes visibility on day side.

earth 7


Finally rendered Earth in gameplay (60fps): eafin

Next time Jupiter and dynamic mixing of gas!

Sources used:
Github.com
Earthobservatory.nasa.gov

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: