Skip to content

RigidBody

The Rigidbody Node represents a transformation (position, rotation and scale) in 3D space received from the OptiTrack node. It can be connected to almost all nodes that have a representation in 3D space.

It can also be used to establish parent-child relationships in a hirarchical transformation structure, where child nodes are transformed relative to their parents

TfmNode Node

Motion Capture to SPARCK

RigidBody bridges real-world tracking data with SPARCK's 3D scene. It receives transformation data from the OptiTrack node and applies it to any SPARCK node with a 3D representation — enabling tracked match between virtual and physical worlds for Spatial Augmented Reality installations.

Reference

The following properties can be configured for this node:

Property Type Description
stream - link to stream provided by the OptiTrack node
position (local transformation) position x y z
rotation (local transformation) rotation x y z
scale (local transformation) scale x y z
leap forward [milliseconds] if value is positive, it calculates forward predicted position. If value is negative, it queues the transformation for the amout of time (i.e. to make it synchronous with video feed that takes longer to capture)
leap filter - noise filter
scale - scaling of translation values only
marker draw - if marker information is sent, it can be drawn to this render groups
marker color - if marker are drawn, color of marker
marker size - if marker are drawn, size of marker
Inlet Type Description
properties properties properties | use message [set <propertyPath> <value(s)>] (without node/<nodeName> at the beginning) to set internal properties
send message send direct message to anim object: 'bang' for forced transformation bang. OR 'getlist' <get...> items for dump out current values (needs a bang). Possible <get...> items: getposition, getquat, getscale, getworldpos, getworldquat, getworldscale, gettransform, getinvtransform, getworldtransform
Outlet Type Description
dump message dump of 'anim' , output of the requested <get...> values and transformation bang from the above inlet. also outputs 'markerlist' if markers are received.

Connection and Stream Indicators

The two boxes behind the stream property indicate connection status:

  • First box: Connection to the OptiTrack system (via NatNet2OSC)
  • Second box: Data stream is alive and receiving updates

Connecting to OptiTrack

Basic Workflow

To track a physical object and apply its transformation to a SPARCK node:

  1. In Motive (OptiTrack software), create a rigid body from your markers
  2. Ensure NatNet2OSC is running and bridging data to SPARCK
  3. In the OptiTrack node, assign the rigid body to a stream (1-8)
  4. Create a RigidBody node
  5. Set the stream property to match the OptiTrack stream number
  6. Set the RigidBody as the parent of your target node (e.g., Canvas)

The target node will now follow the tracked physical object in real-time.

Latency Compensation

Leap Forward Prediction

The leap forward property compensates for system latency:

Value Behavior
Positive (e.g., 20) Predicts position forward by N milliseconds — use for fast-moving objects where projection lag is visible
Negative (e.g., -50) Delays transformation by N milliseconds — use to sync with video feeds that have capture latency
0 No compensation

Use leap filter to smooth noisy prediction data when using positive leap forward values.

Parent-Child Hierarchies

Transformation Inheritance

RigidBody can establish parent-child relationships in a hierarchical structure:

  • Child nodes are transformed relative to their parent
  • Multiple RigidBody nodes can be chained for complex articulated structures
  • Local position, rotation, and scale offsets are applied after the tracked transformation

This allows precise alignment between tracked markers and projection content — for example, if markers are offset from the projection surface.

Marker Visualization

Debugging with Marker Display

When OptiTrack sends individual marker positions (not just rigid body transforms):

  1. Set marker draw to a render group (e.g., 3DViewer)
  2. Adjust marker color and marker size for visibility
  3. View markers in the 3DViewer to verify tracking quality

The dump outlet also outputs markerlist when markers are received.

Querying Transformation Data

Getting Transform Values

Send messages to the send inlet to query current transformation:

Message Returns
getposition Local position x y z
getquat Rotation as quaternion
getscale Local scale x y z
getworldpos World position
getworldquat World rotation as quaternion
getworldscale World scale
gettransform Full transformation matrix
getinvtransform Inverse transformation matrix
getworldtransform Full world transformation matrix

Send bang after the getlist message to output values via the dump outlet.



Need help or want to suggest improvements?

Report an issue Improve the Docs

Last updated: 2025-12-01 | Edit this page on GitHub