fiftyone.core.threed.splat#

Gaussian splat definitions for 3D visualization.

Copyright 2017-2026, Voxel51, Inc.

Classes:

GaussianSplat(name,ย splat_path[,ย format,ย ...])

Represents a Gaussian splat asset.

class fiftyone.core.threed.splat.GaussianSplat(name: str, splat_path: str, format: str | None = None, center_geometry: bool = True, visible=True, position: Vector3 | List[float] | Tuple[float] | array | None = None, scale: Vector3 | List[float] | Tuple[float] | array | None = None, quaternion: Quaternion | None = None, *, opacity: float = 1.0, tint: str = '#ffffff')#

Bases: Object3D

Represents a Gaussian splat asset.

Parameters:
  • name (str) โ€“ the name of the splat

  • splat_path (str) โ€“ the path to the splat file. The path may be either absolute or relative to the directory containing the .fo3d file

  • format (None) โ€“ an optional file format hint, such as "ply", "spz", "splat", "ksplat", "sog", or "rad". A recognized hint permits extensionless or opaque paths. A .zip path is accepted only when the format is explicitly set to "sog"

  • center_geometry (True) โ€“ whether to center the splat geometry

  • visible (True) โ€“ default visibility of the splat in the scene

  • position (None) โ€“ the position of the splat in object space

  • quaternion (None) โ€“ the quaternion of the splat in object space

  • scale (None) โ€“ the scale of the splat in object space

  • opacity (1.0) โ€“ the opacity multiplier for the splat, in the range [0, 1]

  • tint ("#ffffff") โ€“ a color multiplier applied to the splat

Raises:

ValueError โ€“ if the path or format is not supported

Methods:

add(*objs)

Add one or more objects as children of this one.

as_dict()

Converts the object to a dict.

clear()

Remove all children from this object.

find_and_execute(node,ย predicate,ย on_match)

Recursively search the scene graph and execute an action on matching nodes.

remove(*objs)

Remove one or more objects from the scene graph recursively.

remove_by_name(name)

Remove all objects with the given name from the scene graph recursively.

remove_by_uuid(target_uuid)

Remove the object with the given UUID from the scene graph recursively.

traverse([include_self])

Traverse the scene graph.

Attributes:

local_transform_matrix

The local transform matrix of the object.

opacity

The opacity multiplier for the splat.

position

The position of the object in object space.

quaternion

The quaternion of the object in object space.

rotation

The rotation of the object in object space.

scale

The scale of the object in object space.

uuid

The unique ID of the object.

tint

The color multiplier for the splat.

add(*objs: Object3D) None#

Add one or more objects as children of this one.

as_dict()#

Converts the object to a dict.

clear() None#

Remove all children from this object.

find_and_execute(node: Object3D, predicate, on_match, stop_on_first_match: bool = False) bool#

Recursively search the scene graph and execute an action on matching nodes.

This is a generic method for traversing the scene graph and performing operations on nodes that match a given predicate. It can be used for finding and removing nodes, collecting nodes, updating nodes, etc.

The traversal continues into the subtrees of both matching and non-matching nodes. For matching nodes, the subtree is traversed when on_match returns True and stop_on_first_match is False.

Parameters:
  • node โ€“ the node to start searching from

  • predicate โ€“ a function that takes a child Object3D and returns

  • criteria (True if it matches the search)

  • on_match โ€“ a function called when a match is found, takes

  • (parent

  • searching (child) and returns True to continue)

  • to (False)

  • stop

  • stop_on_first_match โ€“ if True, stop searching after first match

  • processed (is)

Returns:

True if a match was found and we should stop, False otherwise

Example

# Find all nodes with a specific name and collect them matches = [] def predicate(child):

return child.name == โ€œtargetโ€

def on_match(parent, child):

matches.append(child) return True # continue searching

scene.find_and_execute(scene, predicate, on_match)

property local_transform_matrix#

The local transform matrix of the object.

Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (non-uniform scaling) might have unexpected results.

property opacity: float#

The opacity multiplier for the splat.

property position#

The position of the object in object space.

property quaternion#

The quaternion of the object in object space.

remove(*objs: Object3D) None#

Remove one or more objects from the scene graph recursively.

This method searches recursively through the entire scene graph starting from this object and removes any matching objects from their parentโ€™s children list.

Parameters:

*objs โ€“ one or more Object3D instances to remove

Raises:
  • ValueError โ€“ if any of the objects to remove is this object itself

  • ValueError โ€“ if any of the objects is not found in the scene graph

remove_by_name(name: str) None#

Remove all objects with the given name from the scene graph recursively.

This method searches recursively through the entire scene graph starting from this object and removes all objects matching the given name from their parentโ€™s children lists.

Parameters:

name โ€“ the name of the objects to remove

Raises:
  • ValueError โ€“ if attempting to remove this object itself by name

  • ValueError โ€“ if no objects with the given name are found

remove_by_uuid(target_uuid: str) None#

Remove the object with the given UUID from the scene graph recursively.

This method searches recursively through the entire scene graph starting from this object and removes the object matching the given UUID from its parentโ€™s children list. UUIDs should be unique, so only one match is expected.

Parameters:

target_uuid โ€“ the UUID of the object to remove

Raises:
  • ValueError โ€“ if attempting to remove this object itself by UUID

  • ValueError โ€“ if no object with the given UUID is found

property rotation#

The rotation of the object in object space.

property scale#

The scale of the object in object space.

traverse(include_self=True)#

Traverse the scene graph.

property uuid#

The unique ID of the object.

property tint: str#

The color multiplier for the splat.