Design and sew garment patterns in 2D and 3D, following Marvelous Designer and CLO workflows.
Marvelous Designer کا اوپن سورس متبادل
Design and sew garment patterns in 2D and 3D, following Marvelous Designer and CLO workflows. Provides 2D polygon and Bezier drafting, linked 2D/3D sewing with partial and multi-edge seams, 3D arrangement and simulation, local project saving and recovery, static avatar imports and limited DXF/SVG pattern-outline imports.
READMEGitHub پر erythrofr/ClothCraft
Important ClothCraft development has moved to NicTanghe/ClothCraft. Please use that repository for updates, bug reports, and contributions.
An open-source garment editor and cloth simulation prototype, written in Rust.
Draw patterns, sew them together, place them around an avatar and simulate the result. Most work so far has gone into building a physics foundation that can handle difficult contact. The editor, interchange formats and material calibration need substantial work.
This is a research prototype, not a production garment tool. Expect unfinished interactions, residual oscillation, slow simulation on dense meshes and cases that still fail. Help is welcome with the interface, physics, testing, documentation and file formats. You do not need to be a programmer to contribute a useful reproduction, workflow sketch or testable hypothesis.
Install Rust stable and run from the repository root:
cargo run --release --locked -j 2 --bin cloth-fit -- --steps 0 --view
The editor opens a T-shirt and the bundled MakeHuman mannequin. Windows is the main development platform; macOS and Linux need equivalent acceptance testing. The desktop requires a graphics adapter supported by wgpu. CPU command-line tools build without graphics dependencies.
To reopen a saved garment:
cargo run --release --locked -j 2 --bin cloth-fit -- --project path/to/garment.json --steps 0 --view
Use Space to start or pause, Grab to pull the cloth and Ctrl+S to save. Grab exposes radius and strength above the 3D view; 3D gear → Clean view hides editing annotations. Right-click a canvas for the radial tool menu. Q opens nearby shape, mirror and boolean actions. The 2D board and 3D viewport share panel and boundary selections.
.assets folder together.cloth-template metrics command reports
rest-mesh area and cloth mass per panel and fabric. It is not cutting or
purchasing consumption; see units and limits.Select two boundaries in Sew, then confirm the nearby proposal; unequal lengths offer an explicit easing action. In Edit, box/lasso can select contour points across patterns for one group move; Delete removes selected pieces when no point, seam or text field owns the action. See editing and inspection controls.
These are implemented foundations, not completed production workflows. See the workspace guide, document and sewing guide and authoring reference for controls and limitations.
The interactive engine uses Vertex Block Descent (VBD) with Offset Geometric Contact (OGC). GPU execution is hybrid: candidate search and local solves run on the GPU, while precise contact geometry and movement bounds remain on the CPU. A double-precision Newton reference is also available.
Contact protections are designed to preserve separation from an initially separated arrangement, within the documented geometric assumptions and local seam exclusions. They do not repair arbitrary initial intersections or guarantee every possible garment. See the contact contract.
The main open problems are residual motion under tension, convergence, cost at fine mesh resolutions, friction, seam treatment and measured material calibration. Some test scenes run in real time; that does not establish a universal performance guarantee. Rendering FPS and simulation speed are different: a smooth viewport can show cloth progressing slower than wall time. Comparisons must report simulated seconds per wall second and full-step timings, alongside collision and deformation checks.
The headless solver lab contains experimental XPBD/OGC, finite-stiffness AVBD adaptations and a separate native Box3D particle lattice. Their failures are recorded; they are not alternative editor modes. Small contact research kernels are also not garment-ready solvers. No alternative has been selected to replace the current engine.
The long-term goal is interchangeable physics behind a stable document and authoring model. There is no public solver plugin ABI yet. A useful solver contribution must preserve collision coverage and fluid pull/release behavior, not just reduce a jitter number.
| Data | Input | Output |
|---|---|---|
| Editable garment | ClothCraft project / template JSON | Project / template JSON |
| Static avatar | OBJ, static glTF / GLB geometry | — |
| Simulated garment mesh | — | OBJ geometry and material-space UVs |
| 2D patterns | Selected closed outlines from generic planar ASCII DXF and physically scaled SVG subsets | Annotated SVG preview and millimetre-scale sewing outlines with a 100 mm ruler; no allowances or tiling |
| Research data | — | Metrics, fiber frames and geometric grain guides |
DXF-AAMA/ASTM, MTL round trips, glTF/GLB export, animated avatars, Alembic, USD, FBX, PDF printing and grading rules remain planned. CLO and Marvelous Designer project files are not supported. Save preserves the editable document; Export writes separate interchange artifacts. See the input/output contracts.
Contributing with an AI agent? Give it COORDINATION.md. This repository hosts the Rust rewrite task catalog and a shared assignment board for contributors. The EXO feature audit and atomic backlog identify gaps, existing PRs and acceptance checks. Agents claim scoped work and leave public handoffs; the coordinator detects overlapping assignments. It does not launch AI sessions or merge changes automatically.
Choose a track from the roadmap:
Start with CONTRIBUTING.md. The contributor kit includes task briefs, an issue checklist and prompts you can give a coding assistant. Agents should read AI_START_HERE.md and AGENTS.md before editing. Contributions need human review and the same evidence whether written by a person, an AI assistant or both.
cargo test --locked --no-default-features -j 2 -- --test-threads=2
cargo clippy --locked --no-default-features --all-targets -j 2 -- -D warnings
cargo build --locked -j 2
On Windows, scripts/check-cpu.ps1 runs the CPU checks. GPU tests and native window checks are opt-in; coordinate GPU use with the machine's owner. The headless physics lab and settling zoo provide reproducible fixtures without opening the editor.
| Area | Start here |
|---|---|
| Documents and editing | src/document.rs, src/fitting.rs, src/authoring.rs |
| Patterns, meshing and seams | src/garment/ |
| Desktop workspace | src/atelier/ |
| Material energy and reference solver | src/energy.rs, src/solver.rs |
| Interactive physics and contact | src/vbd.rs, src/ogc/, src/gpu_vbd.rs |
| Research adapters | src/solver_lab/, examples/solver_compare.rs |
The architecture, handoff and solver challenge explain the contracts and evidence.
Original source and documentation are MIT-licensed. The bundled MakeHuman assets retain their CC0 notice and provenance; dependencies retain their own licenses. The project icon is documented in the artwork record.
Some authoring and camera tools were adapted from FireflyTheReal / julienfoss's fork; the integration notes record provenance and fixes.
ClothCraft is independent of CLO, Marvelous Designer and ArtCraft. Public manuals inform workflow research; proprietary code, icons and garment examples are not included. The manual study records the references consulted.
GitHub سے آخری اپ ڈیٹ: 4 گھنٹے پہلے
GitHub کے اعداد دن میں چند بار تازہ کیے جاتے ہیں۔
لاگ اِن کریں یا اکاؤنٹ بنائیں تاکہ تبصرہ کر سکیں۔
ابھی کوئی تبصرہ نہیں۔ پہلا تبصرہ آپ کریں۔
فخر سے دکھائیں: آپ کے درجے اور ریٹنگ والا لائیو کارڈ، جو خود بخود اپ ڈیٹ ہوتا ہے۔
چھوٹا والا چاہیے؟ یہ شامل کریں: ?style=flat