A prehistoric protein has been recreated in the test tube.
It gives an insight into a world 240 million years ago when reptiles ruled the Earth.
US scientists used a computer to predict the sequence of an early dinosaur gene.
Then they built the protein it codes for - a visual pigment that helped dinosaurs see in dim light.
The research suggests that archosaurs were better suited to nocturnal life than expected.
The class of reptiles gave rise to dinosaurs, and later to crocodiles and birds.
"These archosaurs may have had better night vision than was generally appreciated," said Thomas Sakmar of the Laboratory of Molecular Biology and Biochemistry at Rockefeller University.
Skin and bones
The real significance of the approach is that it answers questions about extinct animals that could never come from fossils.
Habits, behaviour and even skin and eye colour leave little trace in the fossil record.
The archosaurs
Known as 'ruling reptiles', they were the direct ancestors of the dinosaurs
They evolved in the late Permian, about 250 million years ago
They gave rise to dinosaurs, birds, pterosaurs and crocodiles
"What we tried to do was create an early dinosaur protein in a test tube," Dr Sakmar told BBC News Online.
"We're not getting it from a fossil or from preserved amber but we're using a computer method to predict what it is going to be and to actually make it.
"The fact it works beautifully in the test tube make us confident we're on the right track."
Full details of the research are published in the journal Molecular Biology and Evolution.