Ruby gem · v1.0.0

3D Gaussian Splatting, in Ruby.

Render, differentiate, and train Gaussian scenes without leaving CRuby. A portable reference path and native OpenMP kernels share the same API.

rasterization frame_0000
A Gaussian-splatted field rendered by Gsplat
16 gaussians 800×800 px CPU render

3.2+CRuby

3DGS + 2DGSrendering

Ruby + Cbackends

Apache 2.0license

The rendering equations stay visible.

Use the Ruby backend to inspect the math. Switch to the packaged native extension when the same work needs more speed.

Differentiable

Reverse-mode autograd covers projection, compositing, spherical harmonics, and camera parameters.

Camera-ready

Pinhole, orthographic, equidistant fisheye, and OpenCV-distorted cameras use one rendering surface.

Training included

Adam, SelectiveAdam, densification, MCMC strategy, COLMAP input, checkpoints, and PLY output.

A complete render fits in one Ruby file.

The API follows familiar gsplat conventions while using Numo::NArray values throughout.

See the full example
require "gsplat"

rendered, alphas, meta = Gsplat.rasterization(
  means: means,
  quats: quats,
  scales: scales,
  opacities: opacities,
  colors: colors,
  viewmats: viewmats,
  ks: intrinsics,
  width: 512,
  height: 512
)

rendered.backward(gradient)

Start with one command.

Requires CRuby 3.2 or newer. The native extension is packaged with the gem; OpenMP is optional.

gem install gsplat