Color target tracking


I wonder if there is a way of making a target tracking effect that tracks a color instead of a texture.
Kinda like a chroma key / green screen.
I am trying to combine different patches but nothing I try works.

Have you ever done it? is it doable? Is it obvious but I don´t see it?

This can’t be done in spark because once you have something in a shader signal, there’s no way of getting it out.

E.g. you can’t take a pixel value and use it to control a plane position.

Anyway, what is your end goal? Maybe there’s some other way.

Basically I wanted to do the same as with chroma key.
Take a color and display a texture on top of it.
It occured to me that I could convert all the blacks to an animated texture for example, or the green of the plants or even the blue sky.

Wait! @josh_beckwith I just found your Chromakey tutorial! :sweat:
I promise I googled like crazy but my search terms and Spanish speaking brain may kept it hidden until now :rofl:

I´ll go through it and see if I can adapt its logic to what I imagined.

In the same train of thought but with other applications:
Is there a way to get an input of every pixel and get a color average? or maybe to output to some kind of RGB signal and get a RGB average palette?

You would need to sample the texture at various points, so it’s not really feasible to get a whole image color average by sampling every single pixel. You could use render pass at low size to trick it into doing some averaging for you, then you can sample like 20 points or something?

1 Like

I get it. Thanks.
Not very useful for scientific purposes but for artistic experiments I think it maybe cool.