We all hear about how 3D printing lends itself to countless applications, from creating fossils to engineering human tissue. But now 3D printing is coming to the aid of global food shortage.

3D printed food may not sound appetizing, but NASA is funding mechanical engineer Anjan Contractor with $125,000 to create a prototype printer that could spit out food with long shelf life for astronauts during long-distance voyages, to Mars for instance, Quartz reported.

Contractor, however, has his heart set out on doing an even tougher task - cutting today's food waste in order to solve the world's alarming food shortages.

The engineer sees a future where every home has a 3D printer, surviving on customized, yet nutritious foods that could be created a layer at a time, the same way a printer's cartridge carries ink and ejects images onto paper.

The ultimate upside is that these cartridges would limit food waste. Contractor wants to provide the cartridge powders and oils with a shelf-life of 30 years, meaning they'd use up all the required sugars, carbohydrates, and proteins before being returned to local grocers for refills.

So what food is being tested first for the menu? Pizza.

While it's nothing compared to a New York pizza, Contractor said the way we perceive food has to change if this means overhauling the current food system.

Contractor first showed how the cartridges could successfully print chocolate. Now, his new pizza printer, still in early stages, is being tried to print a layer of cooked dough before adding tomato powder, water, and oil to create the sauce. He didn't forget the top "protein layer" either, which would contain animal, milk, or plant sources.

This pizza printer idea is based on an open-source hardware called second-generation RepRap 3D printer and helped him garner the NASA grant. Contractor added that he'll want to keep this 3D printer open-source as well, meaning its code can be accessible to anyone interested in adding or changing the recipes.

While it's too early to tell when or how much the printer will go for, one thing is for sure, we'll never look at printers the same way again.

"One of the major advantage of a 3D printer is that it provides personalized nutrition," Contractor told Quartz. "If you're male, female, someone is sick-they all have different dietary needs. If you can program your needs into a 3D printer, it can print exactly the nutrients that person requires."