POV-Ray : Newsgroups : povray.general : Interpolating between textures using clock? : Re: Interpolating between textures using clock? Server Time
2 Dec 2022 21:34:28 EST (-0500)
  Re: Interpolating between textures using clock?  
From: tutki
Date: 3 Feb 2022 13:00:00
Message: <web.61fc17fb7de8ac05c8e85ceb98f01db@news.povray.org>
Josh English <Jos### [at] joshuarenglishcom> wrote:
> On 2/2/2022 4:25 PM, tutki 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?
> >
> >
> The cells pattern can be updated with the phase keyword. Use a color map
> that doesn't blend colors and you can simulate blinking of colors.
[...]

Oh nice, I didn't know `phase` works with `cells`.

But it doesn't solve my problem though: it doesn't smoothly interpolate between
colors, it just jumps around randomly. What I want is a way to smoothly
interpolate between one cells state and another.  Perhaps some kind of shifting
color_map?


Post a reply to this message

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