Added support for materials and lights.