POV-Ray : Newsgroups : povray.advanced-users : Controlling density : Re: Controlling density Server Time
31 May 2024 22:33:11 EDT (-0400)
  Re: Controlling density  
From: MichaelJF
Date: 13 Oct 2013 07:40:00
Message: <web.525a85d0e6c9a291d9b93f5b0@news.povray.org>
Better to  have a complete example:

global_settings { assumed_gamma 1 }
 background { rgb 1 }
 camera { location <3,4,-5>*.8 look_at 0 angle 35 }
 light_source { <20,40,10>, 1 }

 box // floor
 { <-1.5,-1.01,-1.5>, <1.5,-1.2,1.5>
   pigment { checker rgb 0.75, rgb 0.25 scale 0.2 }
 }

 box
 { -1,1 pigment { rgbt 1 } hollow
   interior
   { media
     { scattering { 1, 0.5 }

       density {
          gradient y
          color_map {
             [ 0 rgb 1 ]
             [ 1/3 rgb 1 ]
             [ 2/3 rgb 0 ]
             [1 rgb 0 ]
          }

          scale 2
          translate -y
       }

     }
   }
 }
 cylinder
 { <0.9, -1, 0.7>, <0.9, 0.9, 0.7>, 0.5
   pigment { rgb <1, 0.8, 0.5> }
 }


This is a modification of the demo-scene from the POV-documentation. I added
only the density (scaled and translated to meet the scene). As you can see,
there is no density at the top third, increasing to 1 at the bottom third.

Best regards,
Michael


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.