Open GL plane layering
Hi,
I am trying to create a video using 3 sources:
1 - A background video (multi coloured)
2 - A video of a dancer to be viewed on top of the background (the dancer is solid white and the background solid black)
3 - A video of a fill effect to place inside the dancer (multi coloured and is in front of the background - hiding It)
So far I have been able to get the texture inside the dancer, and the dancer on top of the background, but not both at the same time.
I attempted this by creating three planes, each with a texture applied, and using the chromakey shader to delete the inside of the dancer.
Am I going about this the right way? I really do need this to be done in Open GL. Does anyone have any idea how I can compile all 3 at once?
Thanks
Andy
Can't you use a pass filter to combine the 2 upper layers using jit.op?
Typically the common issues people have with this is related to:
depthbuffer enabled when it shouldn't be, or render order. If you
post a demonstration patch with a detailed explanation of how it
should work, but isn't, someone could probably offer further
assistance. Otherwise this is too vague. Also, as is recommended for
all reports, be sure to list platform, hardware, and software info.
-Joshua
Here is the code for the patch:
The patch displays a "fill" movie inside the movie of a silhouetted dancer. This chromakey/shader part works. Obviously you'll need to use some suitable video for the silhouetted dancer qt.movie object.
What I can't do is keyout the resulting white area around the dancer, replacing it with a third "background" movie.
The same process could be done using the CPU by using two chromakey objects in series. The first object would key out the inside of the dancer, the second would keyout the area around the dancer.
But I need to use the GPU!
Hope that makes sense, cheers,
Andy
Mac G5, dual 2Ghz, 2Gb RAM, ATI Radeon 9600
OSX 10.4.5
Max 4.5.5
Jitter 1.5.2
I believe that your problem is solved if you specify @depth_enable 0,
and @automatic 0 for each jit.gl.gridshape object, and then bang in
sequence (back to front). This strategy is demonstrated by the
jit.gl.videoplane-xfade.pat example patch.
Hope this helps,
Joshua