This project uses git submodules, so clone with:
git clone --recurse-submodules https://github.com/dominikcondric/HairSimulation-OpenGL.git
Project contains a hair simulation written in C++/GLSL with minimal dependencies as part of an undergraduate thesis in Computer Graphics. Algorithm behind the hair simulation is called Follow The Leader, and it is closely related to the idea of simulating physics using Position Based Dynamics. All of the hair computation is done in GLSL compute shader to benefit from paralellism while working on individual strands. Illumination model used for hair shading is model proposed by Kajiya and Kay.
Enter - starts/stops simulation
Right mouse button - rotates camera according to mouse movement
W - moves camera in positive z direction of a scene camera
A - moves camera in negative x direction of a scene camera
S - moves camera in negative z direction of a scene camera
D - moves camera in positive x direction of a scene camera
Spacebar - moves camera in positive y direction of a scene camera
Left shift - moves camera in negative y direction of a scene camera
Arrows - control the current action
Numbers 0-6 - pick the action to control:
- 0 - light source movement
- 1 - hair movement
- 2 - hair rotation
- 3 - hair friction
- 4 - hair curliness
- 5 - hair strand count
- 6 - hair velocity damping