Combining Discriminative and Generative Methods for 3D Deformable Surface and Articulated Pose Reconstruction