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.
IndexDiscussionExhibition › Interactive Snow
Pages: 1 2 
Interactive Snow (Read 3560 times)
Interactive Snow
Feb 15th, 2009, 7:40am
 
I made a sketch around Christmas time that takes a web cam input, draws a bunch of falling snow, and let's a user interact with the snow.  This is by no means original, as I copied the idea from an article I read about Charles Forman.

I used GSVideo to get fast web cam captures.  The particle system and motion analysis were implemented in GLSL thanks to GLGraphics.  I was easily getting 30fps on a NVidia 8800GT video card with 8192 particles running at 960x540.

http://vimeo.com/2633447
Re: Interactive Snow
Reply #1 - Feb 16th, 2009, 10:09am
 
This is great, the swirls really sell it
Re: Interactive Snow
Reply #2 - Feb 17th, 2009, 10:06pm
 
Johnny,
taht's really cool (hehehe). 2 things:
1. How about sharing the source code?
2. I noticed you'd like to change dots with snowflakes: well don't do it, dots are much more evocative than blatant snowflakes. To have an idea have a look at the great snow created by Julian Vidal, it's here http://julianvidal.com/X/processing/snow5/

It might be more interesting if you'd let snow accumulate un the bottom of the screen and progressively hide the video image.
Andrea
Re: Interactive Snow
Reply #3 - Feb 19th, 2009, 6:27am
 
Andrea,

1.  Source code:  http://bigpixel.com/projects/sketch_081221a_Snow.rar.  This version doesn't use GLSL for the particle system or draw calls, but it might be easier to read.  You'll need to d/l gsvideo, glgraphics, and traer physics libraries.

2.  I haven't worked on this in a couple of months as I'm currently engrossed with other projects.  When I get back to it, I'll have to revisit the snow vs. snowflake question.  The accumulation idea might work depending on which direction I take this eventually.
Re: Interactive Snow
Reply #4 - Feb 23rd, 2009, 9:03pm
 
thanks for posting this! video looks great!  have you seen setpixel snow is fun: http://www.setpixel.com/content/?ID=snow

i just tried to run the source code and have an

"unsatisfiederrorlink: can't load library oil-0.3"

this is the section that is highlighted:
cam= new GSCapture(this, camWidth, camHeight, fps);


i have gsvideo folder sitting in my libraries folder in sketches.
Re: Interactive Snow
Reply #5 - Feb 24th, 2009, 1:45am
 
Vuhec,

yes, I've seen that article--it's what inspired me to make this sketch, a shameless clone.

I believe the error you are getting is related to a GStreamer configuration or installation issue.  Make sure the example GSVideo sketches are working on your system.  Checkout this string of posts for further info:

http://codeanticode.wordpress.com/tag/gstreamer/
Re: Interactive Snow
Reply #6 - Feb 25th, 2009, 6:41am
 
Thansk for the codeanticode link...i am running OSX10.5 and apparently i have open precessing through terminal to access the gsvideo libs.

i tried to run it now and lots of the libs are loading, but i am getting the following error:

Exception in thread "Animation Thread" java.lang.

IllegalArgumentException: No such Gstreamer factory: osxvideosrc

Any thoughts?  Thanks Johnny!!!!
Re: Interactive Snow
Reply #7 - Feb 25th, 2009, 10:04pm
 
Update:  my latest error has been addressed by codeanticode forum.  quote:

"As for the problem with GSCapture class, it is not functional yet. I still have to manage to include the required underlying OSX GStreamer plugin for capture, osxvideosrc, in gsvideo-mac."

Bummer for me.  I really want to give this a try and learn from this project.  Hopefully soon...
Re: Interactive Snow
Reply #8 - Feb 26th, 2009, 3:14am
 
Ah, sorry to hear that.
Re: Interactive Snow
Reply #9 - Mar 13th, 2009, 5:13pm
 
i've got the sketch to work for a few seconds with particle flowing and starting to be affected by movement,  but it freezes and i am getting this error message:

highlighted: particles[p].addVelocity(velMult*bufOpticalFlow[b], velMult*bufOpticalFlow[b+1], 0.0);

error:
ArrayIndexOutOfBoundsException: 1758

I did have to change the resolution of the sketch to 640x480...mayeb that is my hang-up?  
i changed the following to 640x480
int camWidth & Height
int cropWidth & Height
int sketchWidth & Height

i wasn't sure why the cam, crop and sketch ratios were all set differently?

thanks jow!
Re: Interactive Snow
Reply #10 - Mar 15th, 2009, 6:32pm
 
nevermind.  i figured out my problem...sketch needed to be bigger than cam.  i am digging in and learning.  i am curious your thoughts on using the color capture vs. black filter?  this is cool.  thanks again...
Re: Interactive Snow
Reply #11 - Mar 17th, 2009, 7:09pm
 
Glad you figured it out.  I believe I do the odd cropping because I wanted a 16:9 aspect ratio output but the camera captures 4:3.

I some times get bored of the colored capture, so I use the bw filter.  The ultimate goal is to make a custom shader that incorporates some of the colors from the color capture in a more interesting and non-photo real way.
Re: Interactive Snow
Reply #12 - Mar 18th, 2009, 3:49pm
 
oh no!!! the link to the source is broken!!! Anyone can share the code of interactive snow... it is beautifull and i like to develop for interactive dance performance...
Thanks

Micron
Re: Interactive Snow
Reply #13 - Mar 18th, 2009, 5:00pm
 
Micron, I have a copy with me, where should I send it?
Re: Interactive Snow
Reply #14 - Mar 18th, 2009, 5:03pm
 
WOW !!!
micron@processing.it
this is my mail
thanks so much guy!!!
Pages: 1 2