Three dimensional printers are around but quite expensive. This is an idea for a cheap DIY approximation of one (improvements welcome).
This system is comprised of polyurethane foam and a manually adjustable "mesh" that the user adjusts with "height map" parameters output from a specialized CAD program
(or plug-in).
The "die" consists of adjustable pegs arranged in a square pattern on a board each of which are attached to a single flexible rubber sheet coated in a non-stick material (or a chain mail like mesh).
For example, to get a single "spike" rendered in 3D, the user would receive output that resembles:
9 9 9 9
9 1 1 9
9 1 1 9
9 9 9 9
He would raise the spikes at the edges of the 4x4 square to "9", lower the spikes in the center to "1", and create the polyurethane material by mixing its components (usually available in tubes labeled "A" and "B" that you mix to create the foaming polymer). He would then pour the material in this flexible die, wipe off the excess, and wait for it to set.
In reality, of course, the number of pegs would be larger (such as 32x32 or 64x64.