TouchDesigner in VDMX6 Plus
TouchDesigner is a node-based development environment, similar in many ways to Quartz Composer while at the same time having a lot of fundamental differences that make it a substantially unique environment with a vibrant user community that often overlaps with Quartz Composer. You can find more information here: https://derivative.ca
TouchDesigner shares many of the same benefits as Quartz Composer, and accordingly we have made it an integral part of VDMX, which has many different ways to work with TouchDesigner.
Example compositions
The VDMX6 Plus dmg Extras folder contains example compositions to help get started with making TouchDesigner compositions to use in VDMX.
To install the demo files on your machine, go-to the VDMX assets folder located at: "~/Library/Application Support/VDMX/"
- You can use the “Open Assets Folder in Finder” option in the VDMX help menu to jump to this directory).
- You may have to create some of the folders yourself.
Use TouchDesigner sources in VDMX
TouchDesigner compositions require some minor modifications before they can be used in VDMX sources and effects, as demonstrated in the example compositions.
Once your compositions are ready to use in VDMX, the quickest way to get your TouchDesigner compositions doing something in VDMX is simply to drag them into a media bin (or choose "Import Media" from the file menu) and trigger them on a layer. There will be a delay of a few seconds the first time you trigger it while TouchDesigner compiles your patch, after which it will be played on your layer just like any other media file.
If your TouchDesigner composition has any published inputs, VDMX will automatically create UI items of the appropriate type (slider, button, color picker, text field, video source picker, etc) for them.
Passing control data and images from VDMX into patches using Published Inputs
TouchDesigner consists of objects which are connected together with patch cords. A complete description of how to use and work with TouchDesigner is beyond the scope of this wiki (TouchDesigner's documentation is excellent).
- Image-type inputs will be represented in VDMX as a pop-up button with a list of all available video sources (other layers, video inputs, syphon sources, etc).
- Real- and Integer-type inputs will be represented in VDMX as sliders. TouchDesigner lets you set a default min and max value (right-click on the published input and choose "Edit Details" to set this)- the slider in VDMX will have its range set by these values.
- Color-type inputs will be represented in VDMX as a standard RGBA/HSVA color picker.
- Boolean-type inputs will be represented in VDMX as toggle buttons (on/off).
- Point-type inputs will be represented in VDMX as a 2d point picker. The range of the values VDMX passes to TouchDesigner will be based on the dimensions at which the TouchDesigner composition is being rendered (VDMX passes pixel-scale coords to TouchDesigner, which at this time does not offer a way to specify the min/max values of its point-type inputs).
- Text-type inputs will be represented in VDMX as a text field.
- If you have a string-type input published with "FontMenu" anywhere in its name, VDMX will create a pop-up button with a list of all the system fonts (the name of the font will be passed to TouchDesigner when you select it).
- If you have a number-type input published with "VDMXBPM" anywhere in its name, VDMX will automatically pass the BPM of your clock to your composition. No UI item is created, this is handled entirely behind the scenes.
- If you have a number-type input published with "MeasurePosition" anywhere in its name, VDMX will automatically pass the measure position to this input as a value ranged 0.0-1.0.
Built-in TouchDesigner sources
VDMX offers a number of built-in media files and video sources that are quickly accessible in the "Use Source:" pop-up button in the layer source UI. If you want your TouchDesigner composition to be listed here, place it in the "TouchDesignerSources" folder in your VDMX Assets folder (choose "Open Assets Folder in Finder" from VDMX's "Help" menu). It will immediately be listed as an available effect in VDMX, and can be previewed in the Workspace Inspector's "Assets" tab or added to layers.
Making Video FX with TouchDesigner
If your TouchDesigner composition conforms to the "Image Filter" protocol, it can be used as an image filter in VDMX- just place it in the "TouchDesignerFX" folder in your VDMX Assets folder (choose "Open Assets Folder in Finder" from VDMX's "Help" menu). It will immediately be added as an available effect in VDMX, and can be previewed in the Workspace Inspector's "Assets" tab or added to layers.
TouchDesigner-based VDMX Plugins
TouchDesigner compositions can be used as plugins in VDMX- when loaded as a plugin, VDMX will not only create UI items for any published inputs in your patch, but any outputs you publish will be made available in VDMX as either a video source (if the published output is an image-type splitter) or a data source (if it's a bool/number/color/string/etc). This allows you to use TouchDesigner to program complicated mathematical or logical behaviors that both receive data from and send data back to VDMX. Place these .tox files in the 'plugins' directory of the VDMX Assets Folder.
TouchDesigner Text Sources- Using TouchDesigner to Render Text
Text files in VDMX can be triggered and played back on layers- you can customize how your text files are rendered by creating TouchDesigner patches that will be used to render text. To be used as a text source, your TouchDesigner composition must have a string-type input published as "FileInput", and it must be placed in the "TouchDesignerTextSources" folder of your VDMX Assets folder (choose "Open Assets Folder in Finder" from VDMX's "Help" menu). Once you trigger a text file, you can choose which TouchDesigner compositions is used to render its contents using the appropriate pop-up button in the layer source controls- VDMX will automatically display a browser for your text file that allows you to trigger individual words/lines/etc (these words/lines/etc will be passed to your patch via the "FileInput").
Important notes
- Using TouchDesigner compositions in VDMX6 Plus requires a TouchDesigner install with a valid TouchDesigner license on the same computer (Education, Commercial, or Pro). Non-commercial will not work.
- Each time you launch a TouchDesigner file, it launches a new instance of the TouchEngine. Keep this in mind when opening up multiple TD files at once as it can pull a lot of memory.