esc
Start typing to search the docs
Navigate Open

Asset3D

A prepacked 3D asset (.gltf, .glb, .obj, .stl, etc.).

See also archetypes.Mesh3D.

If there are multiple archetypes.InstancePoses3D instances logged to the same entity as a mesh, an instance of the mesh will be drawn for each transform.

Meshes, or parts of meshes, without vertex normals get flat normals computed by the Viewer, i.e. each triangle is shaded with its own face normal. To render an asset unlit instead, give it all-zero vertex normals.

Fields

Required

Optional

Can be shown in

Example

Simple 3D asset

"""Log a simple 3D asset."""

import sys

import rerun as rr

if len(sys.argv) < 2:
    print(f"Usage: {sys.argv[0]} <path_to_asset.[gltf|glb|obj|stl]>")
    sys.exit(1)

rr.init("rerun_example_asset3d", spawn=True)

rr.log(
    "world", rr.ViewCoordinates.RIGHT_HAND_Z_UP, static=True
)  # Set the 3D view's up direction
rr.log("world/asset", rr.Asset3D(path=sys.argv[1]))