Python simulation of clothing model from a basic 2D pattern using and a dynamic avatar from an .obj file. Models tensile forces, gravity, collisions and sewing constraints. Runs a PyQT5 GUI for display or can render the result of each frame.
Simulation runs at approximately: 200 frames per second on a NVIDIA GeForce RTX 4050 Laptop GPU.
- Fix unwanted movement added to the system when position based contraints interact with forces
Remove velocity and acceleration in plane collision and/or gravityTry applying Coulomb friction on collision- Try RMS prop and momentum for dynamic friction change, apply friction to acceleration
- Add zooming and panning to QT widget display
- Added ability to view and edit material properties
- Add controls to tweak physics parameters live
- Optimize the set-up of clothing and simulation/make a loading animation
- Add a shader that displays normal as a color and kernels that display properties such as stress, energy, shear and bend
- Add a pause update button and forward one frame button
- This project requires a machine with an nvidia GPU to run (tested with Cuda 12.8)
- Install a Visual Studio (Desktop development with C++) to get cl. You may need to add cl to path. Running cl in the command line should give:
usage: cl [ option... ] filename... [ /link linkoption... ]
Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34810 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
- Install the Cuda framework. The version of cuda must be the one that corresponds with the compiler version.
- Download and install pycuda (clone the repo and run pip install . in the path). The following flag must be turned on in setup.py
Switch("CUDA_ENABLE_GL", True, "Enable CUDA GL interoperability")
- Install the other requirements in requirements.txt in a Python enviornment.
- You will need to allow python to use GPU acceleration for rendering.
NVIDIA Control Panel → Manage 3D settings → Program Settings → Add python.exe → set "Preferred graphics processor" = High-performance NVIDIA processor