The Pentagon's Fringe Science unit (sounds like it's from Batman, but they're working on projects more on par with Terminator) has apparently been working on the science of shape-shifting--using "programmable matter" that can be ordered to “self-assemble or alter their shape, perform a function and then disassemble themselves.”
Several different science groups around the country are working on similar functions, from using synthetic DNA to intelligent material and using complex mathematical theorems to fold sheets of material into different three dimensional shapes.
Long-term, this technology could be used in scenarios from civilian to military. A few examples:
Morphing aircraft and ground vehicles
Uniforms that can alter themselves to be comfortable in any climate
’Soft’ robots that flow like mercury through small openings to enter caves and bunker complexes
Mimic the shape and appearance of a person or object being imaged in real time, and as the originals moved, so would their replicas
A soldier could even reach into a can of unformed goop, and order up a custom-made tool or a “universal spare part"
Our ideas formed in science fiction are catching up to reality. This stuff is pure Terminator-meets-Transformers.