POV-Ray : Newsgroups : povray.general : Animating Color Maps : Re: Animating Color Maps Server Time
19 Nov 2024 15:52:53 EST (-0500)
  Re: Animating Color Maps  
From: Chris Colefax
Date: 11 Feb 2002 23:44:39
Message: <3c689db7@news.povray.org>
Mitchell Waite <mit### [at] dnaicom> wrote:
> Is there a way to animate a color map in POV Ray. In other words say I
have
> a terrain aerial map in color. I want to make an animation showing the
color
> of the trees going from green to brown and snow to appear. I can paint up
> different color maps but how would I get them to change in POV Ray?

You can animate colour maps directly by adjusting their index and colour
values using the clock, e.g.:

color_map {
    [From (0, 0.1) To (1, 0.2) rgb <0.4, 0.2, 0>]
    [From (0, 1) To (1, 0.4) rgb From (0, <.2, .6, .3>) To (1, <.5, .3,
.1>)]
    [From (0, 1) To (1, 0.5) rgb <.95, .96, 1>]
    }

This example uses the Automatic Clock Modifier macros
(http://www.geocities.com/ccolefax) to create a (very simplified) seasonal
change, the middle green section changing to brown and snow appearing from
above (when used as a gradient).  Any functions of the clock could be used
to create very complex, shifting colours.

For image-maps, or indeed colour maps, you can use the average pattern to
blend between two pigments/textures, e.g. (again using the macro file):

Texture_From (0, SummerTexture)
    To (0.25, AutumnTexture)
    To (0.5, WinterTexture)
    To (0.75, SpringTexture)
    To (1, SummerTexture)


Post a reply to this message

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