Air pollution is attributed to 11.65% of deaths globally. It is also one of the leading risk factors for disease burden. Death rates from air pollution are highest in low-to-middle income countries, with more than 100-fold differences in rates across the world. In a special report, the CPCB said almost all pollutants reported higher values on Diwali day and pre-Diwali day. This is because of the tons of crackers that we burst every year! Crackers are fun and are a medium to express our fun emotions and celebrations! We wanted everyone to live the experience of bursting crackers without causing any pollution! Diwali is the symbol of the victory of good over evil, of hope over despair, and of knowledge over ignorance! Bursting crackers is an integral part of the celebratory tradition. This Diwali live the experience of bursting crackers without causing pollution, in your own #ARverse, using our Snapchat Lens 𝐜𝐫𝐚𝐜𝐤𝐀𝐑!!
What it does
The eccentric feature of this Lens is that it provides people the ability to get a natural and immersive experience of crackers without worrying about increasing pollution which in turn makes them happy in this new Green Planet Era. It starts with a prompt to users, instructing them to place virtual crackers such as Paus and Chakri on the ground through the Lens using the ground tracking feature. Once the position of the crackers have been fixed, the users can place their hand in front of the camera. As soon as their hand is seen in camera, a virtual Fuljhadi is attached to their hand using Hand Tracking. The users can then take their hands closer to the crackers, upon which, the crackers will light up and start doing their magic! The users also get the option of changing the color of their Fuljhadi using our color slider. The users can use this lens as a standalone Fuljhadi application too where using their front camera they can share the snaps with their friends and flaunt their colourful outfits and Fuljhadis.
How we built it
We first designed and developed the 3D models of Fuljhadi, Paus and Chakri crackers in Blender which were then imported into Lens studio. These crackers were anchored to a flat surface using the surface tracking method in Lens Studio. The hand tracking feature enabled us to track the hands of the user and attach a Fuljhadi to the hand. Next we developed the animations of the bursting crackers and the sparkling of Fuljhadi. This was achieved using the particle system of Lens Studio where we carefully engineered every particle flow for the animations. Color and shapes were added to those animations to give a more lively look. Lastly multiple JS scripts were written to trigger events based on condition. In one such script, the 3D distance between the tip of the Fuljhadi and the tip of the crackers is calculated and if this proximity drops below a particular threshold it triggers an event which activates the animation of bursting of that particular cracker.
Challenges we ran into
Mapping the Fuljhadi’s movements to the user’s hand movements was the biggest challenge and it was solved by anchoring the Fuljhadi to a game object which in turn was fixed to the wrist of the hand. The Fuljhadi was then aligned in such a way that it looked like the user is holding it in the fist. Getting a very accurate value of the 3D distance was also challenging as the value widely varied upon the size of the crackers too. To tackle this, we took into consideration the size of the cracker while calculating the proximity between the cracker and the tip of the Fuljhadi.
Accomplishments that we're proud of
Our Lens is got high story views and over 200k plays on Snapchat. Our biggest achievement is that we, along with out 100k+ users, took a step towards making our planet Green again and help curb pollution while having our fun to the fullest.
What we learned
We had a lot of teachings along the way, mainly revolving around the huge scope and power of Lens Studio and Blender.
Log in or sign up for Devpost to join the conversation.