How detect a Pixel-Collision?


I have a problem:
I need to detect a collision based on dx.videostream.
But I need this stream to present on screen later. I want to say, that a man is recorded and projected later on screen, but if he interact/collide to a videoobject I need this event.
But how can I get it?

I tried several ways and they all failed because you cant divide a dx-videostream (or is there a way to double it?):

-I tried with a small shader, giving me different colors for pipet.node. But pipet works only at end of stream, not in between (no video output).
-I tried with two different SplitCam-Tools to double my videoinput, but it didnt worked. May be some performance issues, may be not good programmed.
-I tried to grab a second stream at Videoin.Preview. This works only at my small testpatch, not at the final bigger one.
-I tried with Trautner-Freeframe-Plugin but it kills the original images. It gaves out only a black difference matte.

So, how can I analyze a collision and still have the original-color-videostream at outputpin for later projection?
Somebody out there with a good hint?

Thanx Frank

Kludgy way to split a video stream:

DirectX Video -> Video Texture node -> AsVideo node

You can take multiple outputs from the video texture to multiple AsVideos.

I haven’t tried it but it should work.

to make things clear…u want to show the original image and have some sort of analysis going on…right ? what’s wrong with using pipet and have the same texture on a quad in a ex9 renderer ? or do u insist on using video-out ?

on the other hand, i tried splitcam myself and it worked…apart from the annoying internet request on every startup.

Thanks I´ll try that.

Yes, you see it right.
The pipet only worked in my small patch. When I connected it to my big patch it wont work.
May be its because I dont use a quad inbetween, just 5 shaders and then directly into the final renderer. I will try it with that quad-way, too.

I think Splitcam doesnt work with that patch because I need a 640x480px/20fps webcam image. Twice. Seems to much for that prog. In Splitcam forum they reported lot of errors using it by DvCam, that has nearly the same amount of pixels (but less Cpu useage).

Thanks for your help.
Caio Frank

:) 640x480x2 is a lot, i can imagine your cpu going down. if you can get a second grabber and double the video signal outside of the computer (check ebay for composite splitter) u could have the analysis running with a smaller, cpu friendly resolution. better would be a second pc, dedicated for the analysis.


this problem still confuse me. Why? In a small subpatch it always works.

I cut the second cam to reduce traffic amount but Ive got the same. Vvvv didnt give me the pipet colors.

So this is my last chance to solve it!!!
(But I recognized a fact during preparing the screenshots giving the direction, but later)

I uploaded four images to show you the problem (Sorry for uploading in the screenshots section, Im a beginner in all this here ;)

This is like the subpatch looks perfect:

This is how the subpatch is integrated into the rootpach. On the middle left side:

This is how it should look inside the final rendering:

BUT, this happens if I switch a switch.node for texture on. (Start to integrate it):

During preparing the screenshots I saw it runing perfect once!
It was while the final rendering was in a small window in the same monitor (first screen). Normally I show this rendering at the second screen fullscreen by beamer.

-So I think there is something about first (active) or second screen.
-Or something with fullscreen or not.
-Or Vga (Beamer) and DVI (Monitor, where it works once)
-Or something with doing the rendering seperate for every screen inside the graficcard. I use Geforce 6800 (AGP/128mb ram)

I tried several version of configurating my graphiccard like first or second screen, changed Vga and Dvi,…
But no configuration workd. Or Im too confused now.

Please some extrem Pro around there, with a bright, clear and clever view inside this matter who can help me?

Thanks very much

halo frank.

i cannot really follow with your screenshots: “BUT, this happens if I switch a switch.node for texture on”. what happens? you should probably describe what we should pay attention too.

but in the end your problem sounds like the one with “video on two monitors”: when you are in dualview mode (ie. not spanmode) your videotexture always only works on one monitor. so having a preview on one monitor and going fullscreen on the other is not possible with the current VideoTexture (Ex9.Texture VMR9) node.

in other words: all renderers that somehow use the videotexture will have to be on one monitor for it to work. is that your problem?

The work around Im using for a similar problem is to strecth the renderwindow to fullscreen and ctl+8 to hide the name bar at the top. You have to use spanmode though as Joreg says.

Yes sorry, the black screens happened. I missed the image in the rendererwindows. Especially the one for my pixel collision.

The spanmode stuff was the missing point. It works now. Jippie :)

Oh men, its like you think your car is broken because you cant drive. You check the fuel, battery, your way of driving. And later you see that there were no wheels on it.

Thank you very much