Using 3D Morphable Models for 3D Avatars and 2D Face Recognition