A procedural mesh corrugator in C++ to generate corrugated vertices given a mesh for cloth simulation. This software is used as a module in a PBD cloth simulator for realistic knitted clothes simulation. It is part of the paper titled A Procedural Approach For Cloth Simulation*, authored by Wei Guo, Yihao Wang and Kai Zhang.
Author: Wei Guo wei.parker.guo.sg@gmail.com
Date of Initiation: 11/29/2020
*The paper discussed here is under publication. A link will be provided for full text when it's officially published.
This is a platform independent cmake project. The executables are built using Visual Studio on the author's machine for Windows in 64 bits.
An input image is required for the corrugator to procedurally generate patterns that are similar to it. It should represent the knitting pattern of desired cloth material, with white pixels indicating space and black indicating cloth fiber. The image could be either png or jpeg. You will be prompted in the console to supply this image's path.
Note: The image supplied will be read as a bitmap with color channels ignored. Color with brightness below 128/255 is considered black, white if above this value. It should be relatively small since the algorithms process cells on a pixel basis, with a recommended size of below 128 x 128.
You will be prompted by the console to input the desired image diemension. Regardless of the original size, the generator will try to tile the entire bitmap with resonable patterns based on WFC. The format will be jpg with a compression rate of 90 in full color.
Most of the codes in this implementation are referenced with inline comments. Some individual modules are referenced here.