Using track events

This recipe will take you through setting up and using track events in the Track View editor.

A track event is a one-way signal that will allow you to branch Flow Graph logic from a Track View sequence.

Each sequence may define any arbitrary number of track events, which can be called at any time from a Track Event node. Each event may also carry with it a string value assigned to the key in the Track View editor. When a track event is triggered from the sequence, its corresponding output port in a special Flow Graph node is activated, allowing you to branch Flow Graph logic very easily.

Getting ready

For this recipe, we will add some track events to the Track View sequence created in the first and second recipes of this chapter. These two recipes must be already created to go forward.

You should have the cut-scene my_first_cutscene open in the Track View and your view set to that of the camera.

How to do it...

First we must define some track events (track events may be defined per Track View sequence):

  1. Open the my_first_cutscene sequence, or create a new one to explore track events quickly.
  2. Once opened, right-click on the sequence in the tree view on the left and select the Edit Events option:
    How to do it...
  3. A dialog box labeled Track View Events will open.
  4. To create a track event, select the Add button and give the event a name. The event will then be added to the list.
  5. To remove this event, select it from the list and select the Remove button. When you are done, select the OK button to save your changes.
  6. Create a new event called sequence started:
    How to do it...

    The track event node will allow you to call a track event with an optional string value from the sequence.

  7. To add the node to your sequence, right-click on the sequence in the tree view on the left and select the Add Event option towards the bottom.
  8. Give the node a name and it will then be added to your sequence.
  9. From here, you will be able to add keys to toggle the track events just like any other node.
    How to do it...
  10. If you select any of the keys you created on the event track, you can assign to it one of your predefined event names by choosing them on the right side menu, called Key Properties. You can also edit the list of track events for the sequence quickly by double-clicking on Edit Track Events.
  11. The next step will be to add this event to a Flow Graph.
  12. To add your Flow Graph logic, you will first need to create a new graph or open an existing one.
  13. Then you will need to place a track event node, which can be done by right-clicking anywhere in the graph and selecting it from the context menu.
    How to do it...
  14. The node will initially be empty and you will need to select your animation sequence for the Sequence input port.
  15. Once you select a valid sequence, the output port will be created for each track event owned by that sequence.
    How to do it...
  16. From this point, create your Flow Graph logic using the created output ports.

When these events are triggered from the animation sequence as it plays through, the output ports will trigger, allowing your Flow Graph logic to execute.

How it works...

Track Events allow for direct triggering at particular times within a sequence to the Flow Graph. This allows for extremely complex combination of animation and flow graphed physics or effects to be triggered through a sequence!

There's more...

You may want to know how to remove unused track events or how to trigger image nodes for use within the track sequences.

Removing events from the sequence

If after placing a Flow Graph node, you add or remove track events from the sequence, the Flow Graph node will update to reflect this change and the output ports will be created/removed as such.

Note

If you had a link leading from the output port of an event that is later removed, the link will be deleted as well.

Triggering image nodes for track sequences

There are some powerful nodes in the Flow Graph under the image nodes.

These nodes can be triggered from a track event and distort or add some sort of effect to the camera for sequences only.

See also

  • You do not have to create a Flow Graph to trigger console commands, go to the Using console variables in the Track View recipe earlier in this chapter
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.154.64