Scott Purcival

Game Programmer

Greenscreen Photo Booth

By on 21 March, 2021

The Inspiration

Fun Palaces was an annual event run by Western Downs Libraries. I’ve covered this before, but for those who don’t know, it was essentially a STEAM showcase, which stands for Science Technology Engineering Art and Maths.

When I first started at Western Downs Libraries in the role of Digital Support Officer, one of my first jobs, with around four weeks notice mind you, was to create some interactive experiences for school kids. Specifically, I was asked to do something with the greenscreen that the library had purchased just before I started.

Not knowing much about filmography, but being a game programmer, I decided to make a greenscreen experience in Unity.

Research

To begin with, I tried to make a simple greenscreen shader myself. I used a webcam interface in Unity to pull in an image, and then tried to simply mask out any green sections. I had experience using the greenscreen feature in OBS Studio, and so I had an idea of what sort of functions a greenscreen algorithm required to work.

I only had a very limited development timeframe, and quickly realised that my understanding of shaders and colour processing was not good enough to create my own solution in the time allocated.
A quick search on the Unity asset store later, and I found an excellent greenscreen solution for an affordable price.

I was approved for the spend, and quickly had a greenscreen solution working in unity.

Development

The next step was to create some interesting scenes for kids to put themselves into.

We had already decided at this time that part of the fun would be dressing up before standing in front of the greenscreen, so we used our costume library as inspiration for the scenes.
We brainstormed what would excite children and came up with Dinosaurs, Underwater, Pirates, Wild West, Minecraft, and a Magic Kingdom.

As we didn’t have an artist at our disposal, we searched the asset store for any free or cheap assets matching our themes, and were able to find a number of premade scenes or assets that we could use to create our experience.

A simple touch interface for changing the scenes later, and we had our program!

Testing and Reception

During testing, we focused mainly on foolproof ease of use, as most exhibitions at Fun Palaces were run by non-tech savvy volunteers.
The game was given a single button, with which users could change the scene. The only way to exit the game was to use the Alt-F4 keyboard combination, and this was done deliberately to prevent accidental exits.

We also did a considerable amount of testing to calibrate the greenscreen for the widest lighting conditions, however most of our learnings and solutions centred around making sure the greenscreen itself was mounted and lit correctly.
We also adjusted the greenscreen object in unity quite a bit to make sure that legs and arms were not visible cut off, and for interest we put some objects in front of the greenscreen to create a sense of depth.
We also made sure that the scenes were animated and interesting, with a key design point being that players could ‘touch’ the animals or objects in the scene, such as petting a dinosaur, or leaning on a shovel on pirate island.

We chose to point the TV which the game was projected on towards the greenscreen so that kids could look at themselves as they moved around the greenscreen stage.

The Greenscreen set up at Fun Palaces 2018

The experience was well received.
Children loved to dance around and see themselves in fantasy settings. Some kids had the most fun either wearing green or wrapping themselves in the greenscreen itself to try and disappear or be a floating head.

Feedback was completely positive, and the experience was considered one of the highlights of the expo.
One consistent piece of feedback on the UI was that the scene change button was not obvious enough. In future versions perhaps this should glow, or pulse to entice users to click it, but for our purposes, we simply manned the experience with a volunteer who would prompt the users to try different scenes.

Later Development

During the initial development, one of our stretch goals which we were unable to achieve was for users to be able to take a snapshot or video to take home as a memento. This was considered to be outside of the intial scope by management and as such did not make it into the first public exhibition.

For the second year of Fun Palaces, I was able to take a week to enable this feature.

Using the newly acquired Spydus API, I was able to connect the greenscreen to our library management system, and customer database. This allowed me to connect a barcode scanner to the greenscreen, and by scanning their library card, patrons could choose to have a photo sent to their email address on file.
This proved to be a great hit, with well over 100 photos being taken and sent out to customers during the event.
Tying the photobooth to library user accounts also led to a number of reactivated and new library memberships over the course of the event.

Due to the success of the greenscreen at two Fun Palaces events, I was approached by Western Downs Cinemas to create a photobooth experience for the upcoming Frozen 2 premiere.

After verifying with the suppliers that we were able to use the promotional Frozen 2 content for a photobooth experience, we created an animated Frozen 2 scene for moviegoers to place themselves in.
This proved to be an awesome success also. To managed the expected lack of library cards among moviegoers, the photos were stored to the device hard drive this time, and were later sent to members manually by cinema staff.

Our final modification was for the 2019 Christmas tree light up ceremony.
The greenscreen was again modified, this time with a north pole scene, and a number of christmas themed props.
As the event was being held at the library, we once again used library cards as a membership drive, which was once again quite successful.

Conclusion

The project initially spanned one week for the exhibition year of 2018, and then approximately another week for the implementation of the emailing system and API, and the Frozen launch and Christmas scenes.

The project proved to be robust and extensible.

As far as features left on the cutting room floor, so to speak, I would have loved to implement short video clips or GIFs, however this was outside of the timeframe I was allowed, but will be a great feature for future revisions.

The most difficult aspect was emailing. It turns out that there is no uniform email standard that all clients will accept.
Initially I had planned to put the photo inside a decorative frame in the body of the email, however the only way to do so which is universally compatible is to host the image on a web server somewhere, and this was outside of the scope and budget of the project.

Western Downs Regional Council also had security concerns about accessing the customer database, and storing patron images.
To resolve this, the program went through a complete code review with our IT development department, and the NUC device which the application ran on was password protected and encrypted with BitLocker to prevent sensitive data from escaping in the case of device theft.

Overall I was very happy with the way this project turned out.

The Greenscreen Photo Booth was made for, and is the property of Western Downs Regional Council as a paid project, and as such I am unable to provide the game for download or play here.



Leave a Reply

Your email address will not be published. Required fields are marked *