Announcement

Collapse
No announcement yet.

Environment Fog density based on sub-surface depth?

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

  • Environment Fog density based on sub-surface depth?

    I'm trying to alter the density of an object's environment fog based on the distance inside it's surface. Can the SamplerInfo node (or any other node) tap into an exposed parameters to gather this information?

    Essentially I'm looking to create a planetary atmosphere where upper ranges are extremely thin and become dense only near the surface. Switchng from Mental Ray recently I'm not quite sure how to tackle this in Vray. Though I might uncover something in the Extra Vray Attributes, but not finding an obvious solution.
    Troy Davis
    Animation Director
    atomicpictures.com

  • #2
    VRayDistanceTex might be useful for this. Just make sure that "inside separate" and "outside separate" options are both off and you use a more recent nightly build. Even so, it might take a while to render - the distance texture is quite expensive.

    Best regards,
    Vlado
    Last edited by vlado; 15-07-2015, 10:13 AM.
    I only act like I know everything, Rogers.

    Comment


    • #3
      Attached is a scene that might do what you want. Note that the outer sphere just contains the volume shader and has a fully transparent surface shader. The second sphere (the smaller one) is used in a VRayDistanceTex texture to drive the volume density, and it is also the surface sphere that gets rendered. A drawback of this approach is that it is slow and you might also see polygonal artifacts because the fog density is driven by distance to a polygonal mesh.

      However, since this is all about spheres, you might also get a much (much) faster render if you use a texture that just works with distances from the center of the sphere and some multiply/divide/subtract nodes.

      Best regards,
      Vlado
      Attached Files
      I only act like I know everything, Rogers.

      Comment


      • #4
        Thanks Vlado, this info really points me in the right direction. Now if I can just hurry up and render this Pluto fly-by NASA need this afternoon
        Troy Davis
        Animation Director
        atomicpictures.com

        Comment

        Working...
        X