In 1900, a Taoist priest named Wang Yuanlu discovered a cave in Dunhuang, Gansu province, packed with tens of thousands of volumes of Buddhist sutra.
Six years later the Hungarian-British archaeologist Marc Aurel Stein arrived in Dunhuang, followed soon after by the French archaeologist Paul Pelliot. Both paid a pittance for priceless treasures from the cave, and both took photos of it and its surroundings.
When you compare those photos with ones taken recently, the extent of the irretrievable loss that Dunhuang and the world have suffered over the past century or so becomes clear. Colors on many of the murals and statues have faded, and blurry areas have become more expansive as a result of oxidation and damage inflicted by people.
A lot of the damage happened in the 1950s and 1960s when artists tried to make facsimiles of murals and when archaeologists tried to survey and map the caves.
Clockwise from left: 3-D printed Buddhist sculptures; Cameramen use scaffolding to capture the images on a smoked roof; A digital and immersive experience of the cave. Photos Provided to China Daily
From top: 3-D point cloud technology helps photographers to have a better rendering of the murals; Dunhuang Academy now uses high-resolution cameras to capture the images of the murals.
In recent years, the growing number of tourists has increased the amount of carbon dioxide and humidity in the atmosphere and the exposure of relics to light and other elements has sped up their deterioration.
In an effort to minimize the the damage, since July visitors have had to apply online to visit the caves. The number is limited to 6,000 a day.
Before beginning their tour proper, visitors go to the Mogao Grottoes Visitor Center to watch two 20-minute films, including one about the seven most valuable caves in terms of artistic achievement.
Since the end of last month it has been possible for people around the world to see online 3-D views of the caves, and virtual reality devices can be used to view the images.
"Over the past three decades, especially in recent years, we have been developing digital technology that can be used not only to preserve images of the relics, but also to help archaeologists record detailed information about the caves and help artists make facsimiles of the murals," says Wu Jian, director of the digital center of Dunhuang Academy, a research institute devoted to studying and preserving the Mogao Grottoes.
Cai Weitang, 59, an archaeologist, joined the academy in 1978. He is among the first to have applied digital technology in his work.
Earlier, all field surveys and mapping were done by hand, Cai says.
"We had to erect scaffolding so we could measure the higher parts of the caves."
A typical old-fashioned tool kit for an archaeologist in Dunhuang included a compass, a tape, a set square, a steel tape, a plummet and a home-made square grid.
The grid, usually one or two meters long, consisted of a handful of lines, fixed horizontally and vertically to form squares of about 1 square centimeter.
When surveying and mapping a mural, Cai put the grid in front of it without touching it. For example, if he planned to copy the lines of an eye on the picture, he would find three points on the grid, jot them down and connect them with lines. In this way, he could slowly build a collection of the outlines of the murals and colored statues.
As well as keeping accurate records of the murals and statues, archaeologists need to do the same for the caves, including taking high-definition photos, so that if one day they are destroyed for any reason, records will yield enough information to allow the grottoes to be fully and accurately replicated.
In the past, after the lines were drawn on gridded paper, they needed to be copied onto imitation parchment.
"It's an extremely complex job, and very time-consuming," Cai says, adding that there were too many inaccuracies through measuring with rudimentary tools.
"People draw differently. Some are good, some bad. They have very different styles."
Dunhuang Academy was founded in 1944 by Chang Shuhong. At the very beginning, the intention was to keep comprehensive archaeological records, but until the 1990s the project was behind schedule.
It planned to publish 100 volumes of records for the UNESCO World Heritage site, covering everything in the Mogao Grottoes, the nearby Yulin Grottoes and Western Thousand-Buddha Cave.
The first of the 100 volumes, published in 2011, included caves numbered from 266 to 275.
Generally, using the old method, it would take two to three people five to six years to survey a cave.
"We will now be able to finish all the surveying and mapping in four years thanks to 3-D point-cloud scanning technology," Cai says.
This technology enables users to collect detailed information about the subject based on points chosen during scanning, so that the detail of a curved surface or complicated structure and lines can be accurately captured.
It takes the scanner one to two hours to finish scanning a whole cave.
After scanning, the processed digital information generates a drawing of the cave's structure and the outline of the statues. But the shapes of eyes and noses on murals do not reproduce clearly, so archaeologists need to make revisions using high-definition photos.
"It's our first try," Cai says. "The new method cuts the work time by one third, and it's much more accurate."
Recently a reproduction of Cave 320 of the Mogao Grottoes was on display at the Getty Center in Los Angeles. The exhibition, opened in May and ran until September.
Ma Qiang, 53, director of the academy's fine art institute, is one of the artists who took part in the project. He spent four years creating facsimiles of the 6-sq m mural on the eastern wall of Cave 320.
Since 1981 when the 17-year-old Ma first arrived at Dunhuang Academy after failing the national college entrance examination, he has finished facsimiles of more than 30 murals in the Mogao Grottoes.
In the 1950s, the State Bureau of Cultural Relics received an old-fashioned slide projector from Poland as a gift, Ma says. Zheng Zhenduo, then head of the bureau, gave the projector to the Dunhuang Academy.
Ma recalls that the projector was still being used in the 1980s. If artists at that time wanted to create a facsimile of a mural they would first go to the cave to use rulers to measure its dimensions and record the information in notebooks.
Photographers, from the photographic section, that later became the digital center, would then take 10 black-and-white pictures of the whole mural.
"I would get the slides of 10 photos and then I took the projector and the slides to bigger caves, like No 61 or 98," Ma says.
After setting up a board and spreading two layers of Chinese art paper on it, Ma turned on the projector and put the images in. These were then projected onto paper. The size of the image could be adjusted according to the size appropriate for the cave.
With the mural's image projected on paper, Ma was able to trace the lines - even broken or unclear ones - and draw them.
However, after the projector had been on for 30 to 40 minutes the slides would get too hot and start to distort. So he then had to take a break to wait for the machine to cool down and for the slides return to their original state.
Ma would later go back and see what lines had been completely missed or incorrectly shown.
Usually, it would take an artist a year to do the first draft and revise it, and another year to color it.
"The most important thing is to understand the spirit of those murals and how their unique style developed in different historical periods," Ma says.
Sometimes the same Buddhist stories are presented in different styles.
Ma cites as an example the classic story about a prince who sacrifices himself to feed tigers.
Cave 428 and Cave 254 have murals that present the story, but the one in Cave 254, completed during the Northern Wei Dynasty (AD 386-557), is in the Han ethnic style, looking more unrestrained and free, compared with that in 428, drawn during the Tang Dynasty (AD 618-907), which is more ornamental.
Because of the complicated procedure, copying a 6-sq m mural would take two or three people two years to complete.
"Now it's easier for me to do a copy," Ma says. "But I have a lot of other work to do and it took me four years, from early 2012, to finish the facsimile of the mural on the east wall of Cave 320. I had to do the management work, write papers and do my own artistic work - last year he completed 500 ink and wash paintings.
"This time we used 3-D point-cloud technology to collect digital information for the whole cave. Based on that, we can build a wooden model of it and draw the outline of the murals."
Based on the outlines produced by the technology and the high-definition photos provided by the digital center, artists fill in colors made from stones such as turquoise, malachite and cinnabarit, and add finer lines that have been missed by the scanner.
"We still need to go to the caves to see the original murals and study their history and artistic styles so we can understand the spirit of the works in those years," Ma says.
The high-definition photos sometimes can be misleading to inexperienced artists.
"They focus too much on the broken or missing parts, and overlook the whole," Ma says.
Wu says the focus of future work at the digital center will be on studying how to present the digital information to audiences.
Ma believes artists' work based on 3-D printed copies of the murals will become the norm.
In June, the Dunhuang Academy presented 3-D printed Buddhist sculptures and their holographic images at the 12th Five-Year Plan (2011-2015) Scientific Innovation Exhibition in Beijing, attracting a great deal of attention.
"If the new technology can do the job, we will let it. We artists do what it cannot, such as adding to the thickness and granular sensation of the copies."