Skip to content

fluid simulation with position based fluids and screen space rendering

Notifications You must be signed in to change notification settings

jianjianh1/pbf-opengl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Position Based Fluids and Screen Space Fluid Rendering

A fluid simulation system based on Position Based Fluids and screen space rendering technique built from scratch with OpenGL.

Demo

Final Rendering

Particle Only 1

Particle Only 2

Build

Dependencies

  • GLM: already included in this repository
  • stb_image: already included in this repository
  • GLFW: needed to be installed; e.g., from the official website. The CMakeLists.txt should be able to find the library after installation
  • Windows/Linux: macOS doesn't support the latest OpenGL including compute shader

Build Script

Linux

The project's build system is cmake. To build the project, run the following shell command:

cmake -S . -B build
cd build
cmake --build .

After executing the commands, you be able to find executable main

Windows

You can use the same commands as above if you've activated Visual Studio environment in your terminal.

Alternatively, simply open the repository in Visual Studio and build it as usual.

Run

Run the executable main or main.exe built as above.

Control

  • Arrow keys: control the boundary of the fluid
  • R key: reset the fluid
  • mouse drag: control the camera

Reference

About

fluid simulation with position based fluids and screen space rendering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published