Coder Social home page Coder Social logo

acg's Introduction

Adversarr's Computer Graphics toolbox

CodeFactor

NOTE: This project is highly expremental.

ACG is a toolbox designed for study use mainly about Physical Simulation, but not Rendering.

Why yet another Computer Graphics Tool?

Although we have seen a huge number of libraries designed for CG, (and in many areas):

  1. libigl: designed for geometry processing, the header-only coding style just leads to long compile time. The types of objects that igl-viewer can render is limitted.
  2. Taichi: GPU-based Parallel computing library, designed for Physical Simulation. Taichi is originally a community-driven project, and lacks Debugger support, and exception support.

On my macbook with Apple's Silicon, Taichi's crash will leads to OS's crash.

Project Structure

  1. Core:

    1. General Utilities:

      1. log: based on SPDLOG
      2. god: a meta programming library for Compile Time Computing
      3. json: import nlohmann json.
      4. lots of tiny staff: such as Result<T>, unified & cross-platform time module, etc.
    2. Init: Hookers for global variables designed for shared/static libraries.

    3. Mathematics Tools: Import Eigen, and defines some types, such as Field, TriangleList.

    4. Parallel computing tools: Import Taskflow

    5. SAD(Static Auto Diff): a high performance and highly optimized compile-time AutoDiff Library.

    6. โ€ฆ

  2. Gui:

    • (Finished) Scene visualization: Support Mesh(including instancing), Particles, and Wireframe.
    • (Finished) ImGUI & Vulkan based. high performance
    • (Finished) ImGUI based User Interface, and User Callback.
    • (Finished) Perspective/Ortho projection modes. (for 2D data-visualization, similar to Unity2d's design.)
    • Scene Editing/Storaging/...
  3. Port: Data import module.

  4. Plugins (not implemented)

    • libigl/cgal/... integration.
  5. Examples, see below.

Examples

This repo is designed for study use. Some implemented (just demos, not optimized, debugged) algorithms are listed below:

mass_spring

mass-spring system based on Projective Dynamics. Refer to "Fast mass spring" by Tiantian Liu.

image-20230224132002368

and this provides an bonus solver, which applies a single step of Jacobi method on PD, which leads to real-time simulation of traditional mass-spring at about 30fps (on my laptop).

Now, mass spring will also show the dynamic computed grid (SubdivisonAABB) for further Broad Phase CCD app.

image-20230302185942678

fem-implicit

Quasi Newton solver, the algorithm is same as example "hybred" below.

hybred

Quasi newton based solver for both cloth and softbody solve. (Implicit Euler)

  • Left: Mass Spring
  • Right: Ogden Neo-Hookean

image-20230329134931068

![with tracing](./media/with tracing.png)

Other Stuffs

  1. fem-implicit: first-order explicit integrator. NeoHookean or StVK FEM Soft Body Simulation.
  2. mpm-explicit: APIC-Fluid simulation, toy P2G and G2P process, weakly-compressible.

acg's People

Contributors

adversarr avatar

Stargazers

 avatar Mousab Ismail avatar paddywz avatar Zoishin avatar  avatar Wenbo Chen 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.