6

Problem

I would like to build a realistic view of the earth from low-orbit (here ~300km) with WebGL. That is to say, on the web, with all that it implies and moreover, on mobile. Do not stop reading here : to make this a little less difficult, the user can look everywhere but not pan, so the view does only concern a small 3000km-wide area. But the view follows a satellite so few minutes later, the user comes back to where it was before, with the slight shift of the earth's rotation, etc. So the clouds cannot be at the same place all the time.

I have actually yet been able to include city lights, auroras, lightnings... except clouds. I have seen a lot of demos of realtime rendering passionates and researchers, but none of them had a nice, realistic cloud layer. However I am sure I am the 100(...)00th person thinking about doing this, so please enlight me.

Few questions are implied :

  • what input to use for clouds ? Meteorological live data ?
  • what rendering possibilities ? A transparent layer with a cloud map, modified with shaders ? Few transparent layers to get a feeling of volumetric rendering ? But how to cast shadows one to another : the only solution would then be using a mesh ? Or shadows could be procedurally computed and mapped on the server every x minutes ?

Few specifications

Here are some ideas summing up what I have not seen yet, sorted by importance :

  1. clouds hide 60% of the earth.

  2. clouds scatter cities & lightnings'lights and have rayleigh scattering at night.

  3. At this distance the parallax effect is visible and even quite awesome with the smallest clouds.

enter image description here

As far as i've seen, even expensive realtime meteorological online resources are not useful : they aim rainy or stormy clouds with help of UV and IR lightwaves, so they don't catch 100% of them and don't give the 'normal' view we all know. Moreover the rare good cloud textures shot in visible light hardly differentiate ground from clouds : sometimes a 5000km-long coast stands among nowhere. A server may be able to use those images to create better textures.

When I look at those pictures I imagine that the lest costy way would be to merge few nice cloud meshes from a database containing different models, then slightly transform those meshes inside a shader while the user passes over. If he is still here 90 minutes later when he comes back, no matter if the model are not the same again. However a hurrican cannot disappear.

What do you think about this ?

Community
  • 1
  • 1
Mouloud85
  • 3,826
  • 5
  • 22
  • 42
  • 3
    I think it would be better to tackle your graphics one problem at a time: how to provide a cloud layer (or several), how to compute / simulate the clouds in those layers, how to cast shadows from those results and light the clouds by the light provided by cities (and reflections from shiny ocean surfaces), how to include light like cloud silver linings or auroras in the shader, etc... there are just so many different parts to your question it is inappropriate for the SO format. – BeyelerStudios Jul 03 '15 at 14:46
  • @BeyelerStudios indeed i did not precise much about the answer format. What i need is a broad idea so i and futur users have some clues about how to make it. I edit the question – Mouloud85 Jul 03 '15 at 15:01
  • 2
    Then please take a course in physically based light transport, because you request the contents of a lecture in your question. – BeyelerStudios Jul 03 '15 at 16:05
  • Rendering clouds is an open challenge, usually done efficiently/cheaty by procedural generation in the shader, that might be one of your questions / research topics. How to get light to bounce from the surface through the cloud into the camera in orbit / render auroras or other atmospheric effects, that's a whole new depth, each effect in itself. – BeyelerStudios Jul 03 '15 at 16:55
  • then your specific questions could be: *how do I zoom-out / scale a procedural cloud shader?*, *how do I light my procedural clouds according to my light map?*, *how to cast shadows with procedural clouds?*, ... – BeyelerStudios Jul 03 '15 at 17:53
  • No need to go to extreme lengths to do both the atmosphere and the clouds reasonably realistically, as BeyelerStudios or Spektre suggest. For the atmosphere, you could create a shader material where you set an inner color to outer color translucent gradient for the sphere section and an inner color to outer color translucent gradient for the sphere glow or aura, and optionally a golden hour color for the sunset and sunrise effects. For the clouds, an already made NASA animation of the cloud cover is enough, and using the same texture as the bump or displacement map should provide the shadows. – Yin Cognyto Jun 17 '22 at 16:21

1 Answers1

2

For such effects there is probably just one way to do it properly and that is:

  1. Voxel maps + Volume rendering probably with Back-Ray-tracer rendering

    As your position is fixed so it should not be so hard on memory requirements. You need to implement both MIE and Rayleigh scattering. Scattering can be simplified a lot and still looking good see

    voxel maps handle light gaps,shadows and scattering relatively easy but need a lot of memory and computational power. All the other 2D techniques just usually painfully work around what 3D voxel maps do natively with little effort. For example:

  2. Procedural cloud map generators

    You need this for each type of clouds so you have something to render. There are libs/demos/examples out there see:

Community
  • 1
  • 1
Spektre
  • 49,595
  • 11
  • 110
  • 380