Announcement

Collapse
No announcement yet.

planetary atmosphere challenge.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • planetary atmosphere challenge.

    Every so often i revisit the "photorealistic" earth model i created for a job a while ago and try to do a better job on the clouds and atmosphere.



    ive tried many times to try and get something volumetric and physically correct working, but always end up returning to my current hacky solution with gradients and falloff maps. i hit dead ends with any of the potential methods available in vray:

    vray env fog - doesnt support proper light scattering so doesnt shift colour realistically -- a blue atmosphere should tint towards yellow-red the further the light travels through it as all the blue wavelengths are absorbed/scattered

    see here:

    https://www.nasa.gov/sites/default/f...059e025207.jpg



    vrayscattervolume - might be possible to get reasonably realistic absorbtion and scattering if the right colours were dialed in, no idea what those should really be. , i had some success in getting a colour shift, but not very realistic. however impossible to get the soft fade out into space at the edges.. doesnt support volumentric textures so even a hacky distance tex based fade from earth to space wont work.

    vraymtl translucency -same as scattervolume

    vrayvolumegrid - as env-fog, doesnt scatter light correctly.


    The clouds i guess can live with, i even had some success with a volumetric version but am not yet happy with it... to be honest even the stupidly high res textures i have (75k pixels wide) dont really cut it when you want to get decently close, especially repurposed as displacement maps.


    however the atmosphere i have, despite looking ok when illuminated from side or front (even then its missing something) and even at the sun terminator where ive done some hacky stuff with gradients and distance tex to get an approximate reddening at sunset:


    Click image for larger version

Name:	latest photoreal.jpg
Views:	1001
Size:	1.49 MB
ID:	1155304





    it all falls apart when lit in the classic shot of the sun peeping out from behind earth, i.e. lit from behind:


    Click image for larger version

Name:	latest photoreal_backlit.jpg
Views:	1014
Size:	955.4 KB
ID:	1155305



    i am also missing all the volumetric goodness of clouds, and the earth itself, casting shadows through the atmosphere like this:


    Click image for larger version

Name:	aZ05rXX_460s.jpg
Views:	1133
Size:	12.0 KB
ID:	1155303

    appreciate thats actually cgi, but its still a very nice effect, just a bit more exaggerated than the real thing (and much nicer than mine)


    so, my question is, has anybody here (devs included) got a way to simulate a realistic planetary atmosphere in vray? i know its possible, as seen in a bazillion sci-fi films, just not sure if Vray can do it. or if its just me being ham fisted with the tools. (yes im throwing down a gauntlet)

  • #2
    This is awesome.

    Comment


    • #3
      what is your VRaySun color?
      Marcin Piotrowski
      youtube

      Comment


      • #4
        Originally posted by piotrus3333 View Post
        what is your VRaySun color?
        iirc its set to direct colour and pure white. however the actual visible sun is a sphere with a vraylightmtl on it, and lens efects glare... iirc that had a slight yellow hue... its never actually been visible in any of the shots ive used this model for, which is why the glare looks crap.. and the size is rather large. never needed to refine it.

        Comment


        • #5
          I thought I'd see if I could get some result...was a headache but sort of did.
          Managed to get it to fade out, though just realised it needs a slight adjustment, but you get the idea.
          Attached Files
          https://www.behance.net/bartgelin

          Comment


          • #6
            It'll give those cloud shadows of course also, which I didn't think it did...just noticed
            Attached Files
            https://www.behance.net/bartgelin

            Comment


            • #7
              What a fun thing to tdo...I figured out what was wrong with the falloff, so now it works in seemingly all cases, from far away and close up,
              which is nice
              No hacks, just scatter volume and the usual other bits.
              I only used one falloff map in the colour slot. I would have thought it'd go in the radius but very little seems to work in that slot and what does is not pleasant.
              I also noticed that even with maps in the slots they are still overrided by the numeric amount, or the colour, which is confusing and threw me off a fair bit until I realised
              It's in no way to scale...actually only 35cms diameter but I'd guess it scales ok.
              Attached Files
              https://www.behance.net/bartgelin

              Comment


              • #8
                I was looking to this a while ago and stumbled on this youtube video of a guy doing everything in Unity.
                https://www.youtube.com/watch?v=DxfE...SebastianLague

                I was not able to replicate the atmospheric scattering, seems like you need to make your own shader for the Rayliegh scattering needed for a realistic representation.

                Comment


                • #9
                  That's a very interesting vid, thanks
                  I was chatting with a clever coder friend yesterday about this problem and he mentioned the atmospheres in Elite Dangerous,
                  so this is coincidental and appears to be what Elite does....or something very similar.
                  So saying, you'd think that Vray should be able to do this.
                  We can hope
                  https://www.behance.net/bartgelin

                  Comment


                  • #10
                    Here is a test I've done a while ago, environment fog and some displacement for the clouds:

                    Click image for larger version

Name:	planet5.jpg
Views:	765
Size:	163.8 KB
ID:	1155605
                    3D Scenes, Shaders and Courses for V-ray and Corona
                    NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
                    www.3dtutorialandbeyond.com
                    @3drenderandbeyond on social media @3DRnB Twitter

                    Comment


                    • #11
                      this is great! (and yes, it is fun to play with. )

                      Bart: the fact that you managed to get a soft fade off into space with scattervolume leads me to believe my issue may be scene scale.. my earth/moon etc are "realistically" scaled, in that at the start of the project i made an arbitrary decision to divide all real values by 10,000 to get a scene scaled in metres of a manageable size. so my earth is 637 metres in radius.

                      whatever i do with the scatter radius i get a hard edge on the scatter volume.. in an earlier thread on the same subject, somebody at Chaos showed me you can set values much higher than the spinner allows, using maxscript.. however even using stupidly high numbers with many zeros, i didnt manage to get anything even slightly effective. maybe i need to revisit that.

                      the challenge with the scattervolume (apart from the edge) is to dial in colours that work for all scenarios... your tests for example, are very green... ive found the same when testing.... to get a decent redness to the sunset, the atmosphere needs to be too greenish.... if i make the atmosphere a reasonable blue, i get way too much green and yellow in the sunset... i guess the atmospheric scattering model wont be entirely similar to whatever scattervolume does. be nice if there was a preset!


                      Sirio: you have some nice colouring and volumetric shadows going on there, but with env fog we dont get any approximation of wavelength specific scattering, so no colour shift at sunset for example...

                      Maybe it could be hacked like i have in my current faked setup, a hidden disc intersecting centre of the earth and facing the sun, and that driving a gradient ramp via distance tex to shift the actual diffuse colour of my atmosphere along the sun terminator on earth. it might help, but probably wouldnt work in extreme scenarios like sun poking out from behind earth..


                      that video is very interesting, and the fact that its realtime, when every attempt i try leads to chunky old rendertimes, is quite frustrating!

                      nice one everyone...

                      Comment


                      • #12
                        just to note, ive got some quite nice volumetric clouds going on with fastsss2 now, they even shift to red at sunset, although as above, they tend to have a touch of green and blue in them in places i dont want..


                        i also doubt the redness in the clouds is caused by their own scattering, rather due to the colour of light hitting them being shifted by the overall atmosphere....

                        probably a combination of both, but i guess that the atmosphere plays a much bigger part, otherwise thick clouds would tend to look reddish at all times.

                        however not having a functioning atmosphere, it generally looks better than not having the shift at all.

                        Comment


                        • #13
                          Originally posted by fixeighted View Post
                          I also noticed that even with maps in the slots they are still overrided by the numeric amount, or the colour, which is confusing and threw me off a fair bit until I realised
                          when you say overridden, do you mean that? as in i have to set the numeric values to zero or something? i understood they were multipliers or something..

                          Comment


                          • #14
                            Well all that I could see happening is if you have a map of some sort in the radius slot, then mostly maps don't even have any effect, but when they do then the map should override the numeric value but it doesn't.
                            Similarly if you have a map in the overall colour slot then changing the colour swatch also affects that, which just seems wrong to me...maps should override values as they do in all other cases.
                            https://www.behance.net/bartgelin

                            Comment


                            • #15
                              Scale doesn't seem to matter, I noticed. I also scaled yesterday's version (35cms radius) to 6000m and the result is the same using the same falloff. The scatter radius I just scaled up to match.
                              It's worth noting that I haven't used a complete sphere for the volum, rather a shelled one with the thickness roughly matching the scatter radius.
                              Also, phase set to 0.5 and upping the bounces to arbitrarily 20+.

                              Still thinking about the clouds but your idea is intriguing...
                              https://www.behance.net/bartgelin

                              Comment

                              Working...
                              X