-
Notifications
You must be signed in to change notification settings - Fork 40
Visualizer
boneDynamicsVisualizer is a viewport helper node for checking how a boneDynamicsNode interprets a simulated joint section. It is useful when checking collision radius, bone-as-capsule collision, and angle limits.

The simplest workflow with the bdn package is to create a visualizer at the same time as the dynamics node:
import bdn
bdn.create_dynamics_node(
"joint1",
"joint2",
create_visualizer=True,
)You can also create a visualizer for an existing boneDynamicsNode:
import bdn
bdn.create_visualizer("boneDynamicsNode1")Most visualizer attributes are connected from the source boneDynamicsNode, so you usually do not need to edit the visualizer directly.
The visualizer draws the bone-side collision shape based on the boneDynamicsNode settings. When boneAsCapsule is disabled, it draws the end-joint radius sphere. When boneAsCapsule is enabled, it draws the capsule shape for the bone section.

When boneDynamicsNode.iterations is 0, collision is disabled and the collision display is hidden. This is driven by the connection from iterations to the visualizer's drawBoneCollision attribute.
For collision details, see Collision Guide.
The visualizer draws a cone shape for the angle limit based on the boneDynamicsNode settings.

When boneDynamicsNode.enableAngleLimit is False, the angle-limit display is hidden.
The cone display size is intended to be adjusted manually with angleConeSize.
For angle limit behavior, see Advanced Features.
- The visualizer is a display-only node. It is placed downstream in the node graph and does not affect the simulation result of
boneDynamicsNode. - The visualizer still adds some evaluation cost. To maximize performance, hide or delete the visualizer node.
- Do not move the visualizer's parent transform away from the origin.