It took a YouTube video, a walk-in freezer kept at negative 20 degrees Celsius, and some very cold-tolerant engineering students for researchers to finally figure out why freezing soap bubbles resemble glitter in a snow globe. The trick itself is a popular winter science experiment when temperatures dip below freezing: head outside, blow a soap bubble, gently plop it onto some snow or ice, and watch as crystals dance around on the film until the entire thing is a delicate ice ball. It’s visually stunning — but until very recently, people didn’t know exactly why bubbles freeze in this particular, mesmerizing way.

Normally, when a drop of water or a puddle freezes, it starts solidifying into ice at the coldest spot, where it comes in contact with other snow or ice. Fresh ice freezes the neighboring water, creating a nice orderly progression across the puddle called a freeze front. But when you freeze a bubble in a frigid room, all that order quickly goes out the window.

It starts growing normally, freezing from the bottom, where it touches the ice, up toward the top, but then, suddenly, hundreds of freeze fronts appear on the bubble’s surface. “It kind of looks like the swirling crystals you’d see in a toy snow globe. That’s why we call it a snow globe effect,” says Jonathan Boreyko, the co-author of a new article about the snow globe effect, just published in the journal Nature Communications.

Boreyko, a mechanical engineer, leads a lab at Virginia Tech that focuses on how fluids behave — including how puddles and droplets freeze. When some of his grad students wanted to know if they could look into why bubbles in popular YouTube videos froze in those distinct patterns, he was excited. “I think this is the first time in my life I can say that my paper was inspired by YouTube” Boreyko says. For years, graduate student Farzad Ahmadi and undergraduate Christian Kingett would periodically bundle up in jackets and borrow a neighboring lab’s walk-in freezer — chilled to negative 20 degrees Celsius (negative four degrees Fahrenheit) — to carefully deposit soap bubbles onto ice using pipettes.

As a result of all that cold labor, they found that the snow globe effect was driven by something called a Marangoni flow. “That’s just fancy talk for basically, fluids flow from hot to cold at an interface,” Boreyko says. As the bubbles froze in the freezer, the still-liquid part of the bubble kept moving, ripping ice crystals off the growing freeze front and tossing them around. Those ice crystals each created their own freeze front, making the bubble’s surface solidify faster.

But in a freezer where everything is the same temperature, how were parts of the bubble heating up enough to create the flow? “It turns out the answer is in the freezing itself,” Boreyko says. “Its very counterintuitive to people not in the field, but when you freeze water it actually warms it up.” That tiny bit of heat (usually just a few degrees) is enough to start the soap moving up toward the top of the bubble, where the freezer is still keeping it cold.

After the grad students thawed out a bit, they tried the same experiment at room temperature, again blowing bubbles onto a block of ice. The results were wildly different, as you can see in this video:

Instead of freezing entirely, halfway up the bubble the freeze front just... stops. The warmer air in the room keeps the bubble in a weird purgatory until air starts slowly seeping out of tiny holes in the frozen half of the bubble. The holes are so small, that Boreyko says it took several minutes for some of the half-frozen bubbles to collapse fully.

Both experiments have wild-looking results, and if you live in a cold climate, you might get the chance to try the experiments for yourself this winter. All you need is some soap solution, a cold surface (like snow), and a day where the air is below freezing.

“It’s pretty easy for people to do and that’s part of why I wanted to do this,” Boreyko says. “Anybody can see the effects themselves, and this can inform the why behind the beauty they’re seeing, if they are interested in learning more about it.”