3
$\begingroup$

How to create / animate a noise type image / texture using a given color palette

I have a specific color palette I want to use to create / animate a tv noise effect (along with being able animate the scaling and rotation of it).

I was looking at the Noise Texture Node but didn't see a way to input a specific color texture palette.

My thought process:

  1. Import a color texture palette. (I did think of importing the individual colors as RGB values but importing 100+ RGB values using python but thought that maybe over kill)

img1

  1. Convert / Use those colors as a noise texture.

  2. Animate / loop the noise texture using the given color palette (along with being able animate the scaling and rotation of it). img2

I was looking at the Noise Texture Node but didn't see a way to input a specific color texture palette.

$\endgroup$
2
  • 1
    $\begingroup$ Is the idea to use the colors to animate a monochrome noise, by selecting parts of the spectrum per frame? $\endgroup$
    – Robin Betts
    Commented Jul 21, 2021 at 11:39
  • 2
    $\begingroup$ @RobinBetts The idea is to have the color of the noise get generated from the color palette. So if the noise is made of red and green colors the noise will be made of the color red and green. $\endgroup$
    – Rick T
    Commented Jul 21, 2021 at 13:11

2 Answers 2

4
$\begingroup$

If you can provide your palettes as images, not containing any out-of-palette colors, you can do something like this..

Some textures you may use as your noise, produce a random color output. Instead of using that RGB as a color, you can consider the color's R and G to be the U and V coordinates at which to sample your palette-image:

enter image description here

Here,the output 'Color' of a Voronoi texture is used to look up a color from a palette image called p2.png.

(There's other stuff going on.. the 'Distance' of the Voronoi is being used to create a mask against black, and a shift of the overall coordinates of the texture are being driven by some function of #frame. That would vary, according to what you need your texture to look like.)

The result using p1.png, (which is shown on the left):

enter image description here

The result using p2.png:

enter image description here

Here, the palette-images are square, mapped 0-1 in X and Y, and include no irrelevant colors. Voronoi spreads its output color evenly across the 0-1 range, so equable sampling is relatively easy.

But you may have to watch out with other shapes/styles of palette, and mappings.

The color of the random output of some textures is not evenly distributed in the 0-1 RGB range, so may bias the selection from the palette. You could, for example, include a frame-dependent White-Noise jitter on the UV lookup to overcome that? That would be a few more nodes.

If you have particular constraints on those other aspects, and get stuck, edit your question, and I would be happy to edit this answer in an attempt to cope with them.

$\endgroup$
0
$\begingroup$

To get colors from your noise texture you can use this nodes setup, but of course that's a very time consuming solution with a color palette...

enter image description here

But if you know python maybe you can add the colors to Colorramp via python too ;)

$\endgroup$
1
  • $\begingroup$ Trying to do this with 100's of color in palettes wouldn't work. I'm not that good at python (at the moment) I can just edit stuff that other people have written. $\endgroup$
    – Rick T
    Commented Jul 21, 2021 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .