bundle.gs3d.generators.mesh¶
Mesh-to-Gaussians: surface-sample any trimesh-readable mesh.
The generated splats are surface-aligned: each sample becomes a flat,
disc-like Gaussian whose local +Z axis points along the face normal.
scale_2 (the normal axis) is small, scale_0/scale_1 (the
tangent plane) are larger — the on-disk size of each disc tracks the
average per-sample area sqrt(mesh.area / N) so coverage stays
roughly uniform regardless of mesh resolution.
If the mesh exposes per-face colours and use_mesh_color is set,
the SH DC term is sampled from the mesh; otherwise the uniform
color field on the base generator is used.
trimesh is an optional guarded dependency — install via the
thebundle[gs3d] extra.
Attributes¶
Classes¶
Sample a triangle mesh and convert each sample into a surface-aligned Gaussian. |
Module Contents¶
- bundle.gs3d.generators.mesh.log¶
- class bundle.gs3d.generators.mesh.MeshToGaussiansGenerator(/, **data: Any)[source]¶
Bases:
bundle.gs3d.generators.base.GeneratorSample 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
Trueand the mesh exposes per-face colours, sample the SH DC term from the mesh instead of usingcolor.
- source: pathlib.Path¶
- method: Literal['uniform', 'even'] = 'uniform'¶
- async generate() bundle.gs3d.ply.GaussianCloudArrays[source]¶
Produce a
GaussianCloudArraysfrom this generator’s parameters.