Git Product home page Git Product logo

bru-12's Introduction

BRU-12 Screenshot

BRU-12

An experimental Cinder + OpenVDB toolchain for doing realtime volumetric processing. Research project.

OpenVDB is an industrial-grade data structure used for parallel processing of very large amounts of volumetric ("voxel") data. It's not really intended to be used for real-time rendering, but its design (and performance!) was interesting to me so I decided to try to implement a simple data pipeline on top of it. Modern real-time graphics are quite often "slaves" to the internal data structure used to represent geometry โ€“ the mesh. I wanted to try a different approach.

This repo contains a working Cinder app (developed on macOS w/ Xcode) which implements a queue-based pipeline on top of a couple of very generic base classes (see Queue.hpp, Stage.hpp, StageProcessor.hpp). Each step in the pipeline performs a well-defined, encapsulated operation based on immutable input data read from the input queue, and then puts the result onto the output queue.

Currently the Muncher stage performs a predetermined number of randomized volumetric addition operations on the OpenVDB tree, followed by randomized subtraction operations on it. Then the Decay stage takes the modified tree and decays it at each iteration step, gnawing away at the volume from below.

For a glimpse of the potential this pipelined approach has, check out this GIF:

BRU-12 Screenshot 1

(This is commit 4cb28d5d43caf5b977c6d2ed1d5d1c14e92060d6.)

The pipelined processing for this volumetric cube was running on just one thread, and yet it was able to achieve realtime rendering fidelity. Admittedly, the tree resolution was not that big, but this approach has lots of potential if one were to partition the OpenVDB tree, apply operations to it in parallel, and then merge the results back into one tree again before it's passed to the meshing stage. I moved on to another project before implementing this, c'est la vie.

License

Feel free to use the code however you wish. If I'm ever to return to it at some point, I'd rewrite it in Rust. It is the future.

Screenshots

BRU-12 Screenshot 1 BRU-12 Screenshot 2 BRU-12 Screenshot 3 BRU-12 Screenshot 4 BRU-12 Screenshot 5 BRU-12 Screenshot 6

bru-12's People

Contributors

vl4dimir avatar

Stargazers

 avatar  avatar  avatar

Watchers

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