GithubHelp home page GithubHelp logo

real-time-sph's Introduction

Check out the demo video!

Implementation of real-time smoothed-particle hydrodynamics (SPH) with screen-space rendering for my 6.837 (computer graphics) final project (from 2017). Uses a pipeline similar to Zhang, but for the GPU. SPH physics is based on Pirovano, uniform grid collision detection on Le Grand and screen-space rendering on Green.

Requires a CUDA-enabled GPU with compute capability 2.0 or higher and OpenGL 4.2 or higher. Currently only builds on Linux with cmake. Requires glm 0.9.9-a2. Only tested with CUDA 9.0, though it might work with older versions. Simulates 3000 particles at about 300 fps on a NVIDIA GeForce GT 750M.

More information provided in the writeup.

Usage:

  • Escape quits the program.
  • Mouse moves the camera direction.
  • WASD/Shift/Space moves the camera position.
  • E frees the mouse from the window.
  • Period ('.') pauses/unpauses the simulation.
  • Comma (',') pauses/unpauses the box rotation.
  • V makes the box rotate quickly.
  • B makes the box rotate slowly.
  • G resets the box rotation velocity.
  • Z changes the smoothing mode.
  • X shows the depth map.
  • C disables rendering.
  • R and T changes the Z threshold for particle rendering.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.