<img src="https://certify.alexametrics.com/atrk.gif?account=bIEZv1FYxz20cv" style="display:none" height="1" width="1" alt="">
Skip to content
Blog / Latest Articles

Let’s Make a Punchin’ Clown

The inflatable punching bag clown is a classic American toy dating back to the 1950s, first made popular by the TV show character, Bozo the Clown. Marketed as the Bozo Bop Bag, this toy is basically an inflatable plastic sack with a weighted, rounded base. A simple punch sends the toy backwards and then bounces right back up at you. Being simple to use, yet an engaging hand-based experience, this toy is ideal to simulate in virtual reality with hand controllers. I’d like to walk you along my process for creating this fun and colorful High Fidelity entity, from its concept to completion.

After we decided to make a punchin’ clown, the next step was to come up with concept art. I consulted one of my favorite illustrators and modelers, who goes by the mysterious moniker Lazybones, to conceive of various designs. This point in production is a lot of fun, because everything’s wide open. Let’s take a look!

After settling on the above design, Lazybones generated this excellent model using Maya and the Stingray PBS material, to get the normal maps, AO and roughness just right.

 lazybones generated this excellent model using Maya and the Stingray PBS material, to get the normal maps, AO and roughness just right.

Once the model was created and imported, by placing it on an AWS server, we needed a collision hull for it. After a lot of testing, I found that a standard capsule-like collision hull actually was not so desirable — the clown rolled back way too far, and it missed his nose and ears. We settled on a compound collision hull consisting of a cone with distended spheres for the nose and two hair tufts. It’s not pretty, but thankfully collision hulls are meant to be simulated, not seen!

Once the art was sorted, it was time to write some scripts and make him a full fledged punching experience! Two main questions we addressed at the onset were:

How will the punching bag swing around and bounce back when hit?

This aspect was actually deceptively simple! Using High Fidelity’s excellent physics system, we simply needed to configure the punching bag’s physics parameters to get the best performance. First, we set its dynamic flag to on, then gave it standard gravity of -9.8, gave it some solid density, lowered the restitution since we don’t want it bouncing like a tennis ball, and most importantly, we set Linear Damping to 1. Linear damping controls how much resistance there is to movement along the X Y and Z axes. The higher the damping, the harder it is to push around. Set damping to 1, and it’s basically unpushable. However, we left angular damping set very low, which means it can roll and twist and spin around when you punch it. The combination of constraining it down with maximum linear damping and the wide-open, anything goes angular damping gives us a physics object that you can knock around and make wobble, without ever being knocked away from you.

How will the avatar wear the boxing gloves?

This was a harder question than you might first realize. We had to confront two problems. First, your avatar in High Fidelity does not, by default, have a collision hull on the hands or fingers, just the body. This means if you take a swing at the clown with your fist, nothing happens. In order to exert physics forces on to the clown, you need to attach a collision hull to your hand first. The natural solution to this is, of course, boxing gloves! However, that then raises another question — how shall the avatar hold or wear the boxing gloves? Creating objects which snap perfectly to your hand through our equip system can be a little tricky, especially when the object is meant to go on both hands. To take the complication out of this, we simply went with a context-sensitive solution: if you’re standing close to the clown, simply automatically attach the gloves to the avatar’s hands, and remove them when they walk away. This was done with a handy script by the brilliant and amazing Thoys.

In the mood to punch a clown? Who isn’t?! Bopo the Punchin’ Clown is free to download in High Fidelity from the High Fidelity Marketplace. If you’ve got hand controllers, rez him out in your domain and give him a knuckle sandwich… he won’t mind. After you’ve bruised the clown, ride that energetic rush to make something even more awesome, and bring it to the High Fidelity Marketplace!

Published by Caitlyn Meeks September 7, 2016
blog-circles

Don't Miss Out

Subscribe now to be first to know what we're working on next.

By subscribing, you agree to the High Fidelity Terms of Service

Need an audio solution?

icon-local-spatializer

Deliver the Best Audio Experience

High Fidelity’s client-side audio solutions work with your existing audio networking layer to deliver the most incredible audio experience.