A framework solution to play a sequence of images inside Qlab using a Quartz custom composition.

Qlab Image Sequence

In the “Prometeu” project framework we used Modul8 as the visual effect (animation/video) engine. Since Qlab now supports video output with multiple live camera feeds,  custom surface mapping and Quartzcomposer compositions for visual effects we have chosen Qlab as the main visual engine.

But Qlab version 3 uses Quartzcomposer as an image processor only and does not allow object rendering like sprites, billboards, cubes, spheres, or meshes. There are other things  that are not allowed to be used in quartz-composer via Qlab custom composition, like: patch time, movie importer, stop watch, interpolation.  Things that are related to time and image buffer brings serious issues and won””””t work as expected.

Because in the project “Peregrinação” we use a lot of chroma key, motion was a requirement inside quartz-composer.
Although i knew some of the quartz limitations through Qlab i started to search a solution to play videos using quartz. The first experiment i´ve made was to use syphon witch i explain in another post. Then, i found a different approach, loading and playing a series of images.

You can download all the files above (press more)

Framework

A cue in Qlab with a Quartz custom composition [Q-imageSequence.qtz] that sends the image from Qlab to Quartz witch returns a composition with the received image and a sequence of images. We also need another application running, in this case, a quartz composition that feeds time to the quartz composition that runs from inside the Qlab. This compositions [Q-timer.qtz] is used as a workaround to provide time to the other Quartz composition that is somehow frozen. Actually, it works as a counter, a value that increases through time and is connected to the file index. 

I use MIDI and OSC to send and receive messages between applications and compositions. The counter that is generated in [Q-timer.qtz] is sent via MIDI to [Q-imageSequence.qtz] composition because OSC doesn””””””””t work

[Q-imageSequence.qtz]

quartz composer

q4

Directory Scanner returns a list of files that are found inside a specific folder that is sent from an outside OSC command “/filme” in this case, from Qlab. Directory Scanner returns a structure that is divide into the index of the file and the identification of the file to be passed into the image importer.

q2
Structure Index Member 1

q3
Structure Index Member 2

Directory Scanner also sends the file list to a Structure Count  returning the total number of files inside the folder. This number is subtracted by 1, because the index starts at 0. The remainder of the division  (modulus %) from the total number of files and the decompressed counter (a float between 0 and 1 that is multiplied by 1000) that is sent via MIDI from Q-timer returns the index number to be sent to the structure of files identifying the specific file. This number is always increasing until it reaches the total number of files, in this case, it goes back to the starting number 0.

q5

The Image Importer receives the full path, loading and sending the images to a Source Over object. This, makes a composition between the received image from Qlab and will stay in foreground and the image sequence witch remains in the background, the result image is sent to Qlab.

[Q-timer.qtz]

qtimer

Q-timer composition is used as a workaround to the Qlab time issue. This compositions acts as a counter sending the result number via MIDI to Q-image-sequence.qtz that is running inside Qlab.
And why is this composition so complex ?
Because we need to send the values via MIDI, and the value must be a float between 0.oooooo to 1.000000. Unfortunately Qlab messes with OSC messages witch are received in chunks of time randomly. Basically, if we send a continuos increasing number with OSC to the composition running from QLAB, the image sequence jumps from one frame to another randomly, like if the index stops and starts at random positions. Very strange behavior.

q6
Quartz composition – Midi control overview

First the composition listens to a certain MIDI Channel for a start/stop or reset message. This MIDI messages are sent from Qlab as a control messages and in QuartzComposer are identified as /foot /Portamento Tune and /Data Entry MSB. In Qlab this messages are identified only by number CC 4, CC 5, CC 6. This messages are received in Quartz and sent to a conditional state object which controls a stop watch object that takes care of counting time.

q7
Qlab cue list, MIDI messages to control the counting of time.

A Qlab cue sends a trigger to the correspondent action, a value of 1 fowled by a 0 using the fade over duration function triggers the quartz composer stop watch that can receives control messages to start, stop and reset the counting.
After a start message, the Stop Watch begins the counting of time.

q8

The time is multiplied by 25, which is our frame-rate (25 frames per second) and then compressed to the midi interval of 0.00000 to 1 dividing the value by 10000

q9q11q10
counting time                     multiply x 25fps     division by 10000

Finally, the value is sent to the other quartz composition via MIDI, but this value is also sent to another object. A conditional object that compares if the received value is equal to 1. If so, it means that we must reset the counter and start from 0 again sending this value to the reset input of the stop watch object.

q12
Conditional object that resets the counter when it reaches to 1.

q13
Qlab cue list

[wpdm_file id=2]

total size 247k
files inside the zip:

image-sequence.cues
Q-image-sequence.qtz
Q-timer.qtz
[sequence] folder with 7 images

please contact me if you have any comments or doubts: virtual.marionette@grifu.com

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.