Fire Album Gets a Tune up

These 5 fire scenes were “tuned up” to animate with a more fluid, natural behavior.

These 5 fire scenes were “tuned up” to animate with a more fluid, natural behavior.

Overview

OnSwitch had fire simulation scenes since launch in early 2014 – just candlelight to start off. People loved it, but it didn’t quite dance like a real flame. Our second try was much better and we built a fire animation engine that could simulate many kinds of “flames”. Over the last few years we added Fireplace and Embers and Blow Torch and all the other scenes you see in the album using the same animation engine, with one exception, Crystal Fire . Our rational for that scene is explained in another blog post.

While these scenes are quite good, they had some limitations built into them that with hardware improvements we can now remove for a better flame effect. We also made targeted improvements to certain scenes based on feedback from users.

Blame the Hue V1 (Round) Bridge!

Fire animations send many bulb animation instructions per second. The original versions of our fire scenes were designed to work with the Hue V1 Bridge, which is more limited in how many instructions it can process per second. Since it is now no longer supported by Philips we can be sure most of our users do not use this bridge and can now target the more capable V2 (square) bridge.

The Hue V1 bridge didn’t process our Fire animations as quickly as the V2 (Square) bridge does.

The Hue V1 bridge didn’t process our Fire animations as quickly as the V2 (Square) bridge does.

What’s in a Fire Scene?

A fire scene contains the following settings:

  • Brightness Range: defined by a maximum and minimum brightness.

  • Color, Saturation Range: defined by Hue and Saturation at maximum and minimum brightness.

  • Transition Time Range: defined by the shortest and longest transitions between flame movements. These values are in fractions of a second.

  • Wait Time: how long should OnSwitch wait, doing nothing, while the bridge responds to the commands we are sending it for a single flame movement. Also measured in fractions of a second.

The combination of these settings quickly cycles across each bulb. At each bulb OnSwitch chooses random values for Brightness, Color and Transition that fall within those ranges. Those random values combine/interact to produce unpredictable flame behavior.

The Problem:

To accommodate the V1 bridge we added more Wait Time after each “flame” movement. We let the flame finish moving before we sent the next instruction. This led to flames that could drop brightness quickly and appear to stop dead for a moment.

The Tune Up!

This tuneup primarily reduces the wait times to the point where it occasionally interrupts the flame before it’s done with its last flame-flicker instruction. This keeps the flame moving and seemingly changing directions without ever coming to a sudden stop.

We also adjusted the transition times to both lower and higher to work better with these faster Wait Time periods.

Additional Tuning & Improvements

Embers: We reduced the top-end brightness so that the embers would stay as a warm glow without suddenly becoming bright – more like real embers. We also lengthened the transitions so that it moves more slowly rather than like a quick flame.

Color Fire: We removed the sound. Our original idea was for this to be “Alien Fire” and have a strange spacey, fire sound. The sound we had was a little harsh and didn’t let people enjoy the colors without turning off the sound, which we didn’t want to encourage. So it’s just the dancing color flames now.

Recommendation for Best Fire Experience

Fire Scenes should be run on 5 bulbs or less for best performance. It’s designed to look best with 2 or 3 bulbs. More bulbs increases the chance even the V2 hub will get back logged with “flame” instructions.

Positioning your hub closer to your bulbs will also improve animation performance if you find it’s not keeping up.

fire_candle_hd_.png







Previous
Previous

We Love (Lava) Lamp!

Next
Next

How to Use the Groups Screen