SDM shape deposition manufacturing for multimaterial layers