Loading...
Logo
Processing Forum
Hi Processing Forum, 
this is my first post and i start with a question.
I'm working on animated sprites and flocking sketch.
Since few days i'm trying to code a software to do in real time like in this video. Here, i'm using after effects with some expressions in motion script).
As a starting point for the software, i took this really cool sketch uploaded by Cinchbug.
This code's working like a charm. I'm using my own sheets, i add some P5Control and Kinect Control...
Everything is ok but  i want to change the sprites time randomly.
Not complete random frames but just a delay between every sprite animation loop.
In the Cinchbug applet you can see that every guys are synchronize, i don't want synchronization. Look at my videos to see what i mean.
I don't have any idea how to code this. Everything i try fail in this case but i  guess the problem can be fix here (i could be wrong).
Copy code

  1.  pushMatrix();
  2.       translate(pos.x, pos.y);
  3.       
  4.       image(sprite[heartbeat++], 0, 0);
  5.     popMatrix();

  6.  //make the loop for a 10 frames animation  
  7.  if (heartbeat >= 10) heartbeat = 0;

Do you have any idea how to fix this ? 
Thanks for your help

Replies(8)

Try setting an initial random frame position for the sprites array, so all sprites start with a random initial sprite and the animation carries on from that frame, hope that makes sense

If heartbeat = 0 from the start try heartbeat = random(10);
thanks, my bad was so simple.
thanks a lot.
Hey blobby,

Good to see you around here!

From when I first saw your work I thought it would work really well with Processing. There are many different ways things can be done when you program it yourself. I see you got a good start with Cinchbug's example. For inspiration also check out an example that comes with Processing:

Examples > Topics > Animation > AnimatedSprite

The combination of hand-drawn animation and code can create very interesting, complex and beautiful generative systems.

hey amnon.owed.

Glad to see you too.

I like a lot your work too.
For example i really like your last post on vimeo.
Psychadelic Kaleidoscope in motion is one of my favorite classic effect, and you made something really new with it. Your effect is really smooth, symmetric but non geometric. I really like when you use pixel smearing in it.

About   Examples > Topics > Animation > AnimatedSprite 
It was the very first thing i try to re-code 

// The combination of hand-drawn animation and code can create very interesting, complex and beautiful generative systems.

So,i'm pretty sure you know Presstube work,as you can guess i'm a huge fan of James Paterson.
The first time i saw his piece (maybe 6 or 7 year ago),  my reaction was : i need to learn code. 

Do you know other artists who use generative systems and hand drawing ?





    
Joshua Davis comes to mind, although he doesn't do much animation as a final product. I've been recreating his HypeFramework classes into Java.
There are by far not enough hand-drawn generative systems. I guess the people who are hand-drawing are usually not the people who code and vice versa. However it is something that I would like to try out some day (to name just one item on my ever growing to-do-list ;-).

When it comes to things that are kind of related:

Glenn Marshall's work on the vimeo awards identity.

Bernanke by boli

The works of MIRAI_MIZUE which are not generative (but instead fully hand drawn). However still a great source of inspiration.

And some other person that I can't find right now. He's on vimeo and has created a video with a bunch of offset animations (not hand drawn) in a circle of "arms opening". It's a somewhat similar technique as well. When I find the link I will post it.

just in addition the the hand drawing /generative system subject.
Take a look on this.
You can zoom and pan with alt+left/right click (i need to change this part in my code)

This sketch was my starting point :  http://www.generative-gestaltung.de/P_2_3_6_02.
It's not a completed project see this as a preview.

I need to draw more modules, 60 more will be enough  to get something really cool.

A animated version of this will be just insane... 
 

 MIRAI_MIZUE  kick asses.
this piece is really great.http://vimeo.com/20262614

Looking good so far!