replace the materials in the base image with those in the reference image