RXMesh - A GPU Mesh Data Structure - SIGGRAPH 2021

Overview

RXMesh Ubuntu Windows


About

RXMesh is a surface triangle mesh data structure and programming model for processing static meshes on the GPU. RXMesh aims at provides a high-performance, generic, and compact data structure that can handle meshes regardless of their quality (e.g., non-manifold). The programming model helps to hide the complexity of the data structure and provides an intuitive access model for different use cases. For more details, please check out our paper:

RXMesh: A GPU Mesh Data Structure
Ahmed H. Mahmoud, Serban D. Porumbescu, and John D. Owens
ACM Transaction on Graphics (Proceedings of SIGGRAPH 2021)

This repository provides 1) source code to reproduce the results presented in the paper (git tag v0.1.0) and 2) ongoing development of RXMesh. For 1), all input models used in the paper can be found here. Models were collected from Thingi10K and Smithsonian 3D repository.

A Quick Glance

RXMesh is a CUDA/C++ header-only library. All unit tests are under tests/ folder. This includes the unit test for some basic functionalities along with the unit test for the query operations. All applications are under apps/ folder.

Compilation

The code can be compiled on Ubuntu (GCC 9) and Windows (Visual Studio 2019) providing that CUDA (>=11.1.0) is installed. To run the executable(s), an NVIDIA GPU should be installed on the machine.

Dependencies

  • OpenMesh to verify the applications against reference CPU implementation
  • RapidJson to report the results in JSON file(s)
  • GoogleTest for unit tests
  • spdlog for logging

All the dependencies are installed automatically! To compile the code:

> git clone https://github.com/owensgroup/RXMesh.git
> cd RXMesh
> mkdir build 
> cd build 
> cmake ../

Depending on the system, this will generate either a .sln project on Windows or a make file for a Linux system.

Replicability

This repo was awarded the replicability stamp by the Graphics Replicability Stamp Initiative (GRSI).

The scripts used to generate the data shown in the paper can be found under

Each script should be run from the script's containing directory after compiling the code in build/ directory. The only input parameter needed is the path to the input OBJ files. The resulting JSON files will be written to output/ directory.

Bibtex

@article{Mahmoud:2021:RAG,
  author = {Mahmoud, Ahmed H. and Porumbescu, Serban D. and Owens, John D.},
  title = {{RXM}esh: A {GPU} Mesh Data Structure},
  journal = {ACM Transactions on Graphics},
  year = 2021,
  volume = 40,
  number = 4,
  month = aug,
  issue_date = {August 2021},
  articleno = 104,
  numpages = 16,
  pages = {104:1--104:16},
  url = {https://escholarship.org/uc/item/8r5848vp},
  full_talk = {https://youtu.be/Se_cNAol4hY},
  short_talk = {https://youtu.be/V_SHMXnCVws},
  doi = {10.1145/3450626.3459748}
}
Issues
  • How to access multiple relations within one kernel?

    How to access multiple relations within one kernel?

    Hi,

    I am trying to implement an XPBD cloth simulation with the bilateral bending constraint model using RXMesh. To compute the bending constraint for an edge, I need to first access its two adjacent faces, and then assign the "bending force" to the vertices of those two faces. This procedure needs both E-F and F-V relations within a kernel. I think I need to use the query_block_dispatcher API to launch an Op::EF relation right? However, I wonder how can I get the VertexIterator associated with the faces accessed by the E-F relation.

    Here's the pseudo-code to explain the computation logic better:

    // bending constraint kernel
    auto bending_lambda = [&](uint32_t edge_id, RXMeshIterator& ef) {
      if (ef.size() == 2) {
        uint32_t v1 = ev(edge_id, 0); // question: how to get E-V ?
        uint32_t v2 = ev(edge_id, 1);
        uint32_t v3 = 0;
        uint32_t v4 = 0;
    
        for (int i = 0; i < 3; ++i) {
          if (fv(ef[0], i) != v1 && fv(ef[0], i) != v2) { // question: how to get F-V ?
            v3 = fv(ef[0], i);
          }
        }
        for (int i = 0; i < 3; ++i) {
          if (fv(ef[1], i) != v1 && fv(ef[1], i) != v2) {
            v4 = fv(ef[1], i);
          }
        }
      }
      // do other computations ...
    }
    
    // dispatch E-F as the document described
    query_block_dispatcher<Op::EF, blockThreads>(context, bending_lambda);
    

    Thank you very much for releasing your great work. Any support would be much appreciated.

    opened by g1n0st 4
  • like mesh hole filling or simplification works well?

    like mesh hole filling or simplification works well?

    Dear Ahdhn, i want to consult you again whether this gpu data structure works well and conveniently implemented for the algorithms like mesh hole filling or simplification which will change the topology of the original mesh. I do not need to change the original mesh itself or related patched information at real time while the algorithm is running , but just want to save the result mesh with changed topology in a object whose class is RXMESH::RXMeshAttribute. after this algorithm, i then do partition again of the topology changed mesh to run another algorithm. though i have noticed the limitations that dynamic scene is not appropriate mentioned in your paper, but just want to confirm it again, thank you .

    opened by nashdingsheng 2
  • why i can not launch multithreads for Bilateral filtering?

    why i can not launch multithreads for Bilateral filtering?

    Dear author, recently i run the code of this project, but i tried many time that project Filtering can not launch multithread for the mesh bilateral denoising by openmesh , specifically, the function :filtering_openmesh which is called in filtering.cu file. in function body of filtering_openmesh , it is obviously that it uses openmp to run in multithread by :#pragma omp parallel for schedule(static) num_threads(num_omp_threads)
    reduction(max
    : max_neighbour_size).

    but i attepted many times to observe 1.the time consumption in comparison with single thread by deleting #pragma。。。。。2.the cpu performance 3.the threads monitored in software "process explorer". all these phenomen indicates it runs in single thread. i do not know why it can not launch multitherad to do this job? and i am sure i have enabled openmp, macro OMP_NUM_THREADS and all possible configurations i know. In your paper, you compared openmesh implementing mcf and geodesic distance, i donot know how you switch between singlecore and multicore. Finally, my hardware running the project is briefly as below: Windows10, interl i7-10 with 16 threads, GPU2080S, cuda11.1, vs2019 and the project is the release version v0.1.0. hope to receive your answer, thank you.

    help wanted 
    opened by nashdingsheng 2
  • Spelling/grammar mistake in geodesic.cu

    Spelling/grammar mistake in geodesic.cu

    https://github.com/owensgroup/RXMesh/blob/54f29b3e2b8f020a9d5e89f94002fdcc5273d124/apps/Geodesic/geodesic.cu#L88

    Display this masage and exits

    should read

    Display this message and exit

    Input file. Input file should under the input/ subdirectory\n"

    should read

    Input file. Input file should exist under the input/ subdirectory\n"

    opened by bradphelan 1
  • RXMesh v0.2.1

    RXMesh v0.2.1

    • Update README with better documentation on how to use RXMesh for writing applications
    • Implement user-defined binary reduction operations on attributes
    • Integrate Polyscope as a mesh viewer + demo
    • Use memcpy_async for reading from global memory to shared memory
    • Initial support for edge flip
    • Add validation function to make sure that the internal data structure is consistent (useful for future dynamic changes support in RXMesh)
    • API for allowing multiple queries in a single kernel
    opened by Ahdhn 0
  • Cleanup

    Cleanup

    • Remove the padding of shared memory to align with 128 bytes since it does not give any performance boost.
    • By default , disable polyscope on Linux
    • Fix align unit test
    opened by Ahdhn 0
  • Polyscope Integration

    Polyscope Integration

    This PR adds polyscope as a viewer. This required implementing special accessors into Attributes. This PR also implements a demo for how to use polyscope with RXMesh. It also adds another constructor for RXMeshStatic and RXMeshDynamic that accepts only path to OBJ file and uses it for apps and unit test (when possible)

    opened by Ahdhn 0
  • Initial support to use `memcpy_async`

    Initial support to use `memcpy_async`

    This PR integrates CUDA memcpy_async to load data from global memory to shared memory. There is alignment requirements that are important to obtain maximum performance that is ignore for now and will be fixed in future PR. However, we pad global and shared memory as a starting point to support these alignment requirements

    opened by Ahdhn 0
  • Initial support for edge flip

    Initial support for edge flip

    This PR introduces RXMeshDynamic as a first step to support dynamic updates. For now, the user should make sure that an edge flip does not introduce invalid configuration.

    opened by Ahdhn 0
  • RXMesh v0.2.0

    RXMesh v0.2.0

    Highlights:

    • Eliminate global index space and identify mesh elements using the combination of their patch index and their local index within the patch
    • All query operation no longer needs to map their output to global index space
    • Allocating Attributes per-patch basis instead of a single large array
    • Introduce Vertex/Edge/FaceHandle to improve type safety which is used to identify different mesh element and index the mesh Attributes
    • Introduce LocalVertex/Edge/FaceT to improve type safety for internal implementation of local index space
    • Attributes are now managed by RXMeshStatic using add_vertex/edge/face_attribute() API
    • Introduce for_each_vertex/edge/face() API in RXMeshStatic for simple operations on the mesh that do not require query operations (i.e., map operations) for both CUDA and OpenMP backend
    • Introduce ReduceHandle to do reduction operations on Attribute and so reduction operation temp memory is no longer handle by Attribute itself
    • Improve the documentation for most of the user-facing APIs
    • Removing code related to shuffling and sorting the input mesh (it was only relevant to reproduce SIGGRAPH paper results)
    • Accurately report the register usage and static shared memory used by the kernel by using the (pointer to) kernel itself instead of the prototype function
    • Improve initializing the data structure by removing duplicate supporting structure that were created by both RXMesh and Patcher and by using OpenMP when possible in RXMesh

    Known Issues:

    • Some queries (VE, VF, and higher queries) now require more registers per thread and thus they might fail on some (less powerful) GPUs.
    opened by Ahdhn 0
Releases(v0.2.1)
  • v0.2.1(Feb 23, 2022)

    • Integrate Polyscope as a mesh viewer + demo
    • Implement user-defined binary reduction operations on attributes
    • Use memcpy_async for reading from global memory to shared memory
    • API for allowing multiple queries in a single kernel
    • Add validation function to make sure that the internal data structure is consistent (useful for dynamic changes support in RXMesh)
    • Initial support for edge flip
    • Update README with better documentation on how to use RXMesh for writing applications
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jan 5, 2022)

    Highlights:

    • Eliminate global index space and identify mesh elements using the combination of their patch index and their local index within the patch
    • All query operation no longer needs to map their output to global index space
    • Allocating Attributes per-patch basis instead of a single large array
    • Introduce Vertex/Edge/FaceHandle to improve type safety which is used to identify different mesh element and index the mesh Attributes
    • Introduce LocalVertex/Edge/FaceT to improve type safety for internal implementation of local index space
    • Attributes are now managed by RXMeshStatic using add_vertex/edge/face_attribute() API
    • Introduce for_each_vertex/edge/face() API in RXMeshStatic for simple operations on the mesh that do not require query operations (i.e., map operations) for both CUDA and OpenMP backend
    • Introduce ReduceHandle to do reduction operations on Attribute and so reduction operation temp memory is no longer handle by Attribute itself
    • Improve the documentation for most of the user-facing APIs
    • Removing code related to shuffling and sorting the input mesh (it was only relevant to reproduce SIGGRAPH paper results)
    • Accurately report the register usage and static shared memory used by the kernel by using the (pointer to) kernel itself instead of the prototype function
    • Improve initializing the data structure by removing duplicate supporting structure that were created by both RXMesh and Patcher and by using OpenMP when possible in RXMesh

    Known Issues:

    • Some queries (VE, VF, and higher queries) now require more registers per thread and thus they might fail on some (less powerful) GPUs.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Sep 19, 2021)

    This is the initial release of RXMesh that contains the code which can be used to reproduce the results presented in the SIGGRAPH 2021 paper.

    Source code(tar.gz)
    Source code(zip)
Source Code for SIGGRAPH Asia 2021 Paper "Ensemble Denoising for Monte Carlo Renderings"

Ensemble Denoising Source Code for SIGGRAPH Asia 2021 Paper Ensemble Denoising for Monte Carlo Renderings. Paper | Code | Talk Slides Dependencies A C

郑少锟 44 Jul 29, 2022
Source Code for SIGGRAPH Asia 2021 Paper "Ensemble Denoising for Monte Carlo Renderings"

Ensemble Denoising Source Code for SIGGRAPH Asia 2021 Paper Ensemble Denoising for Monte Carlo Renderings. Paper | Code | Talk Slides Dependencies A C

郑少锟 44 Jul 29, 2022
the code of paper "Optimizing Global Injectivity for Constrained Parameterization" (SIGGRAPH Asia 2021)

Optimizing Global Injectivity for Constrained Parameterization Xingyi Du, Danny M. Kaufman, Qingnan Zhou, Shahar Kovalsky, Yajie Yan, Noam Aigerman, T

Charles Du 3 Jul 31, 2022
Pixel-Perfect Structure-from-Motion with Featuremetric Refinement (ICCV 2021, Oral)

Pixel-Perfect Structure-from-Motion Best student paper award @ ICCV 2021 We introduce a framework that improves the accuracy of Structure-from-Motion

Computer Vision and Geometry Lab 706 Aug 10, 2022
4eisa40 GPU computing : exploiting the GPU to execute advanced simulations

GPU-computing 4eisa40 GPU computing : exploiting the GPU to execute advanced simulations Activities Parallel programming Algorithms Image processing O

Ecam 4MIN repositories 2 Jan 10, 2022
Navigation-mesh Toolset for Games

Recast & Detour Recast Recast is state of the art navigation mesh construction toolset for games. It is automatic, which means that you can throw any

null 4.9k Aug 9, 2022
An Efficient Implementation of Analytic Mesh Algorithm for 3D Iso-surface Extraction from Neural Networks

AnalyticMesh Analytic Marching is an exact meshing solution from neural networks. Compared to standard methods, it completely avoids geometric and top

Jiabao Lei 39 Jul 12, 2022
An Efficient Implementation of Analytic Mesh Algorithm for 3D Iso-surface Extraction from Neural Networks

AnalyticMesh Analytic Marching is an exact meshing solution from neural networks. Compared to standard methods, it completely avoids geometric and top

null 39 Jul 12, 2022
Swapping face using Face Mesh with TensorFlow Lite

demo.mp4 Aiine Transform (アイン変換) Swapping face using FaceMesh. (could be used to unveil masked faces) Tested Environment Computer Windows 10 (x64) + V

iwatake 17 Apr 26, 2022
2021/3/30 ~ 2021/7/12 に行われる企画「競プロ典型 90 問」の問題・解説・ソースコードなどの資料をアップロードしています。

競プロ典型 90 問 日曜を除く毎朝 7:40 に競プロやアルゴリズムの教育的な問題を Twitter(@e869120)に投稿する企画です。 本企画は、2021 年 3 月 30 日から 7 月 12 日まで行われる予定です。 企画の目的 「競プロ典型 90 問」は、競プロ初級者から中上級者(レー

Masataka Yoneda 674 Aug 10, 2022
Super Mario Remake using C++, SFML, and Image Processing which was a project for Structure Programming Course, 1st Year

Super Mario Remake We use : C++ in OOP concepts SFML for game animations and sound effects. Image processing (Tensorflow and openCV) to add additional

Omar Elshopky 5 Jun 19, 2022
Collection of Fluid Structure Interaction codes, used for one of my PhD courses

Continuum mechanics and fluid-structure interaction problems mathematical modeling and numerical approximation Fluid-structure interaction (FSI) refer

Luca Heltai 2 Jan 23, 2022
A coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations.

A coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations.

preCICE 438 Aug 3, 2022
open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.

OpenMVG (open Multiple View Geometry) License Documentation Continuous Integration (Linux/MacOs/Windows) Build Code Quality Chat Wiki local/docker bui

openMVG 4.3k Aug 11, 2022
The repository contains our dataset and C++ implementation of the CVPR 2022 paper, Geometric Structure Preserving Warp for Natural Image Stitching.

Geometric Structure Preserving Warp for Natural Image Stitching This repository contains our dataset and C++ implementation of the CVPR 2022 paper, Ge

null 9 Jul 21, 2022
Code and Data for our CVPR 2021 paper "Structured Scene Memory for Vision-Language Navigation"

SSM-VLN Code and Data for our CVPR 2021 paper "Structured Scene Memory for Vision-Language Navigation". Environment Installation Download Room-to-Room

hanqing 32 Jun 24, 2022
Web Application to visualize TLE Data build for Space Apps 2021

This repository was created by Brian Donald, Bryan Pikaard, Zach Stence, and Andreas Wenzel for SpaceApps 2021. The Orbital Tracker uses TLE data to c

Brian D 4 Apr 13, 2022
A GPU (CUDA) based Artificial Neural Network library

Updates - 05/10/2017: Added a new example The program "image_generator" is located in the "/src/examples" subdirectory and was submitted by Ben Bogart

Daniel Frenzel 91 Jun 13, 2022
Tensors and Dynamic neural networks in Python with strong GPU acceleration

PyTorch is a Python package that provides two high-level features: Tensor computation (like NumPy) with strong GPU acceleration Deep neural networks b

null 57.8k Aug 8, 2022