Virtual File System

From Derivative
Jump to navigation Jump to search

TouchDesigner's Virtual File system (VFS) allows image, movie, audio, fonts, other media and any files to be embedded in a .tox or .toe file. You can open and read them as if they are files in the filesystem. This makes .tox and .toe files more portable if they depend on images or sounds or font files.

Tip: Use the virtualFile component in the Palette (under Tools) as a user interface for VFS as it hides the scripting that is otherwise necessary. Read the readMe in that component.

It will of course make your .tox and .toe files larger by whatever the hard drive file size is, but one virtual file can be referred to by multiple OPs at the same time.

Internal files can be addressed directly with the vfs: prefix. Example: vfs:/project1/test.jpg

The 'virtualFile' component lets you embed any file inside the component. You just pick a file, press Create Virtual File, and refer to it with the path that you see. You can create as many as you want.

(At a more basic level is the vfs command in Tscript, which is what the virtualFile component uses.)

All Operators that open files, like the Movie File In TOP and Audio File In CHOP understand the VFS syntax. Unlike locking a TOP where the image saved in the .tox/.toe is compressed with LZW, a Movie File In TOP that refers to a .jpeg file in VFS, it remains fully JPEG compressed.

VFS can hold entire movie files and audio files including H.264 and .mp3 files. It can also hold .ttf font files and in some circumstances, .dll files for the CPlusPlus TOP, CPlusPlus SOP and CPlusPlus CHOP.

Together with the Privacy option (can be set using TouchDesigner Pro only), VFS allows for additional privacy of media built into your TouchDesigner .tox/.toe files.