Google Tilt Brush For Level Design

Last week, Google released Tilt Brush for Oculus Rift (available through the Oculus Store). In addition, the Tilt Brush Toolkit (including SDK for Unity) has been available for a few months. We decided now was finally a good time to test things out and see if Tilt Brush should become part of our indie game development toolset.

What is Tilt Brush?

Fire, fire

Fire, fire

Tilt Brush, by Google, is a Virtual Reality-based drawing tool. You select brushes, colors, even animations - and paint in 3D space. Motion controllers are required which meant the HTC Vive, until very recently (while previously technically usable on the Rift, several features weren't adapted to its specific controls). But that changed last week, when Oculus specific support was announced and Tilt Brush for Oculus went on sale.

While Tilt Brush is a fun app, for sure (and a great demonstration on the potential of VR), it's rapidly becoming something else entirely. It's becoming a game development tool.

Tilt Brush for Game Assets

I'm the man in the box

I'm the man in the box

I won't pretend to know everything about Tilt Brush. This isn't a review. This is only a testimonial from a new user, as to its potential. Full disclosure: I wrote off 3D modeling years ago. In The Distraction Lab, my roles are lead developer and game designer. I can pull out Blender when I need to and make basic shapes but that's about it. Sometimes I have a brilliant idea (or at least I think so...) and I need art: immediately. My more 3D inclined teammates don't always have time to help out, so I've been looking for a basic modeling tool for years. It turns out I was looking in the wrong place. I just need for VR to step up to the plate.

Tilt Brush + Unity

You spin me round, right round...

You spin me round, right round...

Google's Tilt Brush Toolkit has allowed me to take my ideas, get them on the screen, test them, and then present them to the team. We're all creative individuals but sometimes me saying "the red box is the enemy, and he's hiding behind the green box - which is a tree..." does nothing to help my case. My designs are sold short by my lack of 3D skills.

By default, Tilt Brush will let you export your sketches as FBX files - which import nicely into Unity. When a sketch is dropped in, the first thing you may notice is they're all grey - and your color data is missing. That's where Tilt Brush Toolkit comes in: besides templates, scenes, and examples, it includes a variety of custom Unity shaders which will give you one click access to your original colors. You may need to re-scale and re-orient your anchor point, but those are quick fixes.

Speed Building

World of Drawcraft

World of Drawcraft

Again, I'm new to Tilt Brush, but upon my first test of it, I was able to sketch basic assets, bring them into Unity, add some lights and character controls - all in 30 minutes or less (which I realize sounds like an ad for pizza) I'm sure I'll find things I don't like, or things I'd like added - but for what I need, this is looking pretty good. The Toolkit SDK also supports animations, which is something I haven't even approached yet. (maybe for an upcoming review)

So while it may be far off, I dream of a future where Unity's native VR editor support has gone live, Tilt Brush is built in, and I'm tearing through prototype levels without ever taking the headset off.

The Making of Duck Hunt VR

A few weeks ago, we spent a weekend making a quick VR homage of DuckHunt, just to test the Oculus Touch controllers. We know we're not the first Duck Hunt VR out there, but we hoped we could bring something amusing to it. Not a final product by any means (no UI, for example), but we needed to piece together how the Touch controllers differed from the Vive controllers. Although we've been testing VR in both Unreal and Unity, we chose Unity since it's so easy to get set up with the Oculus SDK.

We’ve had some people ask what it takes, so here’s a high level overview.

The Sprites

I'm the duck in the box

I'm the duck in the box

A quick Google image search gave us the majority of the sprites we needed (in fact, almost any classic game sprites are readily available). For the ducks and dog, we were able to use the exact sprites from the original game. But for the environmental sprites (trees, grass and bushes) a little Photoshop work was required to break them apart and extend them - after all, they were now going to be placed in 3D space so you'd be seeing more of them that what was contained in the original art.

The ducks received an extra layer of interactivity, in the form of a Box Collider to intercept the Raycasts coming off the guns (for hit detection)


Say hello to my little friend

Say hello to my little friend

There are two types of animation in the project: programmatic and dynamic. The ducks were entirely dynamic - upon creation, each duck would generate a random speed and direction, and then continue to use that logic to switch back and forth. For the dog and the "2017 version" pistols, we used Unity’s state-based animation system and programmatically listened for a simple trigger. The ducks also contained a small state system, tracking their animation status of: flying, shot, or falling.

The Controllers

Pew, pew, pew

Pew, pew, pew

We used the Oculus SDK for our motion controllers. We thought about using the SteamVR plugin for Unity, but we’ve already had some experience with that and wanted to try something new. Also, the ghost hand rendering that comes “for free” with the Oculus SDK was perfect for our punchline: switching from gun mode to grab mode. After connecting the guns to an Oculus Avatar, an empty GameObject was placed in the barrel of each gun and used as a Raycast emitter for duck detection.

A listener was placed on the A Button to toggle between 1984 mode (Zapper) and 2017 (dual pistols). Clicking the right analog stick, removed the guns entirely and put the user into interact mode: where we utilized the Oculus Grabbable code for picking up the grenade models.

The Level Design

Easiest level design ever

Easiest level design ever

Fortunately for our quick build, level design in DuckHunt is very simplistic: grass, trees and bushes. We chose to keep all our assets as Sprites and build the world in 3D space (then controlling the Sprite sorting order). For the sake of time (and to match the basic look of the original), we only did two “layers” deep into the 3D environment (just enough to give the world a sense of scale to the headset wearer). We then curved the environment to around 90 degrees in either direction, just to have some level of immersion (sorry, no room scale yet...) The only challenging part of the level design was dealing with Unity's Sprite layer numbering system. (after some trial and error, we discovered that positioning the Sprites with positive layer numbers actually occluded the Touch ghost hands. Moving our layer numbering into negative numbers fixed this.)

The Ducks

Everybody out of the pool

Everybody out of the pool

We needed a very different number of ducks for our 1984 and 2017 versions, so we created a simple emitter with customizable options. That allowed us to place each emitter in the 3D scene and independently control spawn speed, maximum ducks and their initial delay values. For example, the 1984 version had a slow initial speed with a two duck maximum. For the amped-up 2017 version, we used 12 emitters, with a fast spawn rate, a series of delays (so they all didn’t start simultaneously), and no maximum ducks.

One cheat we had to make was with the audio: each duck was originally its own AudioSource for flapping and quacking sounds. When you had 50+ on the screen simultaneously, it became maddening. The primary Duck class was given a static array of all ducks, which grew as each were added - making them aware of their brothers. After 20 ducks on screen, we simply didn't allow any new audio.

The Finale

The Big Bang

The Big Bang

The 2017 version needed a big ending that paid homage to the 8-bit era, and something that made use of the motion controls. We felt the best way do that was with a grenade and the end-boss explosion sprites from Contra. To achieve the staggered animation effect, we created a simple Explosion class, with each instance monitoring the total number of sibling explosions. At run time, they were then assigned a small delay based on their birth order. In other words, we could simply duplicate and drag/drop explosions, and the animation system would automatically take care of the timing and depth.


We decided early on that our little experience wasn't going to be released publicly for two main reasons: 1) we're using this code base for an unrelated upcoming project, and 2) Nintendo lawyers are terrifying. Instead, we felt the best way for our Duck Hunt VR to live on was through this little video:

Duck Hunt VR aka Hello World

I'm pretty sure for most of us (of a certain age...), our first experience with any gun games was Duck Hunt. Then later came House of the Dead, Time Crisis, Revolution X (starring Aerosmith for some reason?), that Terminator game with force feedback that left my shoulder sore... well, you get the idea.

But in a lot of our minds, it will always be about those ducks and that dog. Which is why I think the universal reaction to hand controllers has been "Let's make Duck Hunt!" It's the Hello World of motion controlled VR.

The Distraction Lab got our set of Oculus Touch controllers right before the holidays and we needed to test them out. Around 48 hours later, we had this.

This was built in Unity (C#), using Oculus Touch controllers.

Bonus Points: name the game we used as the source of our explosions. (Hint: you know the code....)

I think we were really shocked how easy it was to incorporate the Touch controllers. Unity's done an amazing job and documentation on the Oculus SDK has been fantastic. We noticed some oddities by using Sprites - if our sprite layer ordering was two high, it would block the "ghost hand" rendering of the controllers. But honestly, that was our only technical hiccup.

This proof-of-concept was strictly for our own entertainment - so we won't be releasing it into the wild. But it was a great jump start to an upcoming gun-based VR project.


Oculus Touch: A Quick Review

We've had the Oculus Touch controllers in the office for about a month - but thanks to the holidays (and pesky family obligations) we were finally able to break them out for a test run.

First thoughts: the reviews are correct. They do complete the Oculus package and they make it something worth owning. Oculus should immediately make the combo package, the "default Oculus" (but please keep selling them individually for when I eventually tear it off my head, throw it across the room, and break it. That seems to be my universal response to VR horror games.)

The interesting part for me: the Touch controllers make the Vive controllers feel like prototype hardware. I love them. They feel perfect in your hand. And I love the fact we have a controller war going on. Vive showed at CES where it's going. Oculus will soon follow up. And that competition is going to make both better. (the Oculus sensors on the other hand are a work in progress. We'll soon be ordering a third to test out the experimental room-scale mode)

Speaking of both: if you're a Unity developer, grab the SteamVR plugin and dive right in. Pro: it works great. Con: I wished they dedicated one person to making the documentation half (or a fourth...) as good as the documentation for the Oculus SDK. You're going to end up learning by doing and exploring, not reading. And you'll have to do some work to access all those extra Oculus buttons, but beyond that, our Vive and Touch controllers have been getting along swimmingly.

Anyway - take this whole review with a grain of salt, because this is pretty much all we really wanted motion controlled VR for: