update material & output image