Add serialize() method to MyMaterial