Giter Site home page Giter Site logo

markyparky56 / dualmc-compute Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 57 KB

Testbed for evaluating and refining a compute shader version of the Dual Marching Cubes algo

License: Other

C++ 69.88% C 30.12%
dual-marching-cubes glm isosurface-extraction

dualmc-compute's Introduction

dualmc-compute

Testbed for evaluating and refining a compute shader version of the Dual Marching Cubes algo

Based on the implementation from dominikwodniok (BSD 3-clause)

Features

  • Optimised packing of volume data and LUTs in shorts and bytes
  • 6-bit Morton encoding to improve neighbourhood lookups
  • Per-face normals

Does not currently support per-vertex normals (could be generated off GPU)
Does not currently support vertex indexing (could be generated off GPU with meshoptimizer?)

Status

Functional! ๐ŸŽ‰

Program will execute for a single 36x36x36 volume, outputting the generated triangles, normals, and faces to a .obj for inspection

Triangle output buffer array is a bit oversized, have yet to investigate realistic upper-bound. Theoretical worst case is 34*34*34*18 (707472) triangles if it were somehow to generate the maximum number of triangles for every cell, which I'm certain is impossible.

Could maybe trim off some bytes from the Volume Data buffer array as well. Morton Codes can lead to some gaps in the array so even though we're generating a 36x36x36 volume, we need to work with the 6-bit encoding in mind. 6-bit means indices [0..64) could pop out. I'll get around to generating the actual highest-used index for our volume space next, since I'm certain we don't need 1MiB per volume.

Cloning

Repo contains submodules. Remember to clone recursively!

git clone --recursive https://github.com/Markyparky56/dualmc-compute.git

or

git clone https://github.com/Markyparky56/dualmc-compute.git
cd dualmc-compute
git submodule update --init --recursive

dualmc-compute's People

Contributors

markyparky56 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.