Divooka Reference

Splat File

6 nodes

On this page 6

Describe

Function

Overload 1 of 2

Signature
Describe(path: Text) -> Splat File Description
SplatFileDescription Describe(string path)

Reports a file's format, splat count, spherical-harmonic degree and bounds without building the cloud. PLY and .splat are scanned for their bounds a block at a time; compressed PLY, glTF and SOG state theirs up front; SPZ decompresses its positions only.

Parameters

nametypedefaultdescription
pathText—

Returns

resultSplat File Description

Overload 2 of 2

Signature
Describe(stream: Stream) -> Splat File Description
SplatFileDescription Describe(Stream stream)

Reports a stream's format, splat count, spherical-harmonic degree and bounds without building the cloud.

Parameters

nametypedefaultdescription
streamStream—

Returns

resultSplat File Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics

Detect Format

Function

The format of a file by its content: the PLY, glTF, gzip, NGSP or zip signature, or JSON that is a glTF or a SOG meta.json. A .splat has no signature and is recognised by its extension.

Signature
DetectFormat(path: Text) -> Splat Format
SplatFormat DetectFormat(string path)

Parameters

nametypedefaultdescription
pathText—

Returns

resultSplat Format
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics

Get Format Axes

Function

The axis convention a format stores its splats in: right-up-back for SPZ, left-up-front for glTF, and SplatAxes.Unspecified for PLY, compressed PLY, .splat and SOG, which hold whatever the trainer produced.

Signature
GetFormatAxes(format: Splat Format) -> Splat Axes
SplatAxes GetFormatAxes(SplatFormat format)

Parameters

nametypedefaultdescription
formatSplat Format—

Returns

resultSplat Axes
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics

Get Format From Extension

Function

The format a file name's extension names, or SplatFormat.Auto when it names none: .compressed.ply, .ply, .splat, .spz, .gltf, .glb, .sog, and .json for a SOG's meta.json.

Signature
GetFormatFromExtension(path: Text) -> Splat Format
SplatFormat GetFormatFromExtension(string path)

Parameters

nametypedefaultdescription
pathText—

Returns

resultSplat Format
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics

Load

Function

Overload 1 of 4

Signature
Load(path: Text) -> Splat Cloud
SplatCloud Load(string path)

Loads a splat file, sniffing its format from the content, and returns the cloud in the trainers' axes (x right, y down, z forward).

Parameters

nametypedefaultdescription
pathText—

Returns

resultSplat Cloud

Overload 2 of 4

Signature
Load(path: Text, options: Splat Load Options) -> Splat Cloud
SplatCloud Load(string path, SplatLoadOptions options)

Loads a splat file as the options direct: a stated format instead of the sniffed one, another axis convention for the result, or a statement of what axes the file holds.

Parameters

nametypedefaultdescription
pathText—
optionsSplat Load Options—

Returns

resultSplat Cloud

Overload 3 of 4

Signature
Load(stream: Stream) -> Splat Cloud
SplatCloud Load(Stream stream)

Loads a splat file from a stream, sniffing its format from the content. A glTF with an external buffer and a SOG that is a loose folder need a path instead.

Parameters

nametypedefaultdescription
streamStream—

Returns

resultSplat Cloud

Overload 4 of 4

Signature
Load(stream: Stream, options: Splat Load Options) -> Splat Cloud
SplatCloud Load(Stream stream, SplatLoadOptions options)

Loads a splat file from a stream as the options direct.

Parameters

nametypedefaultdescription
streamStream—
optionsSplat Load Options—

Returns

resultSplat Cloud
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics

Save

Function

Overload 1 of 4

Signature
Save(cloud: Splat Cloud, path: Text)
void Save(SplatCloud cloud, string path)

Saves a cloud in the format its file extension names: .ply, .compressed.ply, .splat, .spz, .gltf (with a .bin beside it), .glb, .sog, or meta.json for a SOG as loose files in that folder. The cloud is taken to be in the trainers' axes and converted to the format's own where it has one.

Parameters

nametypedefaultdescription
cloudSplat Cloud—
pathText—

Overload 2 of 4

Signature
Save
    cloud: Splat Cloud
    path: Text
    options: Splat Save Options
void Save(
    SplatCloud cloud,
    string path,
    SplatSaveOptions options)

Saves a cloud as the options direct: a stated format instead of the extension's, the axes the cloud is in, the axes to store, and each format's own settings.

Parameters

nametypedefaultdescription
cloudSplat Cloud—
pathText—
optionsSplat Save Options—

Overload 3 of 4

Signature
Save(cloud: Splat Cloud, stream: Stream, format: Splat Format)
void Save(SplatCloud cloud, Stream stream, SplatFormat format)

Saves a cloud to a stream in the stated format with default settings. A .gltf written to a stream embeds its buffer as a data URI; a SOG is written as its zip bundle.

Parameters

nametypedefaultdescription
cloudSplat Cloud—
streamStream—
formatSplat Format—

Overload 4 of 4

Signature
Save
    cloud: Splat Cloud
    stream: Stream
    options: Splat Save Options
void Save(
    SplatCloud cloud,
    Stream stream,
    SplatSaveOptions options)

Saves a cloud to a stream as the options direct; the options must state the format.

Parameters

nametypedefaultdescription
cloudSplat Cloud—
streamStream—
optionsSplat Save Options—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Splat File
Package
Computer Graphics