In perhaps his most famous piece of scientific writing, the Italian chemist and Auschwitz survivor Primo Levi describes the story of a carbon atom. It begins its journey after being mined from a limestone prison that has sealed it for “hundreds of millions of years”. Then, after more than a century of travels — including being inhaled by a falcon, turned into wine and locked up once again in the wood of a cedar tree — it finishes by fuelling the neural instruction that Levi’s brain issues to scrawl the full stop that ends the story.

Included in his memoir The Periodic Table, the story of carbon, although brilliant and elegant, is fudged slightly. What happened to the carbon atom beforehand? Levi describes but a fraction of its lifespan. Indeed, he admits as much: “It already has a very long cosmic history behind it, but we shall ignore it.”

‘Cosmic history’: even at their simplest, Levi’s words have a lyricism that few can match. Carbon’s turning up in a green leaf, he wrote, might “by full right deserve to be called a miracle”. Most scientists interested in cosmic history these days call that carbon, and the leaf — along with everything else we can hold, see, smell, touch or describe in stories of physical transformation — ‘baryonic matter’.

Watch as 13 billion years unwind and the matter of existence is forged from stardust.

Like Levi’s single atom of carbon, the baryonic matter we see today, when we merely look out of our window or gaze at the majesty of the night sky, has a long cosmic history behind it. However, we can no longer ignore it. At least, not if we want to understand it — and how it has swirled and changed to form galaxies, stars, black holes and, yes, the odd leaf. Ironically, when physicists, mathematicians and cosmologists have tried to peer backwards into deep time, to model the way the Universe grew from its very beginnings, they have found it easier to focus on simulating the stuff that they understand the least: dark matter and dark energy.

On page 177 of this issue, scientists describe a computer simulation of baryonic matter that offers the clearest picture yet of its cosmic history — and also does a remarkable job of recreating in pixels the structure of the Universe we see around us. In strings of computer code and over some 16 million hours of processing time, giant gas clouds evolve and cool; stars form; supernovae explode and flood their region of space with energy; supermassive black holes churn; and, of course, chemical elements form, Levi’s carbon atom somewhere among them.

As an accompanying News & Views article on page 170 summarizes: “If all this sounds somewhat complicated, do not be fooled: it is extremely complicated.” The results are not the final word, but they will allow researchers to test with data their ideas on, say, the physical processes that guide galaxy formation and the evolution of black holes.

The simulation also allows the scientists to turn the hard data into hypnotic videos that play out how the Universe grew and twisted into shape (see go.nature.com/rfjzy4). Peer back to a mere 12 million years after the Big Bang and then watch as 13 billion years unwind and the matter of existence is forged from stardust. Imagine among this an atom of carbon or a molecule of carbon dioxide, an “ever renewed impurity of the air”, as Levi said, from which we all come. And then think where it could be now.