bundle.gs3d.generators

Synthetic Gaussian splat generators — backend registry and factory.

Submodules

Classes

Generator

Base class for procedural Gaussian generators.

MeshToGaussiansGenerator

Sample a triangle mesh and convert each sample into a surface-aligned Gaussian.

CubeGenerator

Gaussians inside (or on the surface of) an axis-aligned cube.

RandomCloudGenerator

Uniform random Gaussians inside an axis-aligned bounding box.

SphereGenerator

Gaussians distributed uniformly on (or in) a sphere.

TorusGenerator

Gaussians on a torus surface in the XY plane.

Functions

create_generator(shape, **kwargs) → base.Generator

Instantiate a generator for the named shape.

available_shapes() → list[str]

Return the list of registered shape names.

Package Contents

class bundle.gs3d.generators.Generator(/, **data: Any)[source]

Bases: bundle.core.entity.Entity

Base class for procedural Gaussian generators.

Subclasses add shape-specific fields and implement generate().

count

Number of Gaussians to emit.

sh_degree

Spherical harmonics degree (0..3).

seed

Random seed; None for non-deterministic output.

opacity

Logit-space opacity assigned to each generated Gaussian (logit ~2.0 ≈ alpha 0.88).

base_scale

Initial isotropic log-space scale (exp(-3) ≈ 0.05).

color

Linear-space RGB colour written into the SH DC term.

name: str = 'generator'
count: int = 10000
sh_degree: int = 3
seed: int | None = None
opacity: float = 2.0
base_scale: float = -3.0
color: tuple[float, float, float] = (1.0, 1.0, 1.0)
abstractmethod generate() → bundle.gs3d.ply.GaussianCloudArrays[source]
Async:

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.MeshToGaussiansGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Sample a triangle mesh and convert each sample into a surface-aligned Gaussian.

source

Path to a trimesh-readable mesh file (obj, ply, stl, glb, …).

method

"uniform" for fast area-weighted sampling, "even" for Poisson-disc-like even sampling (slower).

disc_thickness_ratio

Ratio of normal-axis scale to tangent-axis scale. Smaller values produce thinner, more disc-like splats.

use_mesh_color

When True and the mesh exposes per-face colours, sample the SH DC term from the mesh instead of using color.

name: str = 'mesh'
source: pathlib.Path
method: Literal['uniform', 'even'] = 'uniform'
disc_thickness_ratio: float = 0.1
use_mesh_color: bool = True
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.CubeGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians inside (or on the surface of) an axis-aligned cube.

size

Edge length.

center

Cube centre.

surface

When True samples lie on the six faces; otherwise inside.

name: str = 'cube'
size: float = 1.0
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
surface: bool = False
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.RandomCloudGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Uniform random Gaussians inside an axis-aligned bounding box.

bounds_min

Lower corner of the sampling box.

bounds_max

Upper corner.

name: str = 'cloud'
bounds_min: tuple[float, float, float]
bounds_max: tuple[float, float, float] = (1.0, 1.0, 1.0)
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.SphereGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians distributed uniformly on (or in) a sphere.

radius

Sphere radius.

center

Sphere centre in world space.

surface

When True samples lie on the surface; otherwise inside.

name: str = 'sphere'
radius: float = 1.0
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
surface: bool = True
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.TorusGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians on a torus surface in the XY plane.

major_radius

Distance from torus centre to tube centre (R).

minor_radius

Tube radius (r).

center

Torus centre.

name: str = 'torus'
major_radius: float = 1.0
minor_radius: float = 0.3
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

bundle.gs3d.generators.create_generator(shape: str, **kwargs) → base.Generator[source]

Instantiate a generator for the named shape.

bundle.gs3d.generators.available_shapes() → list[str][source]

Return the list of registered shape names.