POV-Ray : Newsgroups : povray.animations : Fading objects in an animation. : Re: Fading objects in an animation. Server Time
28 Jul 2024 14:21:01 EDT (-0400)
  Re: Fading objects in an animation.  
From: Mike
Date: 6 Oct 1999 05:21:19
Message: <37FB1273.C6BD7A52@aol.com>
> What would be the easiest way to fade in/out a single object in a
> scene?  (I have a tiled floor that I would like to just fade out over a
> few frames.)  Any help and suggestions would be greatly appreciated.

Say you are using a clock that goes from 0 to 5 and want it to be visible
to frame 1 and fade out up to frame 2, then you might do this:

#if (clock < 2)

plane {y, 0

#if (clock < 1)
pigment {color rgb <1, 1, 1>}
#else
pigment {color rgbt <1, 1, 1, 0+(clock-1)>}
#end

}

#end

The idea here being that the color is static from frames 0 to 1, then has
the transparency increase from 0 to 1 from frame 1 to 2.  After that the
plane is not rendered, which should help save on some rendering time.

-Mike


Post a reply to this message

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