If I have for example three different kinds of montages (top level layer groups, different “scenes” of visual outputs) in one project, and these groups are exclusive, in as these top level groups are never OUTPUT at the same time (they are three different “cuts”), will VDMX then ignore the processing of the layer groups not currently being displayed?
It might be tricky to understand my question, I’ll explain for example with a simplified project structure:
Project top layer
----Montage Group A
--------Layer A.1
--------Layer A.2
--------Layer A.3
----Montage Group B
--------Layer B.1
--------Layer B.2
--------Layer B.3
----Montage Group C
--------Layer C.1
--------Layer C.2
--------Layer C.3
If Montage Group A is rendered, but the two others not, will they still be calculated…?
All these Montage Groups are by themselves hidden. Then I have a “top” layer, and the source for this top layer is a media bin selecting between these Montage groups as internal layer sources, so i can shift live between the different complex montages. So I’m constantly “cutting” hard between very different aesthetics and visual setups.
This is a very simplified explanation of it, the projects/montages in real life are very large and each main group are four-five levels deep with 10-20 layers all referencing and using the same multiple live camera setup. So it taxes the system.
Does VDMX then ignore and “save CPU” cycles by consciously NOT rendering and processing everything in the other two groups? Or is everyting invisible also always calculated and processed?
Simply put, everything is rendering, even if it is not visible in the main output. Consider this situation: You have a source playing on Layer 1 and a VVMotionBlur effect on the layer, which works by blending each frame with the previous one. We have to continue rendering things so that when the layer does become visible, it looks like it should. As most effects formats, eg CoreImage, FFGL, don’t really support any way for us to know whether or not they need this sort of continuous rendering, it’s kind of impossible for us to make those kind of optimizations. To be clear, this is just one weird edge case, at the end of the day the road to this kind of optimization is fraught with so many potential issues that we don’t go down it.
If something isn’t being composited, we do skip that portion of the rendering. Eg hidden layer / groups are skipped when it comes to blending them with other layer, which can be a significant savings when working at very high resolutions. Layers with no source are for the most part skipped.
There is an option in the prefs under Rendering specifically for movie playback that you can disable, “Apply FX to duplicate movie frames” - when this is disabled, frames from movies will only be pushed through their FX chain when a new frame is received, instead of every time the canvas refreshes. So for example, right now if you have a 30 fps movie, and your canvas is refreshing at 60 fps, the FX on each frame are being rendered twice. This is actually a good thing, because the values of your FX may change within that 1/60th of a second, even if the input frame does not. However, if you really need to optimize your setup, you can try this out.
Another optimization you can try is the ‘Skip Canvas Rendering’ - when this is enabled, VDMX will draw directly to the main output window. The downsides of this are: (1) You can’t preview the main output and (2) you can’t apply FX to the main output.
The main output of VDMX renders in sync with your main display. If you go into System Preferences under Displays, often you can specify what this refresh rate is. On my desktop machine that has a 4k gaming monitor connected, the default refresh rate is 120 hz, which is more than I usually want when working with video.
Note that just like the video out, VDMX (and everything else in the OS) has to draw (and re-draw) your interface constantly. In the ‘General’ section of the preferences you can throttle the UI Item rendering. Your sliders will re-draw less frequently, but you’ll save some system resources for your visuals.
I know people who making eg their own custom Unity apps that they use as sources alongside VDMX, communicating via Syphon & OSC, and often they’ll have as part of those setups an ‘on / off’ switch that tells their external apps to start / stop rendering when needed. Something like this can be a button in a control surface that follows the value of the opacity on the layer being used to display the input.
As a minor note of clarification, for the most part video rendering in VDMX happens on the GPU, not the CPU.
Great question and excellent notes from David. I work the same way as @GMM and this will make me think about how many layers I’m using. Although Apple Silicon with decent memory seems to cope pretty well when you pile them on :)