Coder Social home page Coder Social logo

starlab_physics's Introduction

XPBD Cloth Simulation

Environment

Ubuntu Python

Install

pip install -r requirements.txt

Current Features

  • XPBD

    • Constraints

      • Spring Constraints
      • Bending Constraints
      • Non-penetration Constraints
    • Solver

      • Jacobi
      • [WIP] Parallel Gauss-Seidel
  • Collision detection

    • Broad phase
      • Parallel AABB BVH Construction/Traversal
      • Spatial Hashing
    • Narrow phase
      • Vertex-Triangle
      • [WIP] Edge-Edge
  • Utilities

    • GUI for setting XPBD parameters in runtime
    • Vertex selection (for setting fixed)
    • Exporting simulated meshes

run demo

python main.py

demo_short

Frequently used keys

  • 'r' : reset simulation
  • ' ' : run/stop simulation

Changing the simulation mesh

The mesh data(i.e., *.obj) are in the "starlab_physics/models/OBJ" folder.

In "starlab_physics/Scenes/concat_test.py" file,

model_dir = str(model_path / "OBJ")
model_names = []
trans_list = []
scale_list = []

...

offsets = concat_mesh(concat_model_name, model_dir, model_names, trans_list, scale_list)

fill in ... with your mesh data, as follows:

model_names.append("your-obj-name.obj")
trans_list.append([x, y, z])
scale_list.append(size)

References

  1. Lauterbach, Christian, et al. "Fast BVH construction on GPUs." Computer Graphics Forum. Vol. 28. No. 2. Oxford, UK: Blackwell Publishing Ltd, 2009.
  2. Macklin, Miles, Matthias Müller, and Nuttapong Chentanez. "XPBD: position-based simulation of compliant constrained dynamics." Proceedings of the 9th International Conference on Motion in Games. 2016. 3Lauterbach, Christian, et al. "Fast BVH construction on GPUs." Computer Graphics Forum. Vol. 28. No. 2. Oxford, UK: Blackwell Publishing Ltd, 2009.

starlab_physics's People

Contributors

minh702 avatar gongpoman avatar svvj avatar rhth521 avatar

Stargazers

 avatar  avatar  avatar  avatar sanghoon avatar  avatar DAEUN avatar  avatar  avatar HuiSeong Lee avatar Lee, Dong Hyun avatar  avatar J. K. Lee avatar piicaterpillar avatar JaeHyun Lee avatar Rim avatar Joo Hwan Chae avatar Christopher Han avatar Donghan Kim avatar  avatar 정영훈 avatar Jaehyung Doh avatar  avatar dwha avatar  avatar God-eunger avatar JeongHyeon Ahn avatar  avatar anz avatar

Watchers

James Cloos avatar  avatar Abslon avatar anz avatar God-eunger avatar  avatar

starlab_physics's Issues

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.