We consider the optimal distribution of several elastic materials in a fixed workingdomain. In order to optimize both the geometry and topology of the mixture we rely on thelevel set method for the description of the interfaces between the different phases. Wediscuss various approaches, based on Hadamard method of boundary variations, for computingshape derivatives which are the key ingredients for a steepest descent algorithm. Theshape gradient obtained for a sharp interface involves jump of discontinuous quantities atthe interface which are difficult to numerically evaluate. Therefore we suggest analternative smoothed interface approach which yields more convenient shape derivatives. Werely on the signed distance function and we enforce a fixed width of the transition layeraround the interface (a crucial property in order to avoid increasing “grey” regions offictitious materials). It turns out that the optimization of a diffuse interface has itsown interest in material science, for example to optimize functionally graded materials.Several 2-d examples of compliance minimization are numerically tested which allow us tocompare the shape derivatives obtained in the sharp or smoothed interface cases.