You are on page 1of 5

“Spiders”

I produced this video as a demonstration of various programs I am writing. The spiders are controlled using
my own crowd simulation algorithm, outlined below. Data from this is fed into my multi-leg auto-walker. The
renders are processed using custom ‘scribbling’ code I developed based on an algorithm by zefrank. I sampled
the motion paths to produce waveforms, and combined the result with an audiopaint process.

Unless otherwise disrupted each insect


will aim to keep walking straight ahead

Every insect repels


its neighbours to
avoid collisions

Every insect looks


for ‘escape routes’
in case of collision

In a collision an insect hit in the back will not stop


moving, but an insect which runs into another insect will.

‘Controllers’, for example attract, vortex and direct, can be used to explicitly control the insects.
‘Panic’ causes random ‘Flock centre’ causes each insect ‘Herd’ causes insects to
variation in the movement. to head for a central position align to their neighbours.
between its neighbours.

An insect which has been An insect which has been


collided with will panic. blocked in will sleep.

‘Emotions’ can also be manually adjusted using controllers.

Data generated by the insect crowd simulator can then be visualised as motion paths, adjusted,
smoothed, and then fed into the auto-walker script.
Auto-Walker Algorithm

This is a simplified explanation of my auto-walker algorithm.


It was used to animate all of the spiders in the demo.

body

guide points
rotate with body

placed legs stay put

airborne legs head to the guide


point to start with...

...then they extrapolate the motion


vector of the guide points
airborne legs become
stationary when stray too far
from their guides and vice
versa.

group 1 group 2

To sequence the legs, the script keeps track of how long each leg has been airborne or placed for. A
preferred leg order is given and at each frame this is compared to the current leg order. Legs are sped up
or slowed down to correct the order.

raised legs placed legs repeats...

actual
order 1 2 3 4 5 6 1/7 2/8 3/9

time raised

preferred
order 4 2 1 5 3 6 4 2 1

+1 -1 +1

+2 -3

choose ‘easiest’ option


...it then selects a few of these at random as start points...

...and looks around at neighbouring points for darker pixels...

...and tries a few random points further away...

...remembering only darker pixels.

...considering all of the options,


each start point will then move on to only one pixel...

...and the algorithm repeats. On subsequent runs the algorithm


prefers to jump to pixels in a similar direction to the last jump.
It also avoids pixels which have already been ‘scribbled’ on.

You might also like