Brush 3D Reconstruction Engine

repository·main·Indexed 26 days ago

https://github.com/arthurbrussee/brush

A high-performance, cross-platform 3D reconstruction engine using Gaussian Splatting. Built with WebGPU and the Burn ML framework, it supports training and viewing on Desktop (Windows, macOS, Linux), Android, and Web. It includes the brush-js library for JavaScript/WebAssembly bindings, a WebGPU-compatible radix sort (brush-sort), and a COLMAP data reader (colmap-reader). The engine supports .ply and .compressed.ply files, including animations and delta frames.

Tokens
28.1K
Snippets
74
Records
243
Agent score
89%

What's inside Brush

  1. Overview of Brush 3D Reconstruction Engine

    main
    Brush is a 3D reconstruction engine based on Gaussian splatting. It is designed for high performance and cross-platform compatibility, utilizing WebGPU and the Burn machine learning framework. It supports training and viewing on macOS, Windows, Linux, Android, and in web browsers (Chrome/Edge).
  2. Use rrfd for Android file picking

    main

    rrfd (really rusty file reader) is an extension of rfd designed specifically for Android. It uses JNI code to launch a new Android activity that returns a file name and its contents.

    Warning: This implementation is not production ready. It is intended as a quick setup for getting files working on Android and should be used with caution.

  3. Use brush-js for Gaussian-splat training

    main
    The brush-js package provides JavaScript/WebAssembly bindings for Brush Gaussian-splat training. It is designed for high performance by handing GPU buffers (transforms, SH coefficients, opacities) directly back to JavaScript as GPUBuffers, allowing them to be bound into your own WebGPU pipelines without copying data.
  4. Run the Brush WASM web demo locally

    main

    To run the brush-app egui viewer in your browser using Vite and React, install the dependencies and start the development server. The development command automatically rebuilds the WebAssembly (WASM) modules before starting the server.

    1. Install dependencies: npm install
    2. Start development server: npm run dev (available at localhost:5173)
    npm install
    npm run dev
  5. Install and run the brush-js demo

    main

    To run the minimal Vite + WebGPU demo provided in the repository, navigate to the repo root and execute the following commands. Note that the demo requires a Chromium-based browser because it utilizes the showDirectoryPicker API. You will need to select a folder containing a Brush dataset or a single .ply file.

    npm install
    npm run dev:lib
  6. Build Brush for Desktop (Windows/macOS/Linux)

    main

    Ensure you have Rust 1.88+ installed. Use cargo to build the project from the workspace root.

    • Debug Build: cargo run
    • Optimized Release Build: cargo run --release
    • Run Tests: cargo test --all
    cargo run --release
  7. Train Gaussian Splats with Brush

    main

    Brush supports native training on mobile and in the browser using COLMAP data or Nerfstudio format datasets.

    Masking Support:

    • Transparent Images: Using images with transparency forces the final splat to match the input transparency.
    • Mask Folders: Providing a folder named masks allows the engine to ignore masked-out parts of the images.