Skip to main content

Crate bevy_spark

Crate bevy_spark 

Source
Expand description

bevy_spark — Gaussian splat renderer for Bevy.

Spawn a SplatCloud with a Handle<Splats> next to a Transform. The renderer assumes Bevy’s Y-up coordinate convention by default; add SplatCoordinateConvention::YDown for SPZ files authored in the common 3DGS/SparkJS Y-down convention.

let cloud: Handle<Splats> = asset_server.load("butterfly.spz");
commands.spawn((
    SplatCloud { handle: cloud },
    SplatCoordinateConvention::YDown,
    Transform::from_xyz(0.0, 0.0, -3.0),
));

Global quality, sorting, LOD, upload, and multi-cloud defaults live in the SparkSettings resource. Add a SplatCloudSettings component to override quality, sorting, or LOD for one cloud. Environment variables are still read as debug/default overrides for benchmark and capture runs.

Files without embedded LOD stay unchanged unless generated LOD is enabled with SpzLoaderSettings::generate_lod or BEVY_SPARK_GENERATE_LOD=1. SpzLoaderSettings also carries the loader-side max-splat guard and default source coordinate convention for loaded assets.

Re-exports§

pub use asset::SpzLoader;
pub use asset::SpzLoaderSettings;
pub use render::SparkConfigSource;
pub use render::SparkDiagnostics;
pub use render::SparkDiagnosticsSnapshot;
pub use render::SparkQualityPreset;
pub use render::SparkRenderPlugin;
pub use render::SparkSettings;
pub use render::SplatCloud;
pub use render::SplatCloudSettings;
pub use render::SplatCpuCullMode;
pub use render::SplatFalloffProfile;
pub use render::SplatHighAlphaProfile;
pub use render::SplatLodSettings;
pub use render::SplatMultiCloudMode;
pub use render::SplatQualitySettings;
pub use render::SplatSortBackend;
pub use render::SplatSortMode;
pub use render::SplatSortSettings;
pub use splats::RawSplat;
pub use splats::SplatCoordinateConvention;
pub use splats::Splats;

Modules§

asset
Asset loader for *.spz files.
render
Render-side glue: pipeline, bind groups, queue, draw command.
splats
Splat data: in-memory Splats (used by the loader) and the GPU-side packed representations used by the renderer.
spz
SPZ (NGSP / Niantic Gaussian Splat) format parser.

Structs§

SparkPlugin