Skip to content

Hengle/UnityMPM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityMPM

Introduction

This is an Unity implementation of MPM(Material Point Method). There is no straight forward implantation of MPM in Unity so far. Other implementations usually skip/optimize steps of original mpm too much, which makes them difficult to understand at first time. They are also coded in c++/python. nialltl's implementation is a very good MPM tutorial, but he only implements MLSMPM without snow.

This repository starts from APIC framework, then try to follow original mpm/mpm course and match each step in the course. Then move to MLSMPM. It also contains 3D implementation on CPU/GPU.

It is under development and needs optimization and parameter tuning.

Screenshots are taken on Surface book 2 with GTX1060

(First play may be lagging in fps due to large gif downloading)

APIC

In APIC folder, there are CPU/GPU 2D/3D implementations of APIC framework(no fluid).

  • White squares are particles.
  • Red spheres are cell mass/velocity that transferred from particles.

MPM

In MPM folder, there are CPU/GPU 2D/3D implementations of MPM. It matches every step of original mpm course/paper. So it may be slow for real time.

MPMCPU implements "weakly" compressed fluid, snow and elastic material.

MPMGPU speeds up a bit.

MLSMPM

Implementation of A Moving Least Squares Material Point Method with Displacement Discontinuity and Two-Way Rigid Body Coupling

  • Elastic

  • Snow

  • Fluid

There is also a 3D version

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 72.4%
  • HLSL 16.1%
  • ShaderLab 11.5%