What's happening inside your pizza as it cooks? Food scientists have gone to surprising lengths to find out, says Veronique Greenwood. And in the video above, BBC Future peers inside a restaurant oven to show why not all mozzarella cheese is the same.

When you bake a batch of brownies from a box or pop a frozen pizza in the oven, you're experiencing the work of dozens of scientists. Most people don't think of their food as being particularly technical, but to get brownies that rise in the middle instead of slumping, or pizza that browns on top instead of turning into a sea of oil is not as simple as it might seem, especially when the food is intended to be consumed weeks or months after it's packaged. Your dinner is the result of detailed experimentation.

And lest you think they're a rare breed, food scientists are everywhere – one of them even became the UK's first female prime minister. In her first career, Margaret Thatcher supposedly helped develop a method for whipping more air into cream that paved the way for soft-serve ice cream, although the extent of her contribution has probably been exaggerated.

For a taste of what food science is like, consider a recent paper in the Journal of Food Science, in which researchers at the University of Auckland in New Zealand investigated the brown bubbling, or blistering, of pizza cheese. For food scientists looking to understand what people like to eat, the gold standard is, well, people eating things. The researchers often set up sensory panels, in which test subjects sniff, sample and peer at foods before giving their opinions. But running a sensory panel takes time, and the results are not particularly consistent when it comes to assessing the visual properties of food. So this team of researchers decided to quantify the blistering of different cheeses using a high-resolution camera and software instead.

Hungry yet? (Getty Images)

Hungry yet? (Getty Images)

It sounds delightfully nerdy, and just a tad over the top, but there is actually a very serious question to be answered: what kind of cheese works best on a pizza? The obvious answer is, of course, mozzarella – the most common pizza cheese. Reassuringly, this is what Bryony James and her team confirmed. But now we know exactly why mozzarella works so well and why, say, cheddar will never keep the customer satisfied.

Not every cheese blisters in such a tasty fashion, says James in a video accompanying the paper. "It is dictated by a combination of the composition and the mechanical properties of the cheese itself, as well as every other component of the pizza," she explains.

To investigate, the team sprinkled grated mozzarella, cheddar, colby, edam, emmental, gruyere, and provolone on pizza crusts and baked them in an oven for a set time. Then the pizzas were shunted under a camera to be photographed for computer analysis. The software quantified the colour uniformity of the cheeses, with high uniformity meaning that there were no browned spots. Each cheese was also put through its paces in a standard panel of cheese tests, assessing its stretchiness, moisture content, how much oil it releases as it melts, and at what temperature it melts.

Perfect bubble

What the researchers were measuring with their software was the result of a very specific chain of events related to those properties. As cheese heats up, the water trapped within it – between strands of protein and globules of fat – starts to boil. It evaporates into steam, which gathers together to make a growing bubble in the cheese. If the cheese becomes elastic as it melts, the bubble will be able to stretch large. If the cheese is less stretchy, the bubble will stay small. Meanwhile, as the steam has been consolidating itself into a bubble, oil leaks out of the melting cheese to form a slick on top of the pizza. The top of a large bubble will break the surface of the oil and be exposed directly to the oven's heat, which will evaporate the rest of the water in the cheese and brown it. But if there is too much oil, even a large bubble won't break through the layer and it will remain a more pasty shade.

Mozzarella browns in just the right way because of the way it bubbles (Getty Imges)

Mozzarella browns in just the right way because of the way it bubbles (Getty Imges)

All of these factors – elasticity, moisture, and oil content – need to be just right to get that particular pattern of blistering. The researchers found that cheddar, colby, and edam were not elastic enough to form large bubbles. gruyere and provolone formed large bubbles but contained too much oil to create a brown coating. Emmental had only enough moisture to make flat bubbles that never broke the surface. Mozzarella, it turns out, is a rather unusual cheese. It alone combined enough moisture, the right amount of stretchiness, and the right amount of oil to make the browning pattern we all associate with pizza. The researchers also found, while ascertaining mozzarella's special status, that using software to quantify the degree of blistering worked very well – something for pizza manufacturers to keep in mind in their continuing quest to improve their creations.

A crucial thing to note: to keep things simple for this experiment, the researchers didn't include pizza sauce. An experiment where sauce comes into play would be instantly far more complex – the extra steam it gives off as it cooks will almost certainly have its own impact on the way pizza cheese behaves. With that in mind, you can bet that the chemical makeup of the sauce, like every other aspect of a packaged pizza, can be designed with a high degree of precision to refine the final product.

Food for thought, the next time you pop a pizza in the oven.

If you would like to comment on this, or anything else you have seen on Future, head over to our Facebook or Google+ page, or message us on Twitter.