American Horror Story: S7 Promos
I was responsible for developing two custom flocking solvers and the custom animation cycle instancing workflow.
There were a few main things to consider when I started how to map out my custom solver. In addition to normal flocking / crowd behavior, bees would be expected to change states (crawling to flying, vice versa...etc) and have animation cycles working with instancing. The general algorithm for flying bees was based on traditional boid logic (alignment, cohesion, separation) while the crawling bees were solved as bullet rbd spheres.
To handle state changes in the balloon shot I decided to set up custom feedback in my DOP network. Crawling bees could fly if they had been crawling for a specific amount of time and flyers could crawl if they were close enough to the surface of the balloon. On every timestep, new flyers would be merged, flying bees would be solved, new crawlers would be identified, crawlers would be solved, new crawlers would be merged, and finally new flyers would be identified.
To model the behavior and art direct the bees I had many custom forces to deal with hovering, surface updates for bees crawling on the balloon, and collision avoidance. In the shot below, the general behavior algorithm was the same. However, I simulated three layers of bees crawling on the actor's head. Each layer contributed as a collision object to the next layer and layer order was also respected when she shakes her head and they fly off. Art direction was handled through the use of clever collision object updates, additional state changes in the solver, and custom forces.
My final task was to develop a way to use cycles from animation on my simulated agent points. I spent a few days exploring custom IK walk solvers but ultimately had to use animation cycles due to time constraints. In order to do so, I first converted the alembic animation cycles into transformation arrays removing time dependency from the equation. With these large arrays of transforms, I was able to instance one model of the bee onto every point and use my arrays to update the transforms of each part of the bee on a per agent basis. Additionally, subframe transforms were computed to model the very fast flapping insect wings. This technique allowed for fast previewing and light memory usage which was crucial since rendering was done in Maya with Vray.