Mapping the human brain in detail could help to unlock some of its mysteries, but our own brains are such amazingly intricate organs that we're going to be waiting a while for that to happen. Still, scientists just took an important step towards that goal.

A team has just created a high-definition, 3D picture of something a little smaller – the brain of a fruit fly. Showing every single one of the brain's 100,000 neurons, it's the most complete brain map ever created.

Fruit fly (Drosophila melanogaster) brains are only the size of a poppy seed but still pack in an incredible amount of complexity: the work involved combining around 21 million images taken across more than 7,000 brain slices.

What has emerged at the other end is a fantastically detailed image that scientists can zoom into at the nanoscale, and follow individual neuron pathways.

It's hoped that the map will give us a much better understanding of how brains and nerve cells operate – both in fruit flies and human beings.

Just check out all the crazy ways those neurons are connected:

fruit fly brain map 1(Z. Zheng et al./Cell 2018)

"The entire fly brain has never been imaged before at this resolution that lets you see connections between neurons," says one of the team, neuroscientist Davi Bock from the Howard Hughes Medical Institute (HHMI) in Maryland.

"Any time you look at images with higher resolution and more completeness, you're going to discover new things."

To produce their picture, the researchers used a technique called serial section transmission electron microscopy.

First, the team loaded the cells' membranes with heavy metals, marking the outlines of the neurons and the synapses that connect them.

Next, beams of electrons were shot through the brain. These electrons which get scattered and reflected when they hit metal – in the same way that X-rays are blocked when they hit bone.

This "lets us see the strands of spaghetti that are all tangled together in the big bowl that is the brain," Bock told Discover magazine.

The extra ingredients here were two high-speed cameras and two custom-built systems to make the process of collating millions of images much quicker than normal.

An entire brain slice could be produced in under seven minutes, around five times faster than it would take with earlier setups.

Next came the process of mapping all of the 100,000 neurons in the fruit fly brain, which will take some time.

The map is already leading to discoveries, though – the team traced the path of a group of neurons to a part of the brain involved in memory and learning, known as the olfactory projection neurons.

They found neurons and an information pathway that hasn't been identified before now, which could help them understand how fruit flies learn.

"[Fruit flies] can learn and remember," says Bock. "They know which places are safe and dangerous. They have elaborate sequences of courtship and grooming."

The data is now available for anyone to download and dig into, and the team hopes it will lead to a better understanding of fruit fly behaviour.

Could the same technique work on human brains too? There are about a million times more neurons in a human brain, so the processes are going to have to be scaled up significantly – over years – before that happens.

For now scientists have plenty of intriguing data to study with their fruit fly picture – and the researchers responsible for it point out that the tiny insect is more advanced in its thoughts than people might think.

That means there should be a wealth of neuron connections to analyse further.

The research has been published in Cell.