Building a Better Bee Beard
Building a Better Bee Beard
I’m Lahna 🤠
I’m primarily an AR lens programmer here at BTM, but I also help out with illustrations.
The decline in honey bee health is a very important issue all around the world. So for National Honey Bee Day we wanted to contribute our skills as a company to help the honey bee gain more attention.
The goal was to create Snapchat augmented reality lens that gave you a beard made of bees that flew off when you shook your head. This concept was an attempt to debunk the idea that a swarm of honey bees is a dangerous entity. Swarming honey bees are when they are most calm and passive since they have no home to defend. Which is why beekeepers have no fear when they show off a beard of bees! Also, it looks cool.
We thought of two ways we could go about it:
- Position so many bee objects around the face that it looks like they have conglomerated there into a natural beard shape
- Create a static, textured mass that resembled a beard and then cover it in actual moving bees to save on tri count.
We decided to start with plan A just so we could work on the head-shaking and bee navigation while our technical artist expertly modeled, rigged, and animated a bee for us to work with. We used spheres of the approximate size of what the bee object would be until she was finished.
We whipped up a script to detect when a user was shaking their head and partnered it up with a system that monitored all bees and their states. This triggered random bees to fly off the face every time the user shook their head a certain number of times.
I was then sent the bee proxy to more properly craft the shape of the beard until the full textures and animations were complete. Substituting them back in took a long time because of a weakness of Snapchat’s AR engine that we didn’t understand — but would come to terms with later.
In order for the bees to appear more realistic when they are flying, we wanted to add a little flying loop as the come back to the face. So, we added a looping state in there as well.
Eventually, the animations were finished and it was time to replace all proxy bees with proper bee objects. This took an even longer time and we didn’t yet know why; each bee was just taking forever to select.
After trying to put a certain amount of bees on the face, the engine kept crashing. To the point where the project was un-openable.
We had well exceeded the suggested tri count for the engine, but it hadn’t stopped anything before. Other lenses were ten times over the allowed tris but worked fine.
We realized, however, the engine was worse when it came to an overload of the number of objects in the scene hierarchy. The engine could select an object on its own, but an object with dozens of children took a very long time to select…and because of the nature of the engine each imported bee was broken up joint by joint into their own objects.
So it was time for plan B. We made up a beard-shaped object but no matter how hard we tweaked it it just couldn’t look right because the surface needed to be covered in bees for it to be believable anyway. We remade the scene from scratch, using the old scripts. There were three kinds of bee objects:
- Static bees with very few tris, to make up the bulk of the beard
- Idly animating bees that never leave the face
- Bees with animations built in that let them take off, fly, and land
This set of solutions worked surprisingly well! And after that, we put an overlay filter and some sparkles on it and called it a day!
Check out the finished result for yourself: http://tinyurl.com/beardofbees