All Projects → mkeeter → Mpr

mkeeter / Mpr

Reference implementation for "Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces" (SIGGRAPH 2020)

Projects that are alternatives of or similar to Mpr

Open3d
Open3D: A Modern Library for 3D Data Processing
Stars: ✭ 5,860 (+6876.19%)
Mutual labels:  rendering, gpu, cuda
LuisaRender
High-Performance Multiple-Backend Renderer Based on LuisaCompute
Stars: ✭ 47 (-44.05%)
Mutual labels:  gpu, rendering, cuda
tiny-cuda-nn
Lightning fast & tiny C++/CUDA neural network framework
Stars: ✭ 908 (+980.95%)
Mutual labels:  gpu, rendering, cuda
Lighthouse2
Lighthouse 2 framework for real-time ray tracing
Stars: ✭ 542 (+545.24%)
Mutual labels:  rendering, gpu, cuda
Nvidia libs test
Tests and benchmarks for cudnn (and in the future, other nvidia libraries)
Stars: ✭ 36 (-57.14%)
Mutual labels:  gpu, cuda
Cuda
Experiments with CUDA and Rust
Stars: ✭ 31 (-63.1%)
Mutual labels:  gpu, cuda
Qualia2.0
Qualia is a deep learning framework deeply integrated with automatic differentiation and dynamic graphing with CUDA acceleration. Qualia was built from scratch.
Stars: ✭ 41 (-51.19%)
Mutual labels:  gpu, cuda
Optix Path Tracer
OptiX Path Tracer
Stars: ✭ 60 (-28.57%)
Mutual labels:  gpu, cuda
Neanderthal
Fast Clojure Matrix Library
Stars: ✭ 927 (+1003.57%)
Mutual labels:  gpu, cuda
Carlsim3
CARLsim is an efficient, easy-to-use, GPU-accelerated software framework for simulating large-scale spiking neural network (SNN) models with a high degree of biological detail.
Stars: ✭ 52 (-38.1%)
Mutual labels:  gpu, cuda
Pycuda
CUDA integration for Python, plus shiny features
Stars: ✭ 1,112 (+1223.81%)
Mutual labels:  gpu, cuda
Metalpetal
A GPU accelerated image and video processing framework built on Metal.
Stars: ✭ 907 (+979.76%)
Mutual labels:  rendering, gpu
Cub
Cooperative primitives for CUDA C++.
Stars: ✭ 883 (+951.19%)
Mutual labels:  gpu, cuda
Soul Engine
Physically based renderer and simulation engine for real-time applications.
Stars: ✭ 37 (-55.95%)
Mutual labels:  rendering, cuda
Graphvite
GraphVite: A General and High-performance Graph Embedding System
Stars: ✭ 865 (+929.76%)
Mutual labels:  gpu, cuda
Heteroflow
Concurrent CPU-GPU Programming using Task Models
Stars: ✭ 57 (-32.14%)
Mutual labels:  gpu, cuda
Arboretum
Gradient Boosting powered by GPU(NVIDIA CUDA)
Stars: ✭ 64 (-23.81%)
Mutual labels:  gpu, cuda
Ggnn
GGNN: State of the Art Graph-based GPU Nearest Neighbor Search
Stars: ✭ 63 (-25%)
Mutual labels:  gpu, cuda
Parenchyma
An extensible HPC framework for CUDA, OpenCL and native CPU.
Stars: ✭ 71 (-15.48%)
Mutual labels:  gpu, cuda
Aardvark.rendering
The dependency-aware, high-performance aardvark rendering engine. This repo is part of aardvark - an open-source platform for visual computing, real-time graphics and visualization.
Stars: ✭ 79 (-5.95%)
Mutual labels:  rendering, gpu

mpr

This is the reference implementation for Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces, a technical paper which will be presented (virtually) at SIGGRAPH 2020.

Paper PDF (preprint, 4.6 MB)

Citation

@article {keeter2020,
    author  = {Keeter, Matthew J.},
    title   = {Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces},
    journal = {{ACM} Transactions on Graphics (Proceedings of SIGGRAPH)},
    year    = "2020",
    volume  = "39",
    number  = "4",
    month   = "jul",
}

Major components

This code builds on libfive, which is included as a submodule.

mpr::Tape

The Tape constructor takes a libfive::Tree object, flattens it, assigns slots, and packs it into a set of uint64_t clauses in GPU RAM.

This is described in Section 2 of the paper.

mpr::Context

The Context class is responsible for actually rendering tapes on the GPU. In particular, Context::render2D implements Alg. 3 from the paper, and Context::render3D implements the 3D rendering discussed in Section 4.2

The eval_tiles_i kernel in context.cu implements Algorithms 1 and 2 from the paper.

mpr::Effects

This struct applies various post-processing effects on images rendered by a Context. Effects are limited to shading and screen-space ambient occlusion (SSAO).

This part of the code isn't as well tuned as the rest, because it's not a core part of the algorithm.

GUI

The GUI is an extremely basic tool for testing out the implementation.

Screenshot

It is based on Dear ImGui and uses ImGuiColorTextEdit as a text editor.

Reproducing our results on AWS

You can reproduce the results in the paper for about $5 on AWS!

First, make sure that your AWS account has permission to create a p3.2xlarge instance. New accounts don't, so I had to email support and ask for an increase in my vCPU limits.

Keep in mind, this instance costs $3.06/hour, so you'll want to be very careful about turning it off when not benchmarking; leaving it on for a month will cost you a cool $2276.

Once you've gotten permission to create the instance, spin up an server with the latest version of Deep Learning Base AMI (Ubuntu 18.04). I used Version 21.0 (ami-0b98d7f73c7d1bb71), but you should use the most recent release.

SSH into the server and run a bunch of commands:

# Install dependencies
sudo apt install mesa-common-dev ninja-build

# Install a recent version of eigen
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz
tar -zxvf eigen-3.3.7.tar.gz
cd eigen-3.3.7
mkdir build
cd build
cmake ..
sudo make install

# Install `mpr`
cd
git clone [email protected]:mkeeter/mpr
cd mpr
git submodule update --init --recursive
mkdir build
cd build
cmake -GNinja -DBIG_SERVER=ON ..
ninja

At this point, you can reproduce the benchmarks in the paper by running ../run_benchmarks.sh (from the build directory). This will print a bunch of performance values, starting with

============================================================
                      2D benchmarks
============================================================
Text benchmark
256 5.29331 0.261052
512 4.21138 0.00523862
1024 3.85596 0.00625019
...

The three columns are size, frame time (in milliseconds), and standard deviation.

The benchmarking script will save the output images into a subfolder for each model:

prospero
gears_2d
architecture
gears_3d
bear

Remember to turn off the server when you're done.

Building on MacOS

Install Homebrew and CUDA, then run something like

brew install cmake pkg-config eigen libpng qt guile boost ninja
git clone [email protected]:mkeeter/mpr
cd mpr
git submodule update --init --recursive
mkdir build
cd build
env CUDACXX=/usr/local/cuda/bin/nvcc cmake -GNinja ..
ninja

License

(c) 2019-2020 Matthew Keeter

This code is licensed with a similar strategy as libfive itself:

  • The mpr library is released under the Mozilla Public License, version 2. This is a weak copyleft license which allows you to use the code in your own work (including commercially) as long as changes to mpr itself are released.
  • The demo GUI is licensed under the GNU General Public License, version 2 or later, because it uses the libfive-guile Scheme bindings (which are themselves released under the GPL).

Disclaimer

This is research code, without institutional or commercial backing.

I'll provide best-effort support for running on AWS in the configuration described above.

Otherwise, if you encounter issues, please consider debugging independently and opening a PR with your fixes; I can't guarantee that I'll address your issues myself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].