Website powered by

WIP: Rats!

[Work in Progress]
It's an effect that I originally wanted to do for an internal project at work, but it got killed in the end. I got inspired by A Plague Tale: Innocence and wanted to give a shot at an animated swarm of rats, but with particles, thus avoiding a CPU-skinned skeletal-based crowd of actors (I don't actually know how they did it in APT, so if anyone has insights...). So here, all the "intelligent" behavior is done on the CPU (because raycasts and spatial layers) but all the animation is done on the GPU, with Vertex Animation Textures.
I have A LOT of ideas to push this further. I already started adding some more behaviors on top, like rats jumping between each other if they meet too close, and even a flamethrower event so I can burn the rats with a weapon, but I'll finish and polish everything later. I'll post everything here when the time comes.

UE4 test level. Rats have three main behaviors that overlap through velocity update: they run for the red light, they avoid obstacles (raycasting) and they avoid each other (spatial layers).

Vertex animation based on textures. Anim made in Maya, then passed to Houdini to bake to textures.The rats have two different anim stages (walk, run) but the transition and speed/playback sync are still a bit off, so I'll need to find some solutions.

Vertex animation based on textures. Anim made in Maya, then passed to Houdini to bake to textures.The rats have two different anim stages (walk, run) but the transition and speed/playback sync are still a bit off, so I'll need to find some solutions.

Debug view of the raycasts for obstacle avoidance. If the left ray hits, rat goes right, and vice-versa. If center hits, rat chooses randomly between left and right. It's not perfect, but it's enough to avoid most obstacles.

Debug view of the raycasts for obstacle avoidance. If the left ray hits, rat goes right, and vice-versa. If center hits, rat chooses randomly between left and right. It's not perfect, but it's enough to avoid most obstacles.