Channels

Channels are predefined keywords which allow to query the value of almost any Entity attribute value, ranging from the current played Motion Clip to the position of a Bone. Channels can be query via Expressions in the Attribute and Set Bone Behaviors, via the Expression Trigger in Triggers or via the MEL/Python command glmGetChannelValue.
 
There are two types of Channels:
  • Entity Channels: they refer to global Attributes which are stored / computed by an Entity (eg Entity Id, Rendering Type Id, Bone Position...)
  • Behavior Channels: they refer to local Attributes which are stored / computed by an Entity's Behavior (eg Behavior is Running, Motion Clip played by a Motion Behavior...).

Some Channels require a Component Name in addition to a Channel Name. The Component Name allows to specify which objects is queried for this Channel. Component Names can be the name of the wanted skeleton bone, limb...  It can be specified through the Attribute Behavior special syntax or using the -componentName flag of the glmGetChannelValue command. 

Channels values are only of type float or vector3.

Entity Channels

Global Channels

Channel Name Channel Type Description
entityId float Unique integer ID of the Entity
particleId float Maya Particle ID of an Entity within its particle system
entityTypeId float Entity Type ID of the Entity
renderingTypeId float Rendering Type ID of the Entity
entityTypeColor vector Color of the Entity Type of the Entity
scale float Scale of the Entity
position vector3 World position of the Entity Pelvis
orientation vector3 World orientation of the Entity Pelvis
direction vector3 Direction vector of the Entity Pelvis
headAttBank vector3 World orientation of the Entity Pelvis as heading / attitude / bank
previousPosition vector3 World position of the Entity Pelvis at the previous frame
previousOrientation vector3 World orientation of the Entity Pelvis at the previous frame
pelvisVelocity vector3 Velocity of the Entity Pelvis
entityVelocity vector3 Velocity of the Entity (can be different from pelvisVelocity when using the Locomotion Behavior)
hasPaintedColor float Returns 1 if the Entity is within a Painted Zone.
paintedColor vector3 Returns the color of the first Painted Zone at the Entity position (each component will be between 0. and 1.).
paintedColorAlpha float Returns the alpha coefficient of the first Painted Zone at the Entity position (between 0. and 1.).
hasPaintedDirection float Returns 1 if the Entity is within a  Vector Field (even if the nothing is painted at the Entity Position)
paintedDirection vector3 Returns the direction of the first Vector Field at the Entity position.

Expression Examples

this.entityId
this.position
this.position[x]

Global Animation Channels

The following Channels are only meaningful if there's at least a Motion, Locomotion or SyncMotion Behavior playing in the Behavior Graph.

Channel Name Channel Type Description
bonePosition vector3 World position of an Entity Bone. This Channel requires the name of the Bone as a Component
boneOrientation vector3 World orientation (as Maya angles) of an Entity Bone. This Channel requires the name of the Bone as a Component
boneDirection vector3 World direction vector of an Entity Bone (e.g. direction the Hand bone will be the vector going from the ForeArm bone to the Hand bone). This Channel is not valid for root bone of the skeleton. This Channel requires the name of the Bone as a Component
limbHasFootprint float Are there footprints defined for an Entity Limb? This Channel requires the name of the Limb as a Component.
limbFootprint float Is the Entity Limb currently playing a footprint? The result of this Channel is only valid if limbHasFootprint returns 1. This Channel requires the name of the Limb as a Component.
limbPreviousFootprintPosition vector3 World position of the previous footprint of an Entity Limb. The result of this Channel is only valid if limbHasFootprint returns 1. This Channel requires the name of the Limb as a Component.
limbPreviousFootprintOrientation vector3 World orientation of the previous footprint of an Entity Limb. The result of this Channel is only valid if limbHasFootprint returns 1. This Channel requires the name of the Limb as a Component.
limbNextFootprintPosition vector3 World position of the next footprint of an Entity Limb. The result of this Channel is only valid if limbHasFootprint returns 1. This Channel requires the name of the Limb as a Component.
limbNextFootprintOrientation vector3 World orientation of the next footprint of an Entity Limb. The result of this Channel is only valid if limbHasFootprint returns 1. This Channel requires the name of the Limb as a Component.
blindDataValue float Value of a Character Blind Data / Blend Shape. This Channel requires the name of a Blind Data or a Blend Shape as a Component. The name of a Blend Shape has the following naming convention: blendShapeGroupName.blendShapeName.

Expression Examples

this.bonePosition.LeftArm
this.bonePosition.RightLeg[x]
this.blendShapeValue.FacialBS.LeftEye

Global Navigation Channels

The following Channels are only meaningful if there's at least a GoTo and a Navigation Behavior playing in the Behavior Graph.

Channel Name Channel Type Description
isNavigationEnabled float Is the navigation enabled for an Entity? It returns 1 if a NavMesh is correctly defined in the Terrain Locator and if the Entity Navigation Attributes are valid.
radius float Navigation radius of an Entity
personalSpace float Navigation personal space of an Entity
height float Navigation height of an Entity
isNavigating float Is the Entity currently playing a Navigation Behavior? The result of this Channel is only valid if isNavigationEnabled returns 1
boldness float Navigation boldness of an Entity. The result of this Channel is only valid if isNavigating returns 1.
hasAGoToTarget float Is the Entity currently going to a target?. The result of this Channel is only valid if isNavigating returns 1.
goToTargetPosition vector3 World position of the target. The result of this Channel is only valid if hasAGoToTarget returns 1.
localGoToTargetPosition vector3 World position of the local target. The result of this Channel is only valid if hasAGoToTarget returns 1.
goToTargetPosition vector3 World position of the target. The result of this Channel is only valid if hasAGoToTarget returns 1.
distanceToGoToTarget float Distance between the Entity and the target. The result of this Channel is only valid if hasAGoToTarget returns 1.
isGoToTargetReached float Returns 1 if the Entity has reached its target. The result of this Channel is only valid if hasAGoToTarget returns 1.
curvilinearAbscissaOnPath float Position of the Entity on the curvilinear abscissa between its starting position and the target. This value varies between 0. (starting position) and 1. (target reached). The result of this Channel is only valid if hasAGoToTarget returns 1.

Expression Examples

this.height
this.goToTargetPosition
this.goToTargetPosition[x]

Global Ground Channels

Channel Name Channel Type Description
hasGround float Returns 1. if the Entity is currently adapted on a Terrain Locator node
groundHeight float Height of the currently adapted ground at the Entity position. The result of this Channel is only valid if hasGround returns 1.
groundNormal vector3 Normal of the currently adapted ground at the Entity position. The result of this Channel is only valid if hasGround returns 1.
groundSlope float Unsigned slope angle (in °) of the currently adapted ground at the Entity position. The result of this Channel is only valid if hasGround returns 1.
entityGroundSlope float Signed slope angle (in °) of the currently adapted ground at the Entity position and depending on the Entity orientation. The result of this Channel is only valid if hasGround returns 1.

Expression Examples

this.hasGround
this.groundSlope

Global Physics Channels

Channel Name Channel Type Description
bonePhysicsMode float Physicalize mode of an Entity Bone (0: Dynamic, 1: Kinematic, 2: Local Servo, 3: World Servo, -1: disabled). This Channel requires the name of the Bone as a Component.

Global Flock Channels

Channel Name Channel Type Description
isFlockEnabled float Is the flock enabled for an Entity? It returns 1 if a Flock Behavior is currently active.
hasAPerchTarget float Is the Entity currently going to a perch?. The result of this Channel is only valid if isFlockEnabled returns 1.
perchTargetPosition vector3 World position of the perch target. The result of this Channel is only valid if hasAPerchTarget returns 1.
perchTargetNormal vector3 Normal of the perch target. The result of this Channel is only valid if hasAPerchTarget returns 1.
distanceToPerchedTarget float Distance between the Entity and the perch target. The result of this Channel is only valid if hasAPerchTarget returns 1.
isPerchedTargetReached float Returns 1 if the Entity has reached its perch target. The result of this Channel is only valid if hasAPerchTarget returns 1.

Global Geometry Channels

Channel Name Channel Type Description
hasMesh float Returns 1 if the Entity has been assigned with a Mesh named as specified. This Channel requires a Mesh Asset Node Name as a Component
geometryId float Id of the Geometry File currently played by the Entity. A Geometry File can be changed by using a Geometry Behavior. -1 if no Geometry Behavior is played.
geometryFrame float Frame of the Geometry File currently played by the Entity. Played frame of a Geometry File is controlled by a Geometry Behavior.
geometryRatio float Ratio (between 0. and 1.) of the Geometry File currently played by the Entity. The ratio of a Geometry File is computed depending on the Start Frame and End Frame defined in the current Geometry Behavior.
geometryStartFrame float Start frame value defined in the current Geometry Behavior.
geometryEndFrame float End frame value defined in the current Geometry Behavior.

Expression Examples

this.bonePhysicsMode.LeftLeg

Global Perception Channels

Channel Name Channel Type Description
closestEntity float EntityId of the closest Entity.
closestEntityOfEntityType float EntityId of the closest Entity of Entity Type X. This Channel requires an Entity Type Id as a Component
closestEntityOfCrowdField float EntityId of the closest Entity belonging to CrowdField X. This Channel requires a CrowdField Id as a Component
distanceWithEntity float Distance with the specified Entity of Id X. This Channel requires an Entity Id as a Component.
distanceWithEntity float Squared distance with the specified Entity of Id X (faster than distanceWithEntity). This Channel requires an Entity Id as a Component.

Expression Examples

this.closestEntity
this.closestEntityOfEntityType.2
this.closestEntityOfCrowdField.1

Behavior Channels

Common Behavior Channels

These Channels are available for all Behaviors:

Channel Name Channel Type Description
isIdle float Is the Behavior idled? Returns 1. if the Behavior is neither starting, running or stopping.
isStarting float Is the Behavior starting? Returns 1. if the Behavior is waiting for its Starting Trigger to be true.
isRunning float Is the Behavior running? Returns 1. if the Behavior is has currently running
isStopping float N/A

Expression Examples

this.beMotionShape1.isIdle
this.beGotoShape1.isRunning

Motion Behavior Channels

These Channels are only available on Motion Behaviors:

Channel Name Channel Type Description
motionId float ID of the Motion Clip currently played by the Motion Behavior
motionFrame float Currently played frame of the Motion Clip
motionRatio float Currently played ratio of the Motion Clip. This value varies between 0. (first frame of the motion) and 1. (last frame of the motion).
numberOfFrames float Number of frames in the currenly played Motion Clip

Expression Examples

this.beMotionShape1.motionFrame
this.beMotionShape2.motionId

Locomotion Behavior Channels

These Channels are only available on Locomotion Behaviors:

Channel Name Channel Type Description
linearVelocity float Currently wanted linear velocity
angularVelocity float Currently wanted angular velocity
minLinearVelocity float Minimum available linear velocity in the Locomotion Database
minLinearVelocity float Minimum available angular velocity in the Locomotion Database
minLinearVelocity float Maximum available linear velocity in the Locomotion Database
minLinearVelocity float Minimum available angular velocity in the Locomotion Database

Expression Examples

this.beLocomotionShape1.linearVelocity
this.beLocomotionShape2.angularVelocity

More Channels will be added in the next versions depending on user requirements. If some other Channels interest you, tell us here.