Animation theory (natural animation)

For example, I want to animate how a bird flies across the sky, I'm not talking about animating the wings, but how to animate an object at random over the canvas.

I use objects like this for animation with a lot of randomization, for example: move [object] from a to b (random distance, random speed, random x, random y, etc.).

But is this really the best way to do it? or is there any theory of algorithms on how to achieve the most natural behavior.

The animation can be a bird, but it can also be dust or flying sand)

(I hope my question is clear enough)

+3


source to share


2 answers


In fact, the bird is rarely the sky itself, perhaps you could take a look at the flocking behavior of boids .

They are mainly based on three rules known as

  • Separation: Steering to avoid overpopulation of local flockmates alignment:
  • focus on the average heading of local cohesion of clans:
  • move towards the middle position (center of mass) of the local flockmate


This suggests that you can imagine that this is slightly different from calculating the movement of sand and dust, because it is a real physics problem (mostly fluid mechanics navier stokes )

But I'm pretty sure that if you don't really want to be precise (head drains aren't accurate) you can hack some of the boids rules for moving particles.

+4


source


Answer extracted from this post



Lévy flight or brownish movement should work, These are random walks where at each time step the insect moves in a random direction and distance. They differ in that the distribution of random variables is sampled from.

The movement of hunting sharks can be modeled as a brownish movement when prey is abundant and flies when prey is insufficient.

Depending on what you use it for, you can limit them (to keep them near a certain part of the level) or limit acceleration (so they have more momentum).

+3


source







All Articles