Jitter and motion detection

    Jan 16 2015 | 5:30 pm
    hey im kind of new to jitter and was wondering if it is possible to create a matrix within which random particles are generated that respond to motion detection so that they move ?
    i know max msp is capable of a lot but i dont know where to start concerning the generation of graphics that respond to motion, if anyone can give me any advice i would seriously appreciate it.
    many thanks for any and all help

    • Jan 16 2015 | 10:39 pm
      Here is a fun patch to get you started, it's not exactly what you asked for but it's fun ;-)
    • Jan 16 2015 | 11:05 pm
      here is a very very quick way to do motion detection. There are many ways to do this but here is a quick one I thought of. I needs a bit of tweaking but gives you a good start.
      Hack my 2 patches see what you come up with ;-)
    • Jan 18 2015 | 3:18 pm
      Thanks for the help PHIOL, i was wondering if you could give me some advice on how i can combine the data i get from my movements and use it as an input to cause the particles to move, i've made a patch if you want to look at it ? (its kind of messy)
    • Jan 18 2015 | 4:57 pm
      Hi First Last,
      What I'm seeing in your patch is that you took a path that goes down the phys way. By the using jit.phys.multiple your are create a bunch of rigid bodies. (Just drop a jit.gl.physdraw @enable 1 and you will see this.)
      As you can see, the movement of each particle is done with physghost. Now I'm now sure on the esthetique you want as a final result, but what you have to do is create a to make your camera physical so you can create collisions with these bodies.
      2 things that come to mind is, (Maybe other folks on this forum will have better solutions but...)
      -create a jit.phys.body
      -the other way is the use a jit.phys.body with @shape dynamic mesh with your binary black&white colored (3rd from the top) plane. This way you will draw a physical dynamicmesh with the white pixels. here is a little patch below for the dynamicmesh. I use this setup with a kinect camera quite a lot. works quite well :-)
      Let me know how it goes.
    • Jan 18 2015 | 6:07 pm
      Here below is your patch, where a jit.phys.ghost is created with the dim of the white square. it'll get you started ;-)
      (I tried with the dynamicmesh version and it wasn't great in this context)
      good luck
    • Jan 18 2015 | 7:06 pm
      wow after a little tweaking that patch you uploaded works perfectly ! im gonna have to mess around with it a bit, but that is a great patch, thanks !!
    • Jan 18 2015 | 7:21 pm
      You mean the last one involving jit.phys.ghost ? My pleasure I'm glad you're getting what you want. Maybe it's would be a good idea to move this thread to the Jitter forum.
      Good luck with the tweaking
    • Jan 18 2015 | 7:46 pm
      yeah the last one using jit.phys.ghost, thanks for all the help, i really appreciate it :) !!