A research team at Cornell University has come up with a method to simulate knitted fabrics. Beyond visualizing the fabric with stitch-level accuracy, the application also fits the virtual garments around 3D forms. It does this by stretching and relaxing the stitches according to the shape they envelop. Cornell’s Chronicle Online shared the project in an article last week.
3D artists are familiar with the task of dressing animated characters, but the process is not conducive to working with knitted designs. Typically, a thin sheet with an added texture will represent the character’s garment. This allows for a quick representation of clothing, but does not carry enough detail to simulate knit fabrics.
This problem led a number of computer scientists to tackle the issue. Jonathan Kaldor of Facebook, Cem Yuskel from the University of Utah along with Steve Marschner and Doug James of Cornell, developed an application that essentially taught a computer how to knit.
Knitting involves stitches and rows. An individual stitch is created by pulling yarn through a loop. After a single row of stitches formed, a new row can be created by hooking into the previous row’s loops. Without an application, a 3D artist would have to assemble a knitted garment stitch by stitch.
The research team’s solution was to model a single stitch and combine copies into a mesh. This mesh was then placed on a 3D model, where the application would stretch and relax the stitches according to the shape they enveloped.
Marschner explained how the program shaped the individual garments: “We are actually changing the shape of the yarn loops that make up the stitches… simulating how they wrap around other loops.”
He also mentioned that modeling the loops was sometimes challenging. If two loops inadvertently crossed over each other, the application would create a dropped stitch, similar to manual knitting.
Modeling and rendering an individual garment requires a fair amount of compute resources. Speaking to HPCwire, Marschner said that yarn-level simulations were run on a single 8- or 16-core server, with final renders running on multiple servers within a cluster. “The methods are all parallel at that level, but the system currently is not running on a large cluster,” he noted.
Using the hardware mentioned, the simulation requires hours of compute time for a single garment. Currently, simulating knitted garments is not feasible for interactive uses like in games or virtual environments. However, the application could be used in movies, where a video artist could send the work to a render farm and let it run overnight.