POV-Ray : Newsgroups : povray.advanced-users : light filter in media : Re: light filter in media Server Time
5 Jul 2024 16:35:16 EDT (-0400)
  Re: light filter in media  
From: Kenneth
Date: 2 Jan 2008 02:45:01
Message: <web.477b3f5781a774e878dcad930@news.povray.org>
"Woody" <nomail@nomail> wrote:

> Also, how would I go about modifying this so it does not look like a black end
> has been pasted on a green cylinder?
>

Looking over your scene code and running it, I was wondering if the following
alternate code is what you're trying to achieve? I've reworked yours (and
eliminated the lights, which actually aren't necessary):

#include "colors.inc"

#declare cam_pos=(x*4+y*3+z*-2)*2;
camera {
 location cam_pos
 look_at (x*1+y*0+z*0)*0.5
}

 cylinder { 0, <1,0,0>, 1
   hollow
         pigment {color rgbt 1} // transparent

         finish{ ambient 0.000 diffuse 0.000 specular 0} // finish is optional
      // with this rgbt 1 object

        interior{
                media{
                        emission .6
                        density{
                            gradient x
                            color_map{
                               [0.0 color Green] // green media
                               [1.0 color rgb 0] // no media at all
                                     }
                               }
                     }
                }
        scale x*3
}

Ken W.


Post a reply to this message

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