Chroma Kay 2

I am looking at the Chroma Key 2 shader by Cat. Does anymone know how to use it to map a greensceen live video over a still image?

Havent used it for a while, but I put Hue brightness and a threshold in I think, so set your hue, pull the brightness down a bit and tweak the threshold, I thought It made sense! I’ll have a look in a bit (this machine is too old to run vvvv!) If its a problem with laying the still behind, map it to a quad and use a lower priority (8.1) or use the group mode to put it behind the chroma layer.
If you change the background colour of the renderer when setting up the key it can help!
Sorry Im a messy patcher!
If you still have problems I’ll look at again!

cat

I’m sorry. As a newbie my problems are much simpler than that… I can’t figure out where to attach the source feed (does that replace the file texture) and where to attach the still image for the background. I have been able to figure out how to get the live footage in then map it to a texture, then that’s where I’m getting lost. I have beeen reading the pixel shader tutorials but not getting much from them. Is there a list of the functions and their uses/configs some where in the documentation? Similar to what you find for php in the php manual?

catweasel:
Havent used it for a while, but I put Hue brightness and a threshold in I think, so set your hue, pull the brightness down a bit and tweak the threshold, I thought It made sense! I’ll have a look in a bit (this machine is too old to run vvvv!) If its a problem with laying the still behind, map it to a quad and use a lower priority (8.1) or use the group mode to put it behind the chroma layer.
If you change the background colour of the renderer when setting up the key it can help!
Sorry Im a messy patcher!
If you still have problems I’ll look at again!

cat

Ok!
The source you want to apply the key to replaces the file texture, so if its a video in
videoin-videotexture-chromakeyshader
For the background create a new quad and attach a file texture to it,
If your using 8.1 adjust the priority so that the background image has a higher number than the shader.
If your using 9.2 create a group node and attach the quad to the first input and the shader to the second, then the group node to the renderer.
I wouldnt worry about shaders just yet, just treat them like the other nodes, theres plenty to get your head around before getting really confused! (unless you already code, personally there a bit esoteric for me, I make via trial and error and cut and paste!)
Does that make sense? If you need more help I’ll patch a better help file for you!

Cat

heres a new patch drop it into the same folder as the chromakeyer stuff, its for 8.1, I’ll do a 9.2 in a bit, just cooking my tea!
Heres the both

chromakey8.1.v4p (10.2 kB)
chromakey9.2.v4p (9.5 kB)

Thanks for all your help. I am usually the only one in the room who knows how to figure this stuff out, but vvvv is making me dizzy. Having real trouble using the documentation. OK…

Got the still image texture loaded. Looks fine. Now, no video. Where do I connect the output? Is this set for chroma keying green-screen?

I have video now (I linked the video texture to a quad and then to the group) and now my quad floats over the image. now this is where the magic happens right? How do I key out the green screen?

Here’s where I am…

screenshot.jpg (72.3 kB)

note that the chromakey9.2.v4p from catweasel only opens correctly when the effect “Chroma Key.fx” lies in the same folder like the patch!

Sorry, never make modules, I keep tinkering then they break other patches, I’m not the most methodical of people!
…must tidy up after myself…

maybe in the new year!

Did you look at the screenshot? Does it look like I am configured properly? Please don’t give up on me… I’ll go nuts trying to figure this out.

no, sorry.
i think 2 quads and no shader in the patch won’t have the desired effect. ;.

put catweasels
“chromakey9.2.v4p” and the
effect file “Chroma Key.fx” near to each other in a folder and open “chromakey9.2.v4p” with the latest vvvversion.

it should work
gregsn

Thanks greg. Got that working. Now I clearly have 2 layers. I can see how to effect the color and brightness settings of the video clip. I can’t however figure out what to change to key out the green paper and see the background image in that space. Suggestions?

screenshot.jpg (72.3 kB)

Sorry wrong screen shot…

screenshot2.jpg (97.9 kB)

do u have a shader 2.0 compliant graphicscard?

Now there’s a good question…

I have a NVidia GeForce 2MX/MX 400. It may not be. How can I tell? If it’s not, can you recommend one that is?

ther is a shader version test patch

The shader version test didn’t run (ie the io box was empty except the word Fixed Function.) Both the v4p file and the fx file are unzipped to the same folder… Am I missing something or is my card just too lame? I have already found out it is not Shader 2.0 compliant but it should still return some result with this patch right?

Its too complex for pixel shader 1.4, Could possibly do a work around to only do green, but it woudnt be as adaptable to poor screens I think, I’ll have a quick tinker, see what happens!

Heres a quick workaround, it should work, dont know if it will cope with bad keys very well or not ( could be better even!) If it works let us know!

Again put it in the same folder as before and open with 9.2

Green key9.2.v4p (10.2 kB)

fixed function says that the graphics card cant be programmed with shaders: that means no shaders can run on it, means no chroma keying with shaders. i also have a NVidia GeForce MX 400, and im sure that shader aren working on it. so you have to options: buy a newer graphics card, or install a freeframe filter instead. in this case your cpu does the keying.

http://freeframe.sourceforge.net

i dont know if theres a suitable freeframe chromakeyer around but
maybe the keyer from bigfuq could be usefull:

http://www.bigfug.com/vj/plugins/index.php