A real-time particle collision simulation using Signed Distance Fields (SDF) and OpenGL rendering.
This project simulates particle collision with 3D mesh objects using SDF for efficient collision detection. Particles bounce around in a bounded box environment and interact with loaded mesh geometry.
- SDF generation from 3D mesh files (.obj format)
- Real-time particle physics simulation
- OpenGL-based 3D rendering
- BVH (Bounding Volume Hierarchy) optimization for performance
- Interactive collision detection
- Place your .obj mesh file in the
data/directory asstanford-bunny.obj - Build and run the simulation
# Build the project
mkdir build && cd build
cmake ..
make
# Run simulation with default resolution (64x64x64)
./sdf_simulation
# Run with custom SDF resolution
./sdf_simulation 128src/- Source code filessdf.*- Signed Distance Field generation and samplingparticle.*- Particle system implementationsimulation.*- Physics simulation looprenderer.*- OpenGL rendering systemmesh.*- 3D mesh loading and processingbvh.*- Bounding Volume Hierarchy for optimization
data/- Place your mesh files here (requiresstanford-bunny.obj)build/- Build output directory
- ESC: Exit
- Mouse: Rotate camera
