The Interactive & Immersive HQ

The Overhauled Engine COMP in TouchDesigner

With the release of the 2023.11290 version of TouchDesigner, the Engine COMP received a substantial overhaul, incorporating many workflow-improving features that are sure to make it an even more useful tool for TouchDesigner developers. In this post, we’ll take a look at the improvements and new features that came with the overhauled Engine COMP, including control over initialization and behavior on start, along with improvements to error reporting, available performance information, and more.

If you’re not yet familiar with the Engine COMP, take a look at the Engine COMP page in the TouchDesigner documentation. The Engine COMP allows a .tox file to be run as a separate process via TouchEngine, without the need to manually open another instance of TouchDesigner or TouchEngine. Input and output of data to the process is much the same as working with typical operators in TouchDesigner’s network editor.

Now that we’ve got that covered, let’s dive into the new features!

OP Viewer Parameter

On the common page, you’ll now find an Operator Viewer parameter which allows a specific operator to be shown in the Engine COMP’s viewer. Although a seemingly small change, this is a great improvement for working with the Engine COMP, allowing users to highlight particular CHOP channels, textures, etc. in the node itself, rather than having to output the data from the Engine COMP to be viewed via a Null OP.

engine comp touchdesigner

Asset Paths Parameter

The new Asset Paths parameter defines whether relative paths in the Engine COMP are based on the Project .toe file or the External .tox file. Depending on how your project and/or .tox are structured, it’s great to now have the flexibility to choose how relative paths are dealt with.

The Advanced Page: TouchEngine Process Parameters

Next up is the new Advanced page! We’ll look at the Launch Engine Process and Quit Engine Process parameters first. These allow for control over the Engine process independently from the loading of the component. Being typical TouchDesigner parameters, this means the Engine process state can be controlled via code as well!

On Create Engine COMP Parameter

The Advanced page contains one more great new parameter: On Engine COMP Create. With this parameter, users now have the option to define what will happen when the .tox file is loaded. As helpfully pointed out in the release notes, this parameter also comes into play when the Engine COMP is created through copy and paste. When used with the new Launch/Quit Engine Process parameters, you can now choose to “Do Nothing” on the creation of the Engine COMP, and trigger the launching of the process at a later point.

Error Reporting Improvements

Any errors generated by the loaded .tox file are now shown in the pop-up info text! No doubt this will make development and troubleshooting with the Engine COMP a lot simpler, as it provides the error message and operator which generated it.

engine comp touchdesigner

onError() Callback Function

Along with the new error reporting improvements, there is an associated onError() function in the Engine COMP’s Callbacks DAT, which is run when an error is generated. While we’re here, it’s also worth pointing out that a new onDone() function has been added as well, which we’ll cover shortly.

engine comp touchdesigner

Custom Colors

Like most other operators in TouchDesigner, the Engine COMP now supports user selected operator colors. There’s not much to add here, but it’s definitely a plus for project organization and highlighting certain functionality!

engine comp touchdesigner

Core Controls: The New InitStart Parameter Page

Modeled after the Timer CHOP, the new set of parameters on the InitStart page offer a similar set of core controls. At the top, the Pre-Roll parameter allows for the setting of a pre-defined amount of time for the component to run before it transitions to the Initialized state. Next, the Ready when parameter allows a choice of three options for specifying when the transition to the Ready state occurs: component loaded, output buffered, or component running.

engine comp touchdesigner

On Done Parameter

After the familiar Initialize/Start/Play options are the Go To Done and On Done parameters. Like the Timer CHOP, these also have a corresponding callback function called onDone() as well as a Python command goToDone().

engine comp touchdesigner

Get Our 7 Core TouchDesigner Templates, FREE

We’re making our 7 core project file templates available – for free.

These templates shed light into the most useful and sometimes obtuse features of TouchDesigner.

They’re designed to be immediately applicable for the complete TouchDesigner beginner, while also providing inspiration for the advanced user.

New Docked Operators

Although the Engine COMP already contained a docked Callbacks DAT, it now has two additional docked operators which provide further information about its current state and performance.

Docked Info CHOP

An Info CHOP now comes docked to the Engine COMP, but that’s not all! A variety of new Info Types and CHOP channels have been added to provide further performance/status information. The new Info Types include:

  • Initialize Start, which includes information about the features from the new InitStart page of parameters
  • TouchEngine Status, which includes information about the process and component state
  • TouchEngine Perform, the new name for the previous Engine Perform type

Here’s a look at some of the CHOP channels that have been added:

  • output_cook_abs_frame (General Info Type)
  • engine_absolute_frame (TouchEngine Perform Info Type)
  • engine_absolute_seconds (TouchEngine Perform Info Type)
  • initialize_fail (Initialize Start Info Type).

To get an idea of all of the channels that appear under each of the four categories, take a look at the images below. A lot of information is available!

engine comp touchdesigner
Channels available under the General Info Type.
engine comp touchdesigner
Channels available under the TouchEngine Status Info Type.
engine comp touchdesigner
Channels available under the Initialize Start Info Type.
engine comp touchdesigner
Channels available under the TouchEngine Perform Info Type.

Docked Info DAT

A docked Info DAT has been added, which includes the process ID of the engine process, found under engine_pid.

engine comp touchdesigner

Wrap-Up

Phew, that was quite the overhaul! These improvements are sure to make the Engine COMP a star player in the TouchDesigner developer’s tool kit for years to come. It’s great to see that this powerful feature continues to be thoughtfully developed.

If you’re looking to dig into the Engine COMP further, it’s well worth checking out the Engine COMP page in the TouchDesigner wiki!