Miarmy Crowd Simulation Documentation (English)
Chest of The Swarm
Vimeo
Samples Download
https://drive.google.com/drive/u/1/folders/15sKE1z06FzzJQAxcNRbbYnK5poLhYtYd
Step 1 or 8: Rigging
Spider rig contains animation
File Location
- <Project>/ChestOfTheSwarm/scenes/OA/Swarm_Rig_01.ma
Details
- Spider character contains animation
- One-bone-chain without broken amid bone tree
- No scale on each bone
- Walking in Z+ direction
Step 2 or 8: OA
OA
File Location
- <Project>/ChestOfTheSwarm/scenes/OA/Swarm_OAT_Bones_01.ma
Details
- Set to the 1st frame (default pose) and resume the rig to default pose, then generate OA
- Refine each bone shape
Step 3 or 8: Actions
test action and randomize speed
File Location
- <Project>/ChestOfTheSwarm/scenes/OA/Swarm_OAT_Actions_01.ma
Details
- Create action from rig
- Create place node and test action play
- Create at least 1 default node
- Randomize speed by output language: <Direct Engine> - random all action playback speed (1, 3)
Step 4 or 8: Placement
placement Generating Meshes
placement Generating Meshes Normals
File Location
- <Project>/ChestOfTheSwarm/scenes/Sim_Placement.ma
Details
- Create some meshes and make them look like gateways of each holes in the cave
- Make their normals point toward inside
- Create place nodes from maya meshes for each hole
Step 5 - 8 Logic
Logic General
- Our main purpose is make our agents to crawl out from the small holes(1 in above image) of cave and walk in the celling of the cave.
- Then all agents should walk toward the nearest spot(2 in the above image) and pile there.
- After piling, they should form some bridges and crawling toward the chest(3 in above image) in the center of cave.
- And after reach the chest, they should pile there and protect it.
Step 5 or 8: Logic 1: crawl out from cave
File Location
- <Project>/ChestOfTheSwarm/scenes/Sim_Swarm_Simple.ma
Details
- Place agents in the cave holes gateways.
- Turn on UV Pin of agents which allow agents pin on the cave surface (1 in above picture)
- Please notice we only make agent pin on the cave when their HP is 20 (default)
- And later we'll pin our agent on the curve, and make its HP different from 20, then they won't pin onto the cave surface
- Turn on CCT of agents which allow agents walk on each other (2 in above picture)
- Make them avoid each other by sphere logic (3 in above picture)
- Make them stop if there is no agents behind, this makes all agents walk together without leaving swarm (4 in above picture)
- Make them talk towards the nearest spot (5 in above picture)
Step 6 or 8: Logic 2: bridging
File Location
- <Project>/ChestOfTheSwarm/scenes/Sim_Swarm_Simple.ma
Details
- By default, agents are being pinned on to the cave surface when its HP is 20
- And they will walk towards the nearest spots
- But when they meet the spot (in bound) they will change its HP to different value
- The value can determin which curve they need to attach.
- When the HP is not 20, they will unpin from any object (1 in above picture)
- Each group stands for a curve logic, different HP value attach to different curve shape node(2 in above picture)
- The "speedDown" logic in above picture will speed all agents down when they're crawling on the curve
Step 7 or 8: Logic 3: dynamics
File Location
- <Project>/ChestOfTheSwarm/scenes/Sim_Swarm_Simple.ma
Details
- Some about 10% of agents (random id from 0.9 to 1) will die from time to time
- But they should die at different time based on the seeded ping pong timer logic
- They only work for the agents on the bridge
Step 7 or 8: Render
File Location
- <Project>/ChestOfTheSwarm/scenes/Sim_Swarm_Full.ma
Details
- Make agent cache first
- Setup and render it
Credit: Bi Huang (Crowd TD of Basefount)
Basefount Technology