Extracting Triangular 3D Models, Materials, and Lighting From Images