POV-Ray : Newsgroups : povray.general : Shadow on alpha channel? : Re: Shadow on alpha channel? Server Time
1 Aug 2024 12:23:47 EDT (-0400)
  Re: Shadow on alpha channel?  
From: Slime
Date: 19 Oct 2005 22:35:04
Message: <43570258$1@news.povray.org>
> This process is very easily automated, and I think it is the best way to
> deal with this problem (other than adding a new keyword to povray). First,
> do others agree?

Yes, I think this is generally the process suggested (even in the links you
posted).

> Second -- and most importantly -- what is the best way to make an image
that
> is perfectly white except where shadows are cast?

This does it:

 texture {
  pigment {rgb 1}
  finish {ambient 0 diffuse 1 brilliance .0001}
 }

The light source must, of course, have the color "rgb 1" to get white where
light hits the object. The "ambient 0 diffuse 1" ensures that the color of
the surface will be exactly the color of the light that hits it (with no
added ambient light), and "brilliance .0001" ensures that the angle of the
light has (virtually) no effect on its brightness on the surface.

Sample scene:

camera {
 location <0,4,-5>
 look_at 0
}
sphere{0,1 pigment {rgb 1} translate y no_image}
plane {
 y,0
 texture {
  pigment {rgb 1}
  finish {ambient 0 diffuse 1 brilliance .0001}
 }
}

light_source {
 <1,1,-1>*999
 rgb 1

 area_light
 x*300,y*300, 17, 17
 adaptive 1
}

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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