It's hard to teach a robot to sew.

Robots are good at handling materials that are rigid and easy to lift, cut and maneuver. It's why they're are widely used in auto manufacturing.

But it's a different story with making clothes. There's some automation in garment manufacturing, but you still won't find robots sewing clothes from start to finish.

Why? Fabric is floppy. "It has no corners and edges. It stretches and snags," said entrepreneur Jonathan Zornow, whose startup Sewbo has found a way around that.

Zornow's solution was to temporarily stiffen fabric with a water-soluble polymer, making it rigid enough for a robot to handle.

"This polymer is already being used in automated textile manufacturing to stiffen yarn," he said. The substance easily washes out in warm water and returns fabric to its original softness.

Related: Robot pizza place introduces high-tech delivery trucks

In 2015, Zornow, 30, quit his day job as a web developer to focus on developing his robotic sewing system.

Using about $10,000 of his own money, he rented a programmable robotic arm and bought a standard sewing machine and an ultrasonic welder.

His goal was to program the robotic arm to fully assemble a T-shirt from start to finish. It followed a sequence of functions: a machine cuts cloth panels to be sewn, the panels are drenched with the polymer and stiffened, a robotic arm uses suction cups to lift each panel and position it in a sewing machine. Finally, the robotic arm lifts the stitched T-shirt off the sewing machine.

"A single robot wouldn't perform all these tasks. It would be two or more robots along the assembly process," said Zornow. The system could work for most fabrics, with the exception of leather and waterproof materials that can't be drenched with the stiffening polymer.

Related: Toyota wants this baby robot to be your friend

Zornow has patents pending in 10 countries for the process to stiffen fabric. Although he's tested it with T-shirts, the next step is putting it to work in an garment factory that makes other types of clothing.

In order to do that, Zornow will soon be piloting the robotic sewing system with Bluewater Defense, which makes combat trousers for the U.S. military.

The company produces 8,000 pairs of pants a day, half of which are made in a Puerto Rican factory that employs 500 people tasked with sewing.

"It requires 64 [manufacturing] operations just to make a single combat trouser," said CEO Eric Spackey "If we can automate every 2 to 3 of those, it will make the process much more efficient."

"There's high demand for automation in this space not just in the U.S. but in India," said Zornow, who hopes to widely roll out his system in the next two years.

Automating sewing can be a gamechanger, especially as the industry strives to increase production while curbing costs.

Garment manufacturing is labor intensive, and labor costs can be as high as 40% of overhead. At the same time, manufacturers routinely struggle with workers taking unplanned days off, according to Spackey.

"The more people are involved, the higher is the risk of them getting sick or having to call out for family emergencies," said Spackey, adding that a doctor's appointment in Puerto Rico can take all day.

Automation could address these issues. "If we can automate production on the sewing side, I can see big robots in textile plants in the next five to 10 years," he said.

Related: Meet Luigi: MIT's sewer-scouring robot

Still, he's aware of the fact that this could result in lost manufacturing jobs.

"I'm very concerned about what automation means for jobs. But without technology, the industry will die," Spackey said. "Automation is happening in almost every industry. So it's incumbent upon us to start training and retraining workers for the next generation of tech-focused manufacturing jobs."