POV-Ray : Newsgroups : povray.binaries.images : Finally, the rings are visible, but... : Re: Finally, the rings are visible, but... Server Time
5 Nov 2024 01:20:48 EST (-0500)
  Re: Finally, the rings are visible, but...  
From: Jörg 'Yadgar' Bleimann
Date: 29 Nov 2009 18:13:07
Message: <4b130003@news.povray.org>
High!

Reactor wrote:

> They cannot cast a shadow, if they do not absorb light (since the extinction is
> zero and there is no absorption).  You can either fake a shadow, by placing
> another ring with the no_image keyword and allow it to cast a shadow, or you
> could adjust the media to make it do both.
> 
> I am not sure what you mean by invisible rings that cast a shadow - they don't
> show up against the planet or space in lit areas, but the shadow does?  Also,
> increasing all of the density_maps values is equivalent to increasing the
> scattering color (second parameter).  Can you post some of the code?

Whenever I add even the slightest absorption media and/or extinction, 
the rings simply disappear - but strangely, only now cast a shadow on 
the planet!

Here is the code:

difference // rings
{
   cylinder
   {
     <0, -0.11, 0>/sc, <0, 0.1, 0>/sc, 140390/sc
   }
   cylinder
   {
     <0, -0.12, 0>/sc, <0, 0.11, 0>/sc, 74510/sc
   }
   /* cylinder // unlit side!
   {
     <0, -0.15, 0>/sc, <0, -0.1, 0>/sc, 150000/sc
     texture
     {
       cylindrical
       texture_map
       {
         [0                                   Ring_UnlitSide_Map_1_to_255 ]
         [255*(((140390-74510)/140390)/1500)  Ring_UnlitSide_Map_256_to_510]
         [510*(((140390-74510)/140390)/1500) 
Ring_UnlitSide_Map_511_to_765]
         [765*(((140390-74510)/140390)/1500) 
Ring_UnlitSide_Map_766_to_1020]
         [1020*(((140390-74510)/140390)/1500) 
Ring_UnlitSide_Map_1021_to_1275]
         [1275*(((140390-74510)/140390)/1500) 
Ring_UnlitSide_Map_1276_to_1500]
       }
       scale 140390/sc
     }
   } */
   #if (lores)
     texture // low resolution texture: 255 entries in ring color map
     {
       pigment
       {
         cylindrical
         color_map
         {
           #declare a=0;
           #while (a<255)
             #declare c=eval_pigment(Saturn_Rings_Colors, 
<509/510-a/255, 0.5, 0>);
             #declare f=eval_pigment(Saturn_Rings_Transparency, 
<509/510-a/255, 0.5, 0>);
             [a*(((140390-74510)/140390)/255) rgb c filter f.gray]
             #declare a=a+1;
           #end
         }
         scale 140390/sc
       }
       finish { F_Saturn_Rings }
     }
   #else
     hollow
     pigment { rgbt 1 }
     interior
     {
       media
       {
         scattering
         {
           5, 1
           eccentricity -0.4
           extinction 0
         }
         // absorption 0.
         density
         {
           cylindrical
           /* density_map
           {
             [0                                   Ring_Color_Map_1_to_255]
             [255*(((140390-74510)/140390)/1500)  Ring_Color_Map_256_to_510]
             [510*(((140390-74510)/140390)/1500) 
Ring_Color_Map_511_to_765]
             [765*(((140390-74510)/140390)/1500) 
Ring_Color_Map_766_to_1020]
             [1020*(((140390-74510)/140390)/1500) 
Ring_Color_Map_1021_to_1275]
             [1275*(((140390-74510)/140390)/1500) 
Ring_Color_Map_1276_to_1500]
           } */
           density_map // preliminary low-res version
           {
             #declare a=0;
             #while (a<255)
               #declare c=eval_pigment(Saturn_Rings_Colors, 
<509/510-a/255, 0.5, 0>);
               #declare f=eval_pigment(Saturn_Rings_Transparency, 
<509/510-a/255, 0.5, 0>);
               [a*(((140390-74510)/140390)/255) rgb c*3000 /* filter 
f.gray */ ]
               #declare a=a+1;
              #end
            }
            scale 140390/sc
         }
       }
     }
   #end
   }
   SetAxis(bodies[72][10], bodies[72][11])
   translate Pos_Saturn/sc
}

See you in Khyberspace!

Yadgar


Post a reply to this message

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