Giter Club home page Giter Club logo

unity_burst_shape_matching's Introduction

Burst Softbodies - Parallelised Shape-Matching

This is a commented implementation of the paper Meshless Deformations Based on Shape Matching in Unity, using the C# Job System and Burst compiler available in Unity 2018.1 onwards. It also uses GPU based indirect drawing, to speedily visualise points pulling from a texture. It can handle several hundred thousand particles in under 16ms (machine-dependent!).

gif

Implementation

  • I'm using a Position Based Dynamics integration scheme, kind of arbitrarily -- as a result the system's stiffness is iteration-dependent but generally quite friendly to deal with, and suffers from some inherent motion damping.
  • Particles are processed in parallel using the job system. Additionally, steps of the algorithm requiring linear summations have been partially parallelised by splitting sums into batches.
  • This implementation includes support for linear deformation, extending the range of possible motion (stretch and shear). Support for twisting and bending would require the quadratic extension, detailed in the original paper.
  • I've only tested this in Unity 2018.2.0f1! I hope it works for you too!!

Misc notes

  • I tried using IJobParallelForBatch to perform the center-of-mass and shape matrix summations, but couldn't quite get this working. Maybe you can?
  • There's a little bit of drift occuring when performing the parallel center-of-mass summation which doesn't occur in the linear equivalent. I think this is due to floating point precision, but is maybe worth investigating.
  • This project is under an MIT license, feel free to do whatever you like with it -- let me know if you make anything cool! x

unity_burst_shape_matching's People

Contributors

nialltl avatar

Watchers

James Cloos 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.