We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Controlling off-screen rendering w/PGraphics
Page Index Toggle Pages: 1
Controlling off-screen rendering w/PGraphics? (Read 1079 times)
Controlling off-screen rendering w/PGraphics?
Mar 15th, 2007, 3:26pm
 
Hi there. I'm a total newbie to Processing, though I'm an Actionscript geek, so forgive me if this is a stupid, obvious question.

I'm wanting to try to experiment with real-time control of particle system compositing over recorded video -- basically, I want to take a QuickTime of my friend belly-dancing and have particle bursts whenever she does one of those hip-flicking things that belly dancers do.

Now, I could do the motion-tracking programatically, but it occurred to me that it would be easier if I could simply play the video back in the main sketch window and just click on the video where and when I want the particle system to trigger. (Apple Motion, I think, can work this way, for example.)

However, my impression is that trying to render something like this on top of the video would probably be prohibitively slow, even on my Macbook Pro.

So I'm wondering if I can do this: simply play the video on screen and have the particle system rendering off-screen, with no compositing (just a white particle system on a black background). When I click, I want it to send the X,Y coordinates to the off-screen render, which can then render the effect. When all is done, I can composite it in After Effects.

Now, I *think* I understand the concept of drawing with PGraphics. Is this how I'd go about something like this -- create a PGraphics object and then pass the mouse info to it?

If this seems obtuse and there's an easier way, please forgive me: I'm pretty good with Actionscript (and PHP), but I'm not used to the whole flow of Java and/or Processing, and the learning curve is proving a bit steep for me.

Thanks!
Re: Controlling off-screen rendering w/PGraphics?
Reply #1 - Mar 16th, 2007, 1:24pm
 
a PGraphics will actually be slower, you should just draw the video to the screen (see the video examples) and then render the particle system in draw().

and P3D will give you the best performance for drawing video.
Page Index Toggle Pages: 1