POV-Ray : Newsgroups : povray.advanced-users : Controlling density : Re: Controlling density Server Time
31 Oct 2024 19:13:01 EDT (-0400)
  Re: Controlling density  
From: MichaelJF
Date: 13 Oct 2013 04:35:01
Message: <web.525a5aece6c9a291d9b93f5b0@news.povray.org>
"posfan12" <nomail@nomail> wrote:
> How do you control the density of a medium at a given point?
>
> For instance, if you use a spherical pattern then the medium is fully opaque at
> the center of the sphere, and is fully transparent at the outer radius.
>
> BUT, what if I want the sphere to be 25% transparent at 1/3 of the distance from
> the center?
>
> How do I control that?
>
> Thanks!
>
>
> Mike

Hi Mike,

you can use color_maps or density_maps within the media. Something like this:

 media{
    emission 0.75
    scattering {1, 0.5}
    density { spherical
      density_map {
        [0.0 rgb 0]
        [2/3 rgb 1]
        [1.0 rgb 1]
      }
    }
  }

Best regards,
Michael


Post a reply to this message

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