POV-Ray : Newsgroups : povray.general : alpha masking (again?) : Re: alpha masking (again?) Server Time
5 Nov 2024 03:18:15 EST (-0500)
  Re: alpha masking (again?)  
From: PoD
Date: 17 Jul 2003 07:02:13
Message: <pan.2003.07.17.11.02.10.473216@internode.on.net>
On Wed, 16 Jul 2003 18:43:28 -0600, Michael Sobers wrote:

> In an earlier post, Scott Gammans asked a question regarding masking out
> objects using something he described as an "alpha_only" property (search
> general for "alpha masking").  After a verbal pummeling on why this would be
> useless to speed up rendering, someone made the (somewhat helpful)
> suggestion of using different colors to "key out" parts of the picture.
> 
> This is exactly the scenario that would benefit from using an "alpha_only"
> object.  For instance, I am adding animated objects to a live video, and I
> need a way to mask out sections of the video foreground so that the CG
> objects can go "behind" objects in the video.  I have used color keying
> (placing bright green objects in the foreground to mask regions out) but
> this causes some artifacts along antialiased edges and causes problems with
> reflective surfaces.  An "alpha_only" object would be most helpful here.
> Since that feature probably won't be available soon, is there an easy way to
> "fake" it using bounding or some kind of surface checking?  For instance, if
> a ray hits the masking object, the pixel is automatically set to
> transparent?  I have thought about using CSG difference to "remove" portions
> of the background objects at the appropriate spots, but I haven't tried it
> yet (seems like it might be time consuming getting all the angles to line up
> right with the camera).
> 
> Any suggestions?  Thanks!
> 
> -------------------------
> text{ttf "crystal.ttf", "Mike", 0.01, 0 pigment {blue 10}translate
> <-1,-0.2,2>}

One idea you could try is clipping your whole scene with an inverse
object. i.e.

union{
   put your whole scene here
   
   clipped_by{
   object{blah inverse}
}

This should not render any rays that hit the clipping object.
It will probable play hell with your render times and may not work as
expected...


Post a reply to this message

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