Add material parse function.