官术网_书友最值得收藏!

Flocking, swarming, and herding

Many living beings such as birds, fish, insects, and land animals perform specific operations such as moving, hunting, and foraging in groups. They stay and hunt in groups because it makes them stronger and safer from predators than pursuing goals individually. So, let's say you want a group of birds flocking, swarming around in the sky; it'll cost too much time and effort for animators to design the movement and animations of each bird. However, if we apply some simple rules for each bird to follow, we can achieve the emergent intelligence of the whole group with complex, global behavior.

One pioneer of this concept is Craig Reynolds, who presented such a flocking algorithm in his 1987 SIGGRAPH paper, Flocks, Herds, and Schools – A Distributed Behavioral Model. He coined the term boid that sounds like bird, but refer to a bird-like object. He proposed three simple rules to apply to each unit:

  • Separation: Each boid needs to maintain a minimum distance with neighboring boids to avoid hitting them (short-range repulsion)
  • Alignment: Each boid needs to align itself with the average direction of its neighbors, and then move in the same velocity with them as a flock
  • Cohesion: Each boid is attracted to the group's center of mass (long-range attraction)

These three simple rules are all that we need to implement a realistic and a reasonably complex flocking behavior for birds. We can also apply them to group behaviors of any other entity type with little or no modifications. We'll examine how to implement such a flocking system in Unity in Chapter 5, Flocking.

主站蜘蛛池模板: 南乐县| 阿拉尔市| 雷州市| 基隆市| 石阡县| 威海市| 如东县| 新郑市| 揭东县| 南郑县| 文昌市| 若尔盖县| 深州市| 朝阳区| 铜山县| 明星| 文昌市| 宁明县| 阜新市| 阳东县| 彰化县| 花莲县| 福建省| 屏山县| 汉源县| 错那县| 临清市| 剑阁县| 清水县| 聂拉木县| 比如县| 彭州市| 梁河县| 彝良县| 汝州市| 昌图县| 军事| 云龙县| 梅州市| 云阳县| 绥化市|