In this work we develop an algorithm using finite element and gradient descent methods in order to compute "optimal" heterogeneous multi-material configurations for objects subjected to complex environmental loading. Specifically, we compute heterogeneous elasticity fields to minimize the difference between actual and desired displacement for selected surfaces of objects subjected to loads which would produce substantively different displacements in an object of the same geometry but composed of homogeneous materials. Elasticity is computed with an iterative gradient descent method with line searches. This algorithm is intended for use in computer-aided design environments to facilitate the development of objects composed of heterogeneous material distributions which may vary in three dimensions, thereby minimizing factors such as cost or density to achieve reductions in part material expense or weight, or achieving particular performance with a specific geometry. The emerging field of additive manufacturing processes such as 3D printing has enabled the creation of such objects. While biological processes frequently optimize both geometric form and material composition, the majority of traditional engineering design optimization has focused on geometry rather than material configuration. Materials are typically uniform or composite and assigned to entire parts or assemblies. This work demonstrates a novel computational method for optimizing such material configurations for particular parts. Such custom high-performance part fabrication is projected to become widespread as the field of additive manufacturing further matures and expands, and unified tools to perform both geometric and material configuration optimization will become increasingly important to fully implement the advantages of this fabrication method.