Developed in C++ and OpenGL, this real-time simulation employs a Mass-Spring System approach for realistic cloth dynamics, inspired by the paper "Fast Simulation of Mass-Spring Systems" by Liu et al. Alongside this, the project leverages OpenMP and OpenCL for efficient parallelization and integrates advanced rendering techniques such as Physically-Based Rendering (PBR) and Image-Based Lighting (IBL) to enhance the visual realism of the simulated cloth, and an HDR skybox for a dynamic, immersive sky.
- Powered by OpenGL, the project offers advanced graphics rendering capabilities.
- Utilized Physically-Based Rendering (PBR) techniques for lifelike shading and materials, resulting in realistic interactions of light and shadow on the cloth.
- Enhanced visual fidelity with Image-Based Lighting, providing accurate reflections and illumination.
- Shadow Mapping for dynamic, realistic shadows, enhancing the 3D appearance of the cloth.
- Fog Rendering adds atmospheric depth, contributing to the scene's realism.
- HDR Skyboxes create immersive and dynamic backgrounds, augmenting the overall visual experience.
- Implemented a Mass-Spring System algorithm, inspired by the "Fast Simulation of Mass-Spring Systems" paper, for fast and accurate simulation of cloth physics.
- Integrated OpenMP for efficient parallelization of cloth physics computations, significantly improving performance.
- Utilized OpenCL for parallelization of collision detection and collision handling algorithms.
- Offers customizable parameters such as stiffness, damping, and mass, enabling diverse cloth behaviors and properties.
- Realistic collision detection and response ensure accurate interactions between the cloth and other objects.
- An HDR Skybox is used for a dynamic and immersive sky.
- Atmospheric fog effects are implemented, adding depth and a captivating ambiance to the scene.
- Real-time lighting effects, including adjustable light positions and intensities, enhance the realism of the cloth simulation.
This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Read the full license here.
- Clone the repository:
git clone https://github.com/AmrHMorsy/cloth_simulation-.git
- Navigate to the project directory:
cd Cloth_Simulation
- Create a build directory:
mkdir build
- Navigate to the build directory:
cd build
- Generate makefiles using cmake:
cmake ../
- compile using makefile:
make
- Run the program:
./cloth_simulation