POV-Ray : Newsgroups : povray.binaries.images : Scattering media with a color_map - how to do? : Re: Scattering media with a color_map - how to do? Server Time
4 Nov 2024 19:15:14 EST (-0500)
  Re: Scattering media with a color_map - how to do?  
From: Alain
Date: 22 Nov 2009 23:13:18
Message: <4b0a0bde@news.povray.org>

> High!
> 
> Still trying to get believable Saturnian rings... so I worked through 
> the media section of the manual to finally get scattering media which 
> shows cylindrical banding - but my attempts failed so far.
> 
> Here is the code for the test scene attached below:
> 
> union
> {
>   sphere
>   {
>     0, 1
>     texture
>     {
>       pigment { color rgb <0.6, 0.4, 0> }
>       finish { ambient 0.02 diffuse 1 brilliance 0.8 }
>     }
>   }
>   difference
>   {
>     cylinder
>     {
>       <0, -0.001, 0>, <0, 0.001, 0>, 3.68
>     }
>     cylinder
>     {
>       <0, -0.0011, 0>, <0, 0.0011, 0>, 1.75
>     }
>     hollow
>     pigment { rgbt 1 }
>     interior
>     {
>       media
>       {
>         emission 0.75
Considering the final thickness and the view point, that's huge...
>         scattering
>         {
>           1, 0.1
>           extinction 1
>         }
>         density
>         {
>           cylindrical
>           color_map
>           {
>             [0 rgbf <1, 0.8, 0.7, 0.1> ]
>             [0.3 rgbf <1, 0.8, 0.7, 0.1> ]
>             [0.3 rgbf <0.1, 0.3, 0.1, 0.95>]
>             [0.35 rgbf <0.1, 0.3, 0.1, 0.95>]
>             [0.35 rgbf <0.9, 0.83, 0.3, 0.2>]
>           }
>           scale 3.68
>         }
>       }
>     }
>   }
>   rotate <-4, 7, 0>
>   scale 10000
>   translate z*50000
> }
> 
> // end of code
> 
> Whatever I tried, the cylindrical pattern never showed up - instead I 
> got a uniformly white ring! What's my mistake?
> 
> See you in Khyberspace!
> 
> Yadgar
> 
> ------------------------------------------------------------------------
> 

Personaly, I'd start by removing the emissive media, or tone it down a 
lot. No more than emission 0.001.

Next, use scattering type 5 with a negative exentricity for the outer 
rings: most of the incoming light is scattered back. Use a second media 
with type 2 or 3 for the inner ring, also, with a much lower density.

Not sure about your use of a filtering component in your color_map.

You scale the rings by 10 000. That means that there is 10 000 times 
more media. The thickness of the ring goes from 0.002 to 20. Then, with 
your very oblique view, you probably travel at least 5 times longer 
through the media. This may explain, toggether with your emissive media, 
why you get that saturated white ring.



Alain


Post a reply to this message

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