A Bluetooth holiday snow globe in Unreal Engine

And a few lessons learned about UE4’s Particle System while building this limited scope sketch/toy

Christopher Lepkowski
Planimal Interactive
5 min readDec 18, 2017

--

We’ve previously demonstrated some possibilities for creating custom Bluetooth objects and linking them to interactive applications, and were recently asked to pitch a short-turnaround experiential activation for a holiday event.

The project fell through but we decided to build our original concept anyway — a digital snow globe that reflects the real-time movements of a real one — as an exercise and an opportunity to explore some nuances in Unreal Engine.

Plus it made for a fun and relaxing holiday project!

Here we’ve captured video from the application running on a QHD (2560×1440 pixel) monitor — we also had an opportunity last week to demonstrate the application at a client’s facility in 4K on a massive 80-inch screen. Someone noted that it would be great projected on a building at night… I agree!

Their offices also made for an ideal testing ground as they were filled with dozens of Bluetooth devices and Bluetooth-enabled smart televisions, meaning that we could test for the first time whether interference in a Bluetooth-rich environment was an issue. (Thankfully, it is not.)

Basic background

As in previous demonstrations, the gag here is driven by an orientation sensor sending data in real-time over a custom Bluetooth service. The sensor and the Bluetooth-enabled Arduino microcontroller board together are about the size of your thumb, but depending on how we mount, layout, and wire them, the actual size may vary.

We soldered them to a perfboard that just fit into the base of a real snow globe, as you can see below.

Working with Unreal Engine

While the majority of our interactives are still powered by our in-house custom framework, REX, we now regularly turn to the Unreal video game engine for projects involving rich 3D scenes and visuals.

Working with a mature product like Unreal — a workhorse in the video gaming industry that’s been used to build numerous high-profile titles — means that many common problems and visual challenges have already been solved.

But every project, including a simple one like this snow globe sketch, has its own particular quirks and requirements. The question for us then is whether we write our own custom code from scratch to handle the situation, or look to find the “Unreal” way.

Increasingly, we’re choosing to let the engine lead us to a solution, rather than “doing it ourselves”. This means we’re actively pushing the use of Unreal’s internal editors and “Blueprint” visual scripting system over writing our own custom C++ code whenever possible.

Unreal Engine’s Blueprint visual scripting system (from their documentation)

It goes against our nature to go looking for a solution rather than typing one up from scratch, but ultimately we’ve found it pays dividends to lean on the wisdom of the Unreal Engine architects and the community of developers contributing to it. (Unreal Engine is an open-source software project.)

For this project, that largely meant looking to Unreal Engine’s robust particle systems to handle our snowflakes.

The Snowflake Particle System

While we’ve worked with particle systems before, this was only our second project working with Unreal’s particle system and its many modules. They give a great deal of flexibility and power while enabling rapid iteration. Getting more familiar with them was the prime reason we chose not to “code our own” snowflake behavior from scratch.

In no particular order:

We used a Collision Module to keep our snowflakes inside the globe and not falling out all over the rug. (It was also important to check a box in the Unreal editor for “double-sided” collision on the glass globe — otherwise snowflakes could still travel one-way out through the glass.)

We sent a variable to the Spawn Module that allowed for more snowflakes to appear when the globe was shaken.

We sent variables to an Initial Velocity module and gave the snowflakes a little push to help with the illusion that they were moving in reaction to the snow globe’s movement.

We used the Color Over Life module to slightly bring down the intensity of each snowflake’s glowing white material as it appeared and disappeared.

We used an Acceleration Module to apply gravity, always pulling snowflakes toward the ground, even when the globe was turned on its side or upside down.

And we made sure the Required Module was checked to “use local space” so that, in all other respects, the snowflakes moved with and whenever the globe did.

Final Thoughts

We put a time-box around this spec project that compelled us to stop tinkering with it and call it “done”, but I’d love to return to it and continue improving with an eye toward realism.

The swirling movements you see in a real snow globe could be better simulated, and I’d like to try an execution using a Particle Attractor module to achieve the effect.

And the refractive glass material of the globe looks convincing initially, but doesn’t duplicate the real-world movement of light through a water-filled globe, especially when viewing distant objects through the globe.

But all said and done, we’re happy with it! It was great fun to build and we hope you found it amusing as well!

If you found this article interesting, please give us a clap! Thanks!

Christopher Lepkowski is an interactive software consultant specializing in custom experiences for entertainment and advertising. He is the owner and director of Planimal Interactive in Los Angeles.

--

--

Christopher Lepkowski
Planimal Interactive

Technical Director and Partner at Pretty Big Monster, formerly Director at Planimal Interactive. More at PrettyBigMonster.com and planimalinteractive.com.