POV-Ray : Newsgroups : povray.binaries.images : Stupid Beginner's Media Problem : Re: Stupid Beginner's Media Problem Server Time
4 Nov 2024 19:17:23 EST (-0500)
  Re: Stupid Beginner's Media Problem  
From: Alain
Date: 12 Nov 2009 16:11:43
Message: <4afc7a0f$1@news.povray.org>

> High!
> 
> After Christoph's suggestion to use media for my Saturn's rings, I 
> started working through the Media Tutorial in the POV manual to get a 
> thorough understanding of what's media all about... but already at the 
> first simple demo scene, I ran into an impossibility:
> 
> Why gives
> 
> sphere // transparent sphere containing media
>  { <0, 2, 0>,1
>    pigment { rgbt 1 }
>    hollow
>    interior
>    { media
>      { emission 1
>        density
>        { spherical density_map
>          { [0 rgb 0]
>            [0.4 rgb <1,0,0>]
>            [0.8 rgb <1,1,0>]
>            [1 rgb 1]
>          }
>        }
>      }
>   }
> }
> 
> which I literally copied from the tutorial (except for the position of 
> the sphere's center), no visible media at all? Yes, I noticed that 
> emitting media is best visible against dark backgrounds, so I set the 
> ground plane to rgb 0.2 - but all I ever get is an empty grey plane 
> beneath an empty black sky!
> 
> When I lower the sphere's pigment's rgbt level, the sphere becomes 
> visible (therefore, no wrong camera orientation), but still with no 
> visible media inside...
> 
> See you in Khyberspace!
> 
> Yadgar

The spherical pattern is centered at <0,0,0> and it density drops to 
zero at a radius of 1 unit.
The result is that the density is zero where you placed your sphere.
If you'd made your sphere larger, it would have had some non-zero media 
inside of it.

The same apply to the boxed, cylindrical and planar patterns. They are 
all defined passing by the origin.

The cure is to create the container around the origin, then to translate 
it to where you want it.

boxed have a density of 1 at the origin, it drops to zero at coordinate 
+1 and -1 on each axis.
cylindrical have a value of 1 ON the Y axis, droping to zero at radius 1 
around it.
planar have a value of 1 on the X-Z plane and drop to zero at +1*y and -1*y.




Alain


Post a reply to this message

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