Added custom make3d preprocessing code