From light rays to 3D models