Announcement

Collapse
No announcement yet.

mask vrayscattervolume with opacity map

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

  • mask vrayscattervolume with opacity map

    ok i know this is a rewording of my previous post, but maybe ill get a bite with a more generic subject.

    the scattervolume does not have an opacity map slot.

    placing it in a blend material as a coat and using a mask map kills it completely

    i kinda understand that an opacity map on a volumetric material is probably horribly physically incorrect.. however, the fastsss2 material has an opacity slot... so...

    i just want to fade out my planet atmosphere at the edges...

  • #2
    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.
    Last edited by hermit.crab; 18-12-2020, 05:51 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Originally posted by aleksandar.hadzhiev 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.
      ive tried that, but unfortunately i already have the scatter radius at its maximum value to give the effect i want on a 2km wide sphere.. it would be even worse on a real-scale planet. its still quite visible at that scatter radius setting when the sun hits it.

      if there is a way to go above that maximum spinner value i might be able to get something to work, but it seems a large radius is not the same thing as "invisible"

      being able to fade out a sphere of vrayscattervolume at the edges would be a very nice way to to do planet atmospheres... as it is, ive seen several tutorials using a similar setup in other renderers, but it seems its not actually possible in vray to do a decent a planet atmosphere.

      Comment


      • #4
        Try using this MaxScript to go above the maximum value and see if it makes any difference:
        Code:
        .scatter_radius
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          This is very quick and dirty and I have no idea how close/far to the planet you're going but this is with a ramp, from whatever colour to black, in the overall colour slot, which seems to fade it out...
          Attached Files
          https://www.behance.net/bartgelin

          Comment


          • #6
            thanks for the test, however having it fading to black at the edges is no good.. i need satellites rotating around the earth.. they would be cut off by a hard edge you cant see. there is also a starscape/moon behind which would have the same problem.

            Comment


            • #7
              Yeah I thought that may be an issue. I was looking at the alpha while testing it and I did at one point have a faded alpha, though it wasn't right in the rgb iirc, so back to square one.

              I was planning on looking at this again today but sadly my annoying client has now decided that they want all their 26+ final images asap, after of course weeks of silence
              Very interested to see your result if you get one any time soon.
              https://www.behance.net/bartgelin

              Comment


              • #8
                I wonder if you could do this with Phoenix. Emit a tiny bit from a sphere with some smoke fading and no gravity or turbulence.

                Or a volume grid with a texture.
                Last edited by Joelaff; 18-12-2020, 01:11 PM.

                Comment


                • #9
                  Yeah that is a similar idea to one I saw whilst researching this yesterday....done with Maya fluids...similar to this I think https://lesterbanks.com/2012/07/crea...fluid-shaders/
                  Shame we don't have the ability to do it in vray though....yet
                  https://www.behance.net/bartgelin

                  Comment


                  • #10
                    Here is a rough test with a VRayVolumeGrid (using no input file the Volume Grid makes a grid filled with Smoke). We then use a Falloff texture to control the density. I put a curve on the Falloff to get a more geometric falloff. This can be adjusted easily enough.

                    I put some cube "satellites" in there to show how it works with objects in the atmosphere. Note they cast volumetric shadows (you can see this next to the middle cube). This could be turned off if you don't like it. There is a tiny bit of fill light from a dome light (not realistic, I know). The dome light excludes the VolumeGrid for speed. You could use a VRayAmbient light for fill on the VOlumeGrid if desired (MUCH faster, and you wouldn't notice much difference here except for volumetric shadows.)

                    You can adjust the density of the grid (CellSize) in the Volume Grid to control the quality/speed. It looks like it will render slow, but then gets pretty fast at the end.

                    Note that this is its own atmospheric/volumetric shadier, and may not play nicely when combined with other volumetric shaders.

                    Note also, I think the bucket renderer goes faster with volume grids. I just left this scene on Progressive.

                    A Phoenix solution did render faster, but I was having trouble getting it totally smooth, even with input Smoothing. This VolumeGrid method is slower because it is rendering a volumetric texture, but it is more versatile. You could mix some fractal noise into the falloff to get some detail, etc.

                    Click image for larger version  Name:	Atmosphere.png Views:	0 Size:	343.3 KB ID:	1096548

                    SphereTest03.zip
                    Attached Files
                    Last edited by Joelaff; 19-12-2020, 02:05 AM.

                    Comment


                    • #11
                      Here's another version with the sun increased a couple stops...

                      Click image for larger version

Name:	AtmosphereB.png
Views:	402
Size:	366.5 KB
ID:	1096558

                      Scene: SphereTest04.zip

                      Comment


                      • #12
                        Hehe, nice one and a good solution it seems
                        https://www.behance.net/bartgelin

                        Comment


                        • #13
                          Originally posted by fixeighted View Post
                          Hehe, nice one and a good solution it seems
                          I think the Phoenix solution requires further study, because it *is* faster to render, and could potentially have fluid dynamic noise in it (like turbulence). However, I think atmospheres are generally very smooth, and don't have much variance that you could see. I tell you this from my extensive experience as an astronaut.. oh wait, that's just my dream.

                          I just had some issue getting it to be smooth with 16million cells. You could go higher than that of course, and it would probably be smooth at 32 or 64 million. I like the Volume Grid method because you can change the resolution at any time. It seems like it is going to be very slow to render when you start the render, but then it ends up being relatively fast in that it doesn't take much more refinement.

                          I think either method will give you a way to map a variety of colors to the atmosphere (by "altitude"). So if you wanted that variance I think it is possible (get creative with the maps, or animated RGB output from Phoenix.)

                          Of course the way we used to do it 20-30 years ago was to just use a second sphere, possibly with a second (wider) light source to create the "scatter" effect, and then comp that in add mode in post, which obviates the need for any sort of specific transparency, but requires a basic knowledge of rendering in passes and compositing (which I would encourage any 3d artist to learn anyway).

                          Comment


                          • #14
                            Or, from the cat-skinning methodology manual, there is always this method https://www.youtube.com/watch?v=iT12...l=VideoCopilot
                            As a valid comment I read went, it's shot dependent, so whatever works with one shot may not translate to another....so always nice to have options
                            https://www.behance.net/bartgelin

                            Comment


                            • #15
                              hey nice set of replies going on! thanks for your input, its a very interesting project. -in fact its not due to start till after christmas, but im enjoying playing.

                              im interested in the volumegrid option, however i discounted it since as far as i knew you dont have the "scatter colour" settings you get with sss... this is, unfortunately, the whole point of the exercise. i can get a relatively convincing bluish atmosphere with a few extra spheres and some falloff (minus the nice atmos. shadows) .. what i can't get, is the colour shift at the sunrise/set terminator. with vrayscattervolume, i can just about get something nice looking (colour shifts not totally accurate when backlit by sun at edge of earth, but better than without)



                              does volumegrid allow sss/scatter colour effects? (im away from pc atm)

                              im now working on a hack to tint the clouds at the terminator too... i tried with fastsss2, which kinda worked, but rendered slow. now im going "full hack" with a plane intersecting earth, lookat constraint to sun, non renderable... this drives a distance tex to mask area at terminator, and drives a gradient ramp to change diffuse of clouds in that area from white to yellow then red. finally thats masked with a falloff set to light/dark mode, to change colour of clouds only on sunlit side.

                              think it will work, but my goodness the material editor is going slow... even with manual update enabled on the sample swatches, wireframe in viewport, im getting 10-30second delays on each tweak.
                              Last edited by super gnu; 19-12-2020, 04:23 AM.

                              Comment

                              Working...
                              X