Announcement

Collapse
No announcement yet.

mask vrayscattervolume with opacity map

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

  • #16
    Still away from machine but brain keeps spitting out ideas. If i can increase scattervolume radius setting much higher than ui limit with that script, then i could use vraydistance tex, with earth as driver geometry, to get a realistic exponential density reduction as altitude increases.. Might even start to look quite realistic!

    That is assuming that a) distance tex gives a volumetric output and b) scattervolume radius can be varied throughout volume and not only on geometry surface.. If i remeber correctly the answer is yes to both.

    ​​

    All that remains is to get muuch higher max radius value than scattervolume ui allows - high enough to be effectively invisible even when backlit by sun

    Another thought, if the texture to drive radius is a multiplier of the radius setting, with white being 1 and black being 0, maybe i could crank output of map beyond white to get bigger radius values..?


    The script snippet might work, but given my total lack of scripting, im not even sure how to actually use it

    Ugh! Its saturday but i wish i was at my desk
    ​​​​​​. What a nerd.
    Last edited by super gnu; 19-12-2020, 05:09 AM.

    Comment


    • #17
      Interesting. The VolumeGrid does not give you specific scatter color. I was able to map colors based on a VRayDistanceText to change the color by altitude (distance from the planet). This looks pretty cool. I wanted to mess with Camera axis falloff maps, but I could not get them to work with the Volume Grid. Even the OSL one didn't seem to work.

      I have not researched it, but I assume the color changes at the terminator are based on particulates in the atmosphere varying in size based on altitude, with larger particles closer to the planet causing more of a red shift due to their size (pollution). So I guess the blue atmosphere would go out over the red at the terminator (like in this example). (Since the sun would hit more of the high-altitude finer particles causing Rayleigh scattering (blue sky) where the planet shaded the lower altitude stuff at the edge). But I could be totally wrong.

      This is a lower quality render because I didn't want to wait for it, but the noise would go away of course:

      Click image for larger version

Name:	image_61810.png
Views:	292
Size:	476.7 KB
ID:	1096603
      Scene: SphereTest05.zip
      Attached Files

      Comment


      • #18
        You can likely forget about the MIE part of scattering (that's the one which deals with dust-sized particles.) and concentrate on the Rayleigh part (which deals with molecule-sized obstacles instead.) at this distance.
        You'll see MIE being predominant if, f.e., you're looking at a polluted city, or at a dust storm, or at a foggy environment (then water isn't molecule-sizes, but droplet-sized.).
        It's generally quite localised an effect, on Earth.
        MIE also generally results in a desaturated, grayish color.
        Anything else is Rayleigh.
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #19
          thanks for continued brainstorming guys..!

          so i did a quick test boosting the scattervolume radius using an output map to take values waaay above 1 in the scatter radius map slot (driven by distance tex providing exponential density reduction as distance from earth increases... i actually start to get some quite nice effects with sun peeping out from behind earth ( redder at lower altitudes, fading to blue at higher altitudes, as would be expected.. however i just cant get a soft faded edge on the damn thing. even if it appears somewhat soft when front lit, the moment the sun hits it from behind, its solid all the way to the sphere edge.


          i am also painfully aware that using scattervolume means i have no possibility to enter the atmosphere.. since it does not support cameras inside volume.


          which i guess means i should be looking at volumegrid. however that does not appear to support true light scattering in the same way scattervolume does. ? or am i wrong?

          Comment


          • #20
            Originally posted by Joelaff View Post
            Interesting. The VolumeGrid does not give you specific scatter color. I was able to map colors based on a VRayDistanceText to change the color by altitude (distance from the planet). This looks pretty cool. I wanted to mess with Camera axis falloff maps, but I could not get them to work with the Volume Grid. Even the OSL one didn't seem to work.

            I have not researched it, but I assume the color changes at the terminator are based on particulates in the atmosphere varying in size based on altitude, with larger particles closer to the planet causing more of a red shift due to their size (pollution). So I guess the blue atmosphere would go out over the red at the terminator (like in this example). (Since the sun would hit more of the high-altitude finer particles causing Rayleigh scattering (blue sky) where the planet shaded the lower altitude stuff at the edge). But I could be totally wrong.

            This is a lower quality render because I didn't want to wait for it, but the noise would go away of course:

            Click image for larger version

Name:	image_61810.png
Views:	292
Size:	476.7 KB
ID:	1096603
            Scene: SphereTest05.zip
            could you save a copy of your test scene out for max 2018? cant open it!

            Comment


            • #21
              Here you go.

              Hopefully this works.

              SphereTest05_2018.zip

              Comment


              • #22
                actually probably dont bother! i had a play with volumegrid based option, and a) it doesnt work with IPR so tweaking is painful, and b) rendering is insanely slow, so no good for the animation i have to render.

                i think ive managed to get a fudgily "correct" look using vrayscattervolume layered with some classic fresnel opacity mapped spheres to provide a blue high-alititude fade off into space. its not perfect, but holds up ok unless you study the edges too closely. ill also have to forget about going into the atmosphere, but then the maps would fall apart if i got that close anyway.

                ive also done my hacky distance-tex driven cloud colour changes. currently takes about 20 mins a frame at 4k on my 3990x.. im hoping to cut that in half with some tweaks.

                i would love to improve the "fluffiness" of the clouds, since just using the nasa cloud texture for displacement doesnt give the best effect...

                ideally i would use the texture to drive a volumegrid based procedural cloud setup for proper 3d fluffy clouds... but it would take weeks to get reasonable looking and probably take the same amount of time a frame to render.

                if i have more spare time (unlikey) i guess i might be able to do something with scattervolume, but im guessing that would require creating actual geometry to texture, which would be an absolute killer.

                Click image for larger version

Name:	earth5.jpg
Views:	335
Size:	1.67 MB
ID:	1096808
                Attached Files

                Comment


                • #23
                  VolumeGrid DOES work with IPR, but you have to set your renderer to GPU first. Not sure why, or if this is a bug.

                  For the clouds perhaps you could threshold the clouds and then use a noise texture for bump or displacement using the clouds as a mask.

                  What you have looks pretty nice, better than 90% of planet renders out there in film/TV.

                  How did you get the sharp terminator effect (LightWave use to have a Sharp terminator option, just for this)? Or is just from the large scale and small lightsource? What is the light source?

                  Comment


                  • #24
                    You could always render a simple sphere with the light in a slightly different position (or wider light source) and then use this to comp a blue haze past the terminator for a bit of a scatter effect. Generally for something like this I would do a lot of it in the post because it is faster and more controllable, also easy to change if you or a client changes their mind (rare, I know).

                    Comment


                    • #25
                      So your shot is going from a wide like this right through the atmosphere to the surface?
                      https://www.behance.net/bartgelin

                      Comment


                      • #26
                        Originally posted by fixeighted View Post
                        So your shot is going from a wide like this right through the atmosphere to the surface?
                        at the moment the shots are likely to stay in orbit.. however the idea is to make the model as flexible as possible for potential follow up work from the same client.

                        Comment


                        • #27
                          Originally posted by hermit.crab View Post
                          We'll see if we can think of something. For now, I guess you can try using a Falloff map for the Scatter radius for a fade effect.

                          EDIT: I've logged an improvement request (internal bug-tracker id: VMAX-10584) for opacity control in the VRayScatterVolume.
                          I'm using Vrayscattervolume material now and cannot see any opacity map still. Is this going to be implemented at all? Right now I'm creating a cloud layer at fairly low altitude, using a cloud map and some vraydisplacement. It looks fairly good but because there is no opacity map it really affects the underlying layers.
                          Regards

                          Steve

                          My Portfolio

                          Comment

                          Working...
                          X