Ordinarily, when using an off-the-shelf 3D printer, it's quite difficult to print a single object that incorporates multiple materials. An experimental new system could make it easier, though, by utilizing a "programmable filament."
Most consumer-grade 3D printers create objects via a process known as fused deposition modelling. This involves loading them up with a spool of polymer filament, which they subsequently heat to the melting point, then extrude out of their print nozzle. In this way, they build items up, one horizontal layer at a time.
If you want to 3D-print an object that incorporates multiple types of polymer (such as ones of different colors), you usually have to swap the various polymer filament spools in and out of the printer, as it's printing the different parts of the object.
This can conceivably get very fiddly. If you were printing a vase with differently colored vertical stripes down the sides, for instance, you would have to swap between filaments on every printed layer. That's where the programmable filament system comes in.
It starts by analyzing the computer model of the object to be printed, determining which parts of that item will be printed out of which polymers, and in what order. It then utilizes the existing 3D printer to create a customized filament spool, different sections of which are made out of the different polymers.
That spool is printed as a flat horizontal spiral. To start, all of the sections that need to be made of the first type of polymer are printed, with gaps between them where the other polymer(s) will go. The one or more other polymers are then deposited into those gaps, with the joints between the different sections of filament being spliced together.
While the process does still require the user to manually swap in the different source spools, this only has to be done a single time for each type of polymer being used.
Once the resulting multi-polymer composite spool is loaded into the printer, the object can be printed all in one go. At the points in the build process where changes between polymer types need to occur, the extruded "programmed" filament will change accordingly.
The system is being developed via a collaboration between scientists at Meiji University (Japan), Osaka University and Texas A&M University. It's demonstrated in the video below.
A paper on the research was recently presented via the online ACM UIST Conference.
Source: Haruki Takahashi (YouTube) via IEEE Spectrum
I wonder a little about the quality of the printed filament. And (because there's a certain amount of ooze and drip when you heat the extruder at the beginning of a print) you'd definitely need some way to register the position of the filament segments before starting. Some of the filament segments for the items shown in the video would have to be very short.