Netrunner AR Experiment

I love netrunner. I mean look at these important points:

Like, why would you bother with any other card game. The problem is, when I watch streams of regionals and whatnot it's really really hard to watch whats going on. Sometimes the twitch chat is simply the viewers debating about what card is sitting there in the middle of a terribly low resolution stream. So that needs to change, and that was my goal.

The aim of this project was to try and find a way to use augmented reality to overlay a game with additional information. Step one, how the hell does AR work?

Vuforia was the answer, a system you can import into a unity project that has all kinds of amazing built in abilities for recognising cards and creating complex systems. You upload the image you wish to find in the camera and then build some basic code for making things display. Before long I had something!

First example
The most basic thing I could do

This was awesome! And surprisingly easy. Showing a simple image was more of a case of drag and drop than I was prepared to do. But that card looked kind of ugly, I wanted something more. Redesigning the idea for the card I ended up with something much nicer.

Second example
Now things are popping out

Each of the objects on the card had a different height, so they simulated this awesome kind of parallax effect when I moved the card around. But this is netrunner! Cyberpunk is futuristic and deserved a more exciting card.

First example
SO MUCH BETTER

It took me quite a while to get this working. I used a combination of unity's built in animation (for the green box) and some basic transformation code (for the circles). The animation wasn't working the way I wanted it originally, as I ended up with two choices:

Setting it to play once made the animation play once when the scene was initialised, not when the target image was found. It took me quite a while, debugging, triggering, ticking boxes I had no idea about until I came across the solution. If it only played when the object was enabled I would start with the object disabled and trigger it when it was found. This made things so much easier from this point.

I replicated this across a lot of cards (I should have used prefabs but I was on day 3 of having ever opened unity and still didn't quite understand the system) and had a working deck. I quickly designed a mat for play to trigger a bunch of virtual buttons, created a UI and had all the objects I needed to bring it together.

However, I had an issue. When the cards were far enough away to sit on a full sized mat, they wouldn't trigger anymore. Seems the resolution of the camera was just.. substandard. But I had a really good webcam, capable of 1080p, why was I getting such a bad stream?

After googling this for a while, I found a file deep in the vuforia directory (Vuforia\Editor\WebcamProfiles) that listed a bunch of webcams and the resolution they would be limited to. Aghast at the fact that this made literally all my work easier, I pumped up my resolution to 1920x1080 and suddenly everything was working again.

Or was it? The system I had made for watching which credits the player was on was fluctuating wildly

Mat example
It should read 10

I was afraid that maybe.. this just wasn't feasible. So I turned to the Vuforia library page to have a look at how image targets worked. Turns out that every image has X points of interest that the camera looks for, something I already knew. But those points were the points that the virtual buttons used to know if something was covering them.

Mat points
Notice how there are areas on the counter section with no points of interest

So by using the whole mat as an image target I was shooting myself in the foot. I uploaded a cut out version of the bottom right of the mat, where all the markers lay, and suddenly it was holding steady as it should.

Counter points
All the areas I need to check have a decent coverage now

I'm pretty damn happy with the results, but I think I have hours of tweaking and fiddling before I'll be super happy with it.

Mat example
Too pleased for words

Not too bad for my first week with unity!

Netrunner is the property of Fantasy Flight Games

The Playmat was put together with art and permission from Amélie Hutt