Giter Club home page Giter Club logo

clothdemo's Introduction

Awesome cloth simulation

ClothDemo

An interactive, physically-based cloth demo in C++ using OpenGL, GLUT, GLEW, and CMake

This is a demo of physically-based cloth using techniques described by Thomas Jakobsen in Advanced Character Physics, GDC 2001. It uses Verlet integration and multiple iterations of constraint satisfaction, with Rod, Slider, and Point constraints, and collision with moving objects. https://www.gpgstudy.com/gpgiki/GDC_2001:_Advanced_Character_Physics

I've only built this on Windows on Visual Studio 2019 lately. Hopefully Linux will just work.

This core code was originally written by fellow grad students at UNC Chapel Hill in 2001 or 2002. Probably Paul Rademacher or Mark Harris, but I'm not sure. I've had it squirreled away for the last twenty years and decided to get it working yesterday as part of another project.

I've improved the code enormously, fixing several bugs, adding new modes, adding a working AABB collision object, improving the graphics quite a bit, and increasing all of the constants to levels suitable for 60 fps on my machine, a 2021 Dell XPS 17 with an Nvidia RTX 3060.

I've parallelized the code on the CPU simply by using std::for_each(std::execution::par_unseq, ...). Parallelizing the constraint computation makes a big difference.

Builds for me using CMake 3.20, Visual Studio 2019, freeglut-3.2.2, glew-2.2.0.

This also depends on my DMcTools library. This is my graphics tools that I've been using and evolving for the last 25+ years. Grab it from https://github.com/davemc0/DMcTools.git and place DMcTools/ in a directory adjacent to ClothDemo/.

Awesome cloth simulation

clothdemo's People

Contributors

davemc0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.