GithubHelp home page GithubHelp logo

bcrusco / paanipuri Goto Github PK

View Code? Open in Web Editor NEW

This project forked from debanshusingh/paanipuri

2.0 2.0 0.0 248.32 MB

CMake 0.74% C++ 45.47% C 8.21% Shell 0.69% XSLT 0.01% Groff 0.01% HTML 41.31% Inno Setup 0.02% Batchfile 0.06% C# 1.86% Smalltalk 0.01% Pascal 0.03% Python 0.47% Java 0.78% Objective-C 0.08% Objective-C++ 0.08% Makefile 0.17% Smarty 0.01% UnrealScript 0.01% GLSL 0.02%

paanipuri's Introduction

#paanipuri Based on - Miles Macklin, Matthias Müller: Unified Particle Physics for Real-Time Applications, SIGGRAPH 2014

CIS 563 Project - debanshu singh, sanchit garg & bradley crusco

=============== Work Breakdown

  • GLUT (660)-> GLFW OpenGL visualization
  • Create constraint classes - density & shape
  • Multiple Density (paper 1 - Unified Particle Physics for Real-Time Applications [section 7 & 7.1, before 7.2])
  • Density Constraint (paper 2 - Position Based Fluids, [section 3])
  • Shape Constraint (paper 1 - Unified Particle Physics for Real-Time Applications [section 5, before 5.1])
  • Shape Matching (paper 2 - Meshless deformations based on shape matching [section 3.3])
  • TBB Parallelization
  • Collisions - Particle Particle (method - spatial hash grid to find nearest neighbours)
  • Collisions - Particle Mesh (method - compare signed distance of predicted & current position to determine collision)
  • Fluid-Solid Coupling - Buoyancy & Sinking (method - solved both density & shape matching constraints for solids)
  • User Input - Fluid & Solids (see Usage for key commands)
  • Scene Setup - Fluid-Solid coupling & Cereal shot

More Explanation is at the end of this document

============== External Code

  • paani - 660 project position based fluids (single density) (by sanchit & debanshu)
  • learnopengl.com - opengl blinn phong shader & compilation

===================== External Dependencies

  • assimp - Open asset import library
  • SOIL - simple opengl image library
  • TBB
  • GLFW

===== Usage

  • OSX - paanipuri.xcodeproj

  • Windows - Paanipuri_Windows.sln

  • Keyboard Controls -

  • q - quit
  • 1 - Fluid (high density)
  • 2 - Fluid (low density)
  • 3 - Sphere
  • 4 - Cube
  • 5 - Fluid Pipe (high density)
  • 6 - Fluid Pipe (low density)
  • WASD - camera movement
  • mouse movement - yaw & pitch

====== Method

  • Create constraint classes - density & shape We changed our pbf code from particle-centric to constraint-centric. Our constraints have a Solve() method to change the deltaPi depending on constraint type (density/shape)

  • Multiple Density (paper 1 - Unified Particle Physics for Real-Time Applications [section 7 & 7.1, before 7.2]) We changed the density constraint formulation from our earlier position based fluids work to a mass-weighted version. This enabled simulation of fluids with different densities.

  • Shape Matching (paper 2 - Mesh-less deformations based on shape matching [section 3.3]) We implemented rigid shape-matching constraints to maintain rest-pose configuration of rigid bodies. During simulation particles are displaced by all constraints acting on them. The shape-matching constraint allows the rigid-body to then maintain its rest-pose shape. Shape matching acts like a rigid body simulator by respecting the inertial properties of the solid.

  • TBB Parallelization We have parallelized all the steps of the simulation that were independent

  • Fluid-Solid Coupling - Buoyancy & Sinking (method - solved both density & shape matching constraints for solids) We implemented fluid-solid coupling by allowing rigid bodies to solve both density and shape-matching constraints. Solving density constraints forced the particles of the rigid body to behave like fluids of different density allowing them to rise up (as their mass is less), while the shape-matching constraint forced them to maintain the rigid body rest pose.

  • Collisions - Particle Particle (method - spatial hash grid to find nearest neighbours of different phase) We extend our spatial hash grid to find neighboring particles of different phase Example - Fluid-Solid will collide. Solid-Solid will collide. Fluid-Fluid will not collide (this is because fluid separation is taken care of automatically by density constraints)

  • Collisions - Particle Mesh (method - compare signed distance of predicted & current position to determine collision) We use Assimp to load an obj mesh (glass bowl - we had to be careful of scale). We embed the object into a spatial hash grid to find the cells where mesh boundary is present. If a particle is in that cell, we check for collision with triangles in that cell using signed distance checking.

paanipuri's People

Contributors

bcrusco avatar debanshusingh avatar sanchitgarg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.