🔗Channel Link

Use simple expressions to connect channel data

Linking channels provides a way to combine the animation data of one channel with another. Channels are linked together similar to using patch cables, routing data from one channel to another to form chains of connected behaviors.

Linking channels is also a great way to replicate behavior across multiple objects. Instead of having a bunch of duplicate behaviors and animations to manage, one can use a single master object and then link others to it. This can be used to directly copy animation or to modify it through additional calculations.

Linking Channels

To the right of each channel name is a circular well. Clicking and dragging on this draws out a link cable which can be connected with any other channel well. Available link wells are highlighted by white circles as shown below.

Any link wells not highlighted in white may not be linked to. This may be to prevent circular references, or due to an incompatible data type.

Each channel may be connected to 1 other channel, using it as data input. This can be set to overwrite the existing channel data, or use a math expression to calculate a new value. Channel links can be daisy chained to create complex behaviors, or to replicate a channel animation across multiple objects.

Linking with Drag and Drop

A handy shortcut to simultaneously create and link a new channel is to drag the object onto the link well of the source object.

Note that a link is only created when the object is dragged and dropped on the channel link well (highlighted in white).

In the example shown, the Cylinder object is dragged onto the Sphere Local Position channel link. This then creates a matching Local Position channel on the Cylinder and links it to the Sphere's position.

This operation also works with multiple objects, creating and linking a new channel on each object.

Each channel has the ability to be linked to another channel (receiving the other's data) or linked from another channel (providing its data to that channel). This is depicted by the well icon as shown below.

Note that the color of the link is based on the source channel color, which is blue in the example shown.

When the channel link is selected, small notch may be seen traveling along the line in the direction of data flow, as an aid to visualize the link relationship.

Linked To (Receiving Data)

When a channel link is receiving data, its link is filled with the color of the source channel. By default the source data overwrites the receiving channel data, but may be configured to process the data further as described below in Additional Settings.

Linked From (Providing Data - read only)

When a channel is being referenced by other channels (i.e. providing its data), its link well is outlined with its own channel color, to represent outward flow of data.

In the example above, an extra data-only channel (Data Process) has been added to perform additional calculation, which is then linked to by Capsule Local Position. Using intermediate channels in this way is useful to perform multiple calculations.

To avoid screen clutter, channel link lines are only displayed for selected channels. If nothing is selected, only the link fills and outlines are shown (without lines).

Channel links can be removed using the context menu options as explained in the section below. You can also hold the Control key and click on the link well to remove a link. This can only be used on destination links (Linked To).

Channel links can be disabled without removing them by holding the Alt key and clicking on any receiving link wells (with filled color). Disabled links are displayed in gray and no longer processed.

The linked from channel only shows a gray outline if all referencing channels (linked to it) are disabled. If any channel link is still enabled, it displays the outline in color. The helps indicate when channel links are active or not.

When a channel link is disabled it is treated as though it doesn't exist and the channel resumes normal behavior. It may be helpful at times to temporarily disable a link while preserving its settings otherwise.

When a channel is selected, the link settings are displayed in the Info panel below.

This slider controls how much of the source data is combined with the current channel. If blend is set to 0, then the current channel remains unchanged from its present value, whereas a blend of 1 applies the data fully. How the blend is calculated depends on the math expression selected, described below in Link Mode.

The Graph View can be helpful for visualizing the result of channel link calculations.

Shows a Link Blend value of 0, where the current blue animation curve is unaffected.
Shows the result of partially blending the source data with the current channel animation.

Additional Settings

More settings can be exposed by clicking the pencil icon (to the right of the Link Blend slider). This also reveals a minus icon ( - ) which removes the channel link if clicked.

Source

This displays the object and source channel being linked to. This field can be modified directly by dragging and dropping another TimeflowObject. The available channels to link to are displayed in the drop-down menu next to the object field.

In Attribute

This drop-down menu selects which attributes are used for input. This is only available for complex value types. Primarily this is useful to link a single axis from a complex value (vector, color, rect) to a single float value.

Smooth

Applies temporal smoothing (in seconds) to the input value. Set to 0 to disable.

Smoothing averages input values over time. Use this to reduce noise and blend values more gradually over time.

Time Offset

A time offset (in seconds) can be applied to delay or anticipate the source animation. This could be used for example to have one object, or a series of objects, follow a lead object spaced out over time.

Data Cache Optimization When data is requested (which may be at times other than the current time), the source channel calculates the value internally but does not apply it to the object. A smart context-aware form of data caching is used to optimize repeated requests, so that the channel doesn't reprocess the same data.

1st Key

This option is used with Time Offset. When enabled, the first keyframe on the channel sets the channel link time offset. Dragging the keyframe in time sets the channel link time offset. This can be helpful to manage link time offsets in the track and graph view.

Negative

If this checkbox is enabled, the 1st keyframe time is applied as a negative time offset (instead of positive).

Time Scale

Apply time scaling to the linked animation to speed it up or slow it down relative to the source animation.

Channel data may be processed with one of the following mathematical operations or using a custom function.

Off

Disables the link. No processing is performed and the link is ignored when this mode is selected.

Overwrite

This replaces the current channel data with the source channel data. This is a good mode to use for 1:1 copying of data from one channel to another. If blend is at full strength (1), then the current channel data is fully overwritten.

Add / Subtract / Multiply

This adds, subtracts, or multiplies the source data with the current channel data. These modes are useful to augment an animation by offsetting, reducing, or amplifying it.

An example showing Multiply, using an animation curve to envelope another.

Since both the source and destination channels can have their own animations, channel links can be used to create complex curves using simple techniques.

Min / Max

These modes are based on the math operations min() and max(). Min compares 2 values and returns the smaller of the two, while Max returns the greater of the two. This can be used to limit values or to perform boolean type operations between animation curves.

An example using Min, akin to a Boolean intersection.

One Minus

Use this mode when the source data is a value between 0 and 1 to get the complimentary value.

To invert or mirror data that isn't clamped between 0 and 1, use the Subtract mode and set an initial keyframe value of 0.

Remap

Use remap to scale values from an input range to an output range. This can be helpful when mapping one property to another with a different value range.

A custom channel link operation can be defined by writing a simple script. This is implemented using a ScriptableObject. Your custom script must derive from the base class CustomChannelLink and use override functions to implement custom behavior.

This documentation assumes you are familiar with Unity scripting. Please see CustomChannelLinkDifference.cs for example code and refer to the comments for further details about the implementation.

Create Object Instance

To assign a custom channel link, an instance of the ScriptableObject must be created as an asset first. This is a one-time setup after which the object can be assigned in the channel link settings.

Once created, the custom link can be dragged from the project window to the custom link field in the mini inspector, as shown below.

For more commands and menu options related to channel links, see Channel Link Menu.

Last updated