POV-Ray : Newsgroups : povray.general : Interpolating between textures using clock? : Re: Interpolating between textures using clock? Server Time
29 May 2024 17:00:33 EDT (-0400)
  Re: Interpolating between textures using clock?  
From: Bald Eagle
Date: 2 Feb 2022 20:35:00
Message: <web.61fb310e7de8ac01f9dae3025979125@news.povray.org>
"tutki" <nomail@nomail> wrote:
> I have an object that simulates a generic computer screen using the `cells`
> texture to generate a grid of random-colored pixelated blocks.  I'd like to make
> an animation of this where the "screen pixels" gradually change in color based
> on the `clock` variable. Is there a simple way to do this?
> My current idea is to somehow interpolate between two `cells` textures (by
> displacing them relative to each other by some random integral offset) and doing
> the equivalent of pigment1*clock + pigment2*(1-clock). So basically interpolate
> between two random cells patterns according to the value of clock (or some other
> such derived variable). But I can't figure out how to express this in SDL?  Can
> anyone help?


Assuming that your cells pattern has a pigment_map associated with it ...

Why don't you change the definition of the pigments in the map by interpolating
between two rgb values per map entry?

Probably best to do this around the HSV wheel, rather than directly in
rgb-space, otherwise you usually cross through a gray-region....

Post a reply to this message

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