What can Boids do on desktop?
Boids move continuously, but the other objects don’t...
Let’s make the other object also alive.
 
How?
1. Boids give energy to the other object by touching.
2. If the object has enough energy to move, then it starts to move.
3. While moving, the object make another energy for playing music.
* If energy is not full, music are not good quality.
4. Moving and Playing consume energy, so it will stop if the object doesn’t have enough energy.
Desktop Stampede : Let’s make it Live
CS527 Project-2
I used Blender for modeling.
 
 
 
 
 
 
 
My Boid Model Picture
Target mode
 
Predator(pink dot)
Avoidance
 
Velocity Matching
1. Start out in a tripped over mug at one end of the table.
STORY
Modeling
Requirements
2. External text file
 
a. Layout of objects
name id x y (top-left 0  0/ bottom-right 1 1)
[name : flower / penguin / dog / notes /
predator /prey]
1 predator, 1 prey,  n others
 
b. Boids
boids max_number mug_position
[mug_position : lefttop / leftbottom  /righttop / rightbottom]
 
c. Rate at which the boids leave mug
rate number
 
d. Mode
mode type
[type : boid / flocking / target /
avoid_distance / velocity_matching]
 
e. Velocity,  Distance
3. If a boid crosses the end of desk, it will reproduced from mug
Behavior Logic
Avoidance
 
Target mode
 
Velocity Matching
Boid
Boid
- Move Objects: Drag and Drop
- Move Target and Predator : Drag and Drop on Top Down View
* Left button : Camera move together,
* Right button : Object move alone
 
- Property Panel
* Mode : how many step apply to the model
* Max velocity
* Max avoid distance
* Max object number
* Start/Pause Button
 
- Camera Control :
* Move : Mouse Left button
* Move : a/d/w/s pgup/pgdown/left/right key
* View point : 1, 2, 3 key
 
F1 : toggle geometry / dimension view
dimension view : (logic bound box : for making sure that logic and visual range are same)
Boid
Implemented Based
on Craig Reynolds’s
Distributed
Behavioral Model,
5. Debugging
4 Avoiding objects
User Interface
Download (Installer)
Download (source code) - MS visual Studio 2005
- Needs Ogre, OpenAL
[How To Calculate New position and direction]
 
1. position = position + velocity * dt + 1/2 * acceleration * dt * dt
2. velocity = velocity + acceleration * dt
3. keep max velocity
4. calculate heading(yaw)
5. calculate accelerator
    0. update all boid’s info : visibility, the closest neighbor boid in visible range
    a. check collision with objects using bound box, distance
    b. check flocking center (opt. center of a boid’s cover range, target)
    c.  check keep distance with the closest neighbor boid
    d.  check velocity of the closest neighbor boid
    e. check  predator range
    * calculate accelerator through a ~ e steps.
    * not bidirectional the closest neighbor : if A choose B as the closest neighbor, B can
      not select A.
 6. render position/rotation
 
It was little bit slower than I expected.
I put skipping from accelerator b step to e step according how many boids are running.
 
 
- Language
* Ogre
* OpenAL
* C++
 
-Flocks, Herds, and Schools : A Distributed Behavioral Model, Craig W. Reynolds, Siggraph 97
 
 
- Sound : The Whistler’s song, Steve Baraktt.
Others, Reference & Credit