Illustration by Ian Berry.

Editor’s Note: Science has transformed our understanding of dinosaurs in the past two decades. Get caught up with what’s new in this five-part CNN series.

CNN  — 

One close glimpse of a modern bird, especially around the eyes, and it may feel like you’re looking into the ancient past, when massive creatures walked the Earth and soared across its skies. It’s because birds are dinosaurs – they just happened to survive the mass extinction event that wiped out their large relatives 66 million years ago.

Today, birds are one of the most diverse groups of vertebrates, and they’ve had a long time to evolve. The first “bird” in the fossil record is largely considered to be Archaeopteryx, which existed 155 million years ago. Around 55 million years ago, the first hummingbirds and parrots began to appear.

This is an artist's reconstruction of what Archaeopteryx looked like when it lived 155 million years ago, as seen in "Dinosaurs: New Visions of a Lost World."

The more researchers learn, the more they realize that flight has evolved multiple times across animals, helping them reach the same goal of flight in a variety of ways.

Birds weren’t the only creatures taking to the skies back then. Flying reptiles called pterosaurs, which reached the size of small planes, dominated the skies as early as 215 million years ago. The fossil record has also shown evidence of flying dinosaurs, like microraptors, as well as other creatures that could glide from tree to tree.

The story of the origin and evolution of flight is a long and complicated one, made even more tangled and complex as new research restructures the roots and branches of this family tree.

Within the last 20 years, advances in technology, such as conducting computerized tomography, or CT scans of fossils, as well as the discovery of a wealth of fossils in China, are helping fill the gaps in the story of how animals transitioned from crawling on the ground to flying in the air.

The microraptor was a dinosaur capable of powered flight. This is the fossil of a microraptor.

Flight masters

Flying reptiles may be hard to imagine, but pterosaurs were the masters of powered flight in their day. They first appear in the fossil record about 215 million years ago, and they thrived until the mass extinction event that wiped out the dinosaurs 66 million years ago.

The fossils of these reptiles show they were perfectly adapted for powered flight. “Not only did they live alongside dinosaurs, but pterosaurs have a lot of the same features that birds later develop that makes them capable of powered flight,” said Eugenia Gold, assistant professor in Suffolk University’s biology department in Boston, Massachusetts, and research associate in the American Museum of Natural History’s division of paleontology.

READ MORE: Fossil confiscated in police raid is one of the most complete pterosaur skeletons ever found

But pterosaurs achieved flight in a completely different way than birds. Pterosaurs had a muscular membrane stretched between a ridiculously long ring finger and their ankles – almost like a modern flying squirrel, Gold said. They had a fluffy body covering to help them retain heat.

Like birds, pterosaurs had a keel on their sternum, a ridge that serves as the attachment for flight muscles, said Alex Dececchi, assistant professor of biology at Mount Marty University in South Dakota. But they were incredibly strong, with compact muscular bodies similar to gymnasts’ and kite-like wings for soaring over great distances and oceans, he said.

On the ground, they walked on all fours, using their feet and wings. And like mythical dragons, they sported tails. The earliest pterosaurs had long tails, which grew shorter over time. While pterosaurs started out small and living in forest environments, they eventually reached gigantic proportions and soared over oceans before going extinct.

The pterosaur Cryodrakon boreas was one of the largest flying animals that ever lived. The name means “frozen dragon of the north wind,” and it flew over North America 77 million years ago. This gigantic flying reptile had a wingspan up to 32.8 feet (10 meters).

An artist's depiction shows the Cryodrakons on the ground and in the air.

The pterosaur Quetzalcoatlus, which lived during the Late Cretaceous 72 million years ago, was the size of a giraffe with a nearly 10-foot-long (3 meter-long) head. Some pterosaurs were also known for having flashy, colorful giant crests stretching up like huge mohawks from the tops of their heads.

“But nothing shows us what pterosaurs looked like before they adapted to fly,” Gold said.

“All the evidence shows us the pterosaurs are cousins of dinosaurs and that both share a common ancestor,” said Mike Benton, professor of vertebrate palaeontology at the University of Bristol in the United Kingdom and author of the upcoming book, “Dinosaurs: New Visions of a Lost World” publishing on October 21.

While the oldest fossils of dinosaurs and pterosaurs comes from the late Triassic 215 million years ago, evidence suggests that their predecessor lived 250 million years ago, creating a 35-million-year gap.

This mysterious common ancestor likely walked upright, was warm-blooded and probably had feathers, but no wings, Benton said. And it was probably about the size of a pigeon with short limbs.

However, no fossils for this ancestor have been found. It’s possible that its remains weren’t preserved in the environments where it lived because forests don’t really fossilize, said Jingmai O’Connor, associate curator of fossil reptiles at the Field Museum’s Negaunee Integrative Research Center. Largely the creatures who die in forests are completely recycled by scavengers.

‘Giant flying murder heads’

Researchers aren’t exactly sure why pterosaurs reached the massive size they did before going extinct, some with wingspans of 10 meters (33 feet) or more. Some have suggested it was because small birds took over forest environments, leading pterosaurs to the open skies where larger wings were a benefit.

This is an artist's illustration of Cryodrakon boreas, one of the largest flying animals that ever lived during the Cretaceous period. Although researchers don't know the color of Cryodrakon's plumage, the colors shown here honor Canada, where the fossil was found.

Others think it may be due to the fact that the average size of available prey was pretty large. But at the end of the day, researchers agree that pterosaurs were huge, fascinating creatures before their soaring days came to an end.

So what would it have been like to encounter a giant pterosaur, such as Quetzalcoatlus? Mike Habib, research associate at the Los Angeles County Museum of Natural History’s Dinosaur Institute, paints a harrowing picture.

Imagine you can hop in a time machine, and you travel back to the Late Cretaceous. The world looks more familiar than you might think, with flowering plants and groups of trees. And then you see it, a fuzzy “giant flying murder head” walking around on its hands and feet, with folded wings, Habib said.

READ MORE: These prehistoric reptiles could fly immediately after birth

While its body wouldn’t be much bigger than your own, it would have an massive, rippling chest of solid muscle and an extremely long neck. At the top of its head would be a vaguely stork-shaped huge head, 50% longer than the skull of a T. Rex, with a toothless beak. It would probably be making fast, strange motions like that of a bird.

“Occasionally, the head comes down, and some poor screaming animal goes down the gullet, and it’s just rinse, wash and repeat,” Habib said.

If it glanced at you, the pterosaur would likely determine you’re too big to swallow (but hide your kids if you brought them).

Just then, a Tyrannosaurus rex begins to emerge from the trees. Within nine-tenths of a second, the pterosaur “throws a crouch on all fours and punches off the ground. These things are spring-loaded leaping demons,” Habib said.

The wings would snap out and the pterosaur may make a few, powerful flaps before landing a quarter-mile away on the other side of a river. The T. rex would know it’s game over and likely set its sights on you.

Wacky winged creatures

Not every winged creature was a powerful flier or predator like pterosaurs. In fact, the more researchers learn about extinct species, the more they question which ones were good fliers and which ones had wings, but were only capable of short bursts of flight to help them survive.

While Archaeopteryx is considered to be the oldest bird, it doesn’t have a sternum, a bone in humans that’s located in the middle of the chest – something that perplexes scientists. That means its flight muscles likely attached to its belly ribs, “and that would really compromise how its wings can work and how much power it could have,” Dececchi said.

While Archaeopteryx is considered to be the oldest bird, it doesn't have a sternum, a bone in humans that's located in the middle of the chest -- something that perplexes scientists.

This is repeated in other species after Archaeopteryx, but the next examples of fossilized birds don’t appear until 131 million years, creating about a 20 million-year gap, O’Connor said.

Archaeopteryx was bizarre in other ways. It had teeth, a long reptilian tail and claws on its hands. The next time birds show up in the fossil record, the claws and tails begin to reduce and disappear.

This illustration shows what researchers think micropraptors looked like.

Microraptors, which had wings on all four limbs, were feathered, flying dinosaurs that lived between 113 million and 125 million years ago. They had adaptations for powered flight that were better than Archaeopteryx and some early birds, but some were probably better gliders than fliers.

And then, there’s Yi qi, an anomaly in the fossil record. The pigeon-sized dinosaur was dated to 159 million years ago and had bat-like wings, also better suited to gliding than flying.

“There’s probably a lot more complicated interactions in the skies between pterosaurs birds and gliding animals” than we realized, Dececchi said. “They were fighting for food, fighting for shelter and dodging each other. If you’re a bad flier, you have to worry about pterosaurs catching you. There were probably dogfights happening in the sky.”

This fossil shows Yi qi, a glider that did not survive the extinction of the dinosaurs.

Survival of the smallest

Flight likely evolved in these animals to help them reach resources like food and shelter, as well as survive. Small body sizes and long arms helped reptiles and dinosaurs lift their bodies off the ground before they evolved into giant creatures.

The reason birds persisted, rather than some of the fantastical creatures that roamed the planet millions of years ago, is rooted in their ability to adapt. Birds, for the most part, were small and stayed small.

Unlike dinosaurs, they could rotate and move their eggs around without the embryos dying because they were structured differently. Bird eggs include a chalaza, a little membrane that holds the yolk in place within the egg, O’Connor said. When dinosaur eggs were flipped, it could cause the embryo to rip off of its adherence point, and then it would die.

Birds were also able to adapt their reproduction, respiratory system, eating habits and digestive system, O’Connor said. The fact that they could fly and migrate didn’t hurt.

READ MORE: These were the unlikely survivors after dinosaurs went extinct

Recent research suggests that dinosaurs were already declining before the asteroid impact that caused their extinction. Seaways were regressing and massive volcanic eruptions were occurring. Climate change was unfolding on a global scale and environmental shifts were in motion.

Before, many scientists were focused on trying to place all creatures with aerodynamic features into one, evolutionary lineage. Now, they want to better understand the biology and evolution of flight itself.

For example, Gold studies the ways that the brain may have changed in response to flight.

“When you start having this new dimension of aerial maneuvers, it becomes a whole new world. And your brain has to change to deal with that,” Gold said. Learning the parts of the brain that light up when modern birds fly can help researchers like Gold understand their ancestors that were capable of early flight and how they evolved.

It’s just one of many ways researchers are peering into the past to understand these ancient flying creatures. And they wonder what new surprises the fossil record may reveal next.

Sign up for CNN’s Wonder Theory science newsletter. Explore the universe with news on fascinating discoveries, scientific advancements and more.