When Buddhism first gained Imperial favor, Buddhist arts displaying scenes from the Buddha's life and the piety of the ruling classes became popular. Buddhist grotto art, featuring carving and painting, flourished at this time, leaving us spectacular and serene grottos such as Longmen Grottos, built less than 10 miles away from Luoyang, the capital of nine dynasties in ancient China. Much information on social structures, language and beliefs were preserved in the inscriptions, statues, and other artifacts found there.