Hook in VFX

In my job, I often get asked to customize a tool for a show to do a specific thing that CG, VFX, or dept supes want. These are things like generating some extra data when an artist publishes something or showing additional data in the video player about a take when it is being reviewed.

When this happens, first I assess the request to make sure we do not already have this ‘thing’ they want. Once that is done, one of two things happen. I either need to dig deep into the needed application and make a change to an already complex beast that has been messed with by countless people, or I just write a simple hook to do what they want!

A hook is a small script that ties into a larger application. Based on what it is it can run at the beginning, middle, or end of a process. They are particularly used a lot in VFX work because many applications in this field follow a dataflow design method. This means that a process can be injected anywhere along the dataflow to manipulate the data without messing with the core of the application.

By using hooks in your applications, you save a lot of ramp up time for new programmers working and reduce the chance of introducing bugs into the core of the application. You can also control feature creep since these new features are encapsulated and de-coupled from the main process.

Here are some examples of hooks you may see in the wonder world of movie making.

  • The CG supe wants to see some more information about the assets using in the shot, so a hook can be added to the end of the media creation process to add this data to the final movie’s metadata
  • Some information needs to be validated before an artist can check in a take. The checkin tool has a place to use hooks for validation. A hook at the start of the checkin process checks the data coming in.
  • Send an email when a render job is complete

Building a way to add functionality to your application without the need to modify the core process will greatly expand the maintainability of the process. A configuration file for you application can have references to functions that need to be run along the process so the programmer working on adding functions never even needs to check out the source code.

Leave a Reply

Your email address will not be published. Required fields are marked *