Playback Performance

From VFXPedia

Jump to: navigation, search

For the purpose of this page, we are talking about the playback of an image sequence from memory using the buttons located below the Time Ruler.

If playback performance isn't real-time, it is frequently when attempting to play something like 2K float32 Cineon frames or HDTV 1920x1080 float16 at 100% magnification in a view. The first thing to know about playback performance is that the datatype (int8/int16/float16/float32) of the image sequence makes a big difference. For most computers, playing back an int8 sequence is not difficult. The problems typically arise when trying to playback floating point data, as it is much more memory intensive and support for floating point in graphics hardware is only partial, driver code paths are not all fully optimized, and FP-capable hardware is just becoming mainstream (as of late 2006 - Nvidia's G80 being the first GPU with full 32bit FP support).


Make Sure the Sequence is Cached in Memory

The first thing you will want to do is make sure the entire sequence that you are playing back is being cached in memory. You can see which frames of a sequence are cached by looking at the green memory cache line in the timeline. If the sequence you are playing back is too long to fit into the available memory, Fusion will be forced to recreate/reload the missing images, slowing down playback. If this is the situation you are experiencing, you can do the following:

  • Reduce the length of the image sequence you playing back by adjusting its extents in the timeline.
  • Use a lower bit depth if you can. Using int8 instead float32 means each frame is using a fourth as much memory which in turn means you can cache frame sequence four times longer. You could add a ChangeDepth tool set to int8 and view that.
  • Unview any tools you don't need to see. If you are viewing tool0 in view 0 and tool1 in view 1 during playback, Fusion will attempt to cache both, wasting memory. Also avoid splitwipe mode if you can since both images need to be cached. Even if you are viewing only buffer A, the tool viewed in buffer B will still render.
  • If you have more than 2GB of installed memory and are running a 32-bit version of Windows XP, try booting with the /3GB switch.
  • Add more memory to your machine. Sometimes this will help and sometimes not, depending on how much memory you already have installed and how much memory (address space) the operating system can assign to an individual process.
  • Set Preferences->Memory->Caching Limits higher. This will allow Fusion to store more frames of data in memory. In general, we recommend a value between 50% and 80%.


Things You Can Try

After you have verified that the whole sequence is being cached in memory, here are some more things you can try:

  • Update your graphics card drivers. Fusion 5 takes advantage of newer OpenGL extensions that older driver revisions did not support or had not been fully optimized yet. We have seen playback go from 2fps to over 200fps simply by changing drivers. You should also be aware that certain driver revisions are buggy and will cause problems with Fusion. After updating your driver it is a good idea to check if your playback speed increased or decreased. In particular, if you working with a dual monitor system, Nvidia card, drivers older than 91.82 and are experiencing playback problems, we strongly recommend you update your drivers.
  • If you are viewing a Saver, view the tool upstream of it instead of the saver. Savers cannot be cached and will issue a request upstream. The process of issuing the request can slow playback down substantially, around 25-35%.
  • Make sure no onscreen controls are being drawn. You can do this by unselecting all tools by clicking on a blank area of the flow, or by disabling control display in the view. Some tools' onscreen controls don't slowdown playback appreciably, others can slow it down by a factor or 4 or 5 times. Complex polylines and masks are a good example. Merge and Transform can be bad offenders especially if Preferences->Tweaks->Image Overlay is not set to None.
  • Check that no animated controls are visible in the Controls Area. If an animated control is visible, Fusion will attempt to update it during playback. This update can sometimes cause a complex series of input evaluations which can slow down playback significantly.
  • Make sure the Some/None/All button is set to Some, so that only the necessary tools are rendered.
  • Make sure Preferences->Tweaks->OpenGL->Disable View LUT Shaders is not set. When this checkbox is selected, the view LUTs will applied in software each time a frame is rendered. When it is unselected, the view LUTs are applied using a shader on the GPU, which is much faster.
  • Try disabling the views LUT to see if this improves performance, especially if you are using a macro as a view LUT. Instead of using the view LUT you could alternatively apply your LUT in a ColorCurves tool instead. If you are working with floating point HDR, one cool trick is using a ColorCurves tool to do your LUT and then apply a ChangeDepth to 8 bit (remember that your monitor only shows 8 bit information anyways). This will playback much faster since 8 bit sequences play faster. You can even macro the CCv and CD together.
  • Make sure view normalization is turned off. Turning it on can slowdown playback substantially.
  • Try changing the Texture Depth preference. Some systems may be faster with int8 selected, others may be faster with Native selected.
  • Turning off the chequer underlay can speed things up slightly.
  • Turn off vsynch (Vertical Synchronisation) in your graphics card's control panel. vsynch controls how your monitor's and graphics card's refresh/redraw rate are related. Turning off vsynch will cause tearing during playback, which many artists find to be unacceptable.
  • Upgrade your hardware. The most important things for fast playback in Fusion 5 are a fast FSB and a PCI Express graphics card. Fast pixel shader performance can also help, if you use view LUTs. See the Choosing Hardware for Fusion page for more information.
  • Try a third party solution like FrameCycler. Fusion is a much more generic application than a specialized playback utility. We have considered writing a simple playback utility that the user could launch from within Fusion that could be specialized towards just doing playback. If this is something you'd like to see you can submit a request to mailto:requests@eyeonline.com.


How to Measure Your Playback Speed

Here I'll describe how you can measure your playback speed. Then I'll list what we get on some of our systems for you to compare with. You'd think to measure playback speed you'd just slap down a loader and watch it play back, but there are some caveats to be aware of, so follow carefully.

1. Close all programs on your computer. This includes your email client, your instant messaging, your web browser, your antivirus scanner, Winamp or whatever. Check in task manager to see that nothing non-essential is running. Also check there are no services running that don't need to be.

2. Go to your graphics card's control panel and disable vsynch. This allows your redraw rate to go higher than your monitors refresh rate (don't forget to re-enable it after or you will see tearing during playback).

3. Start Fusion. Start a new composition if you don't already have one.

4. Go to Preferences->Frame Format->Settings->Frame Rate and set it to 999fps. You'll probably want to only change this setting for the composition you are working on and not in the globals section.

5. Drop a FastNoise tool onto the flow and set its seethe rate (not the seethe!) to something non-zero. This will force it to generate a new image each frame. Set the size controls on the FastNoise to the size you want.

6. Now view the FastNoise. Make sure that the view is at 100% magnification, smooth resize is off, chequer underlay is off, the view lut is disabled, and the 1-1 viewing option is enabled. Enlarge the viewport until all the pixels in the FastNoise are visible. All of the pixels must be visible at 100% magnification - do not change the view's scale to make the FastNoise fit. You may have to increase your monitors resolution if the FastNoise won't fit completely in the view.

7. Now adjust the extents on the Time Ruler so that all the frames of the FastNoise will fit into memory. No need to go more than 200 frames.

8. Press the play button. Allow the FastNoise to play back until it is cached in memory. Check the green memory cache line to be sure. If its not fully cached, reduce the extents on the Time Ruler. Now deselect the FastNoise tool so its controls are no longer showing in the view.

9. You can now read the framerate from Fusion's statusbar. Note that as the time marker loops around the framerate will hitch and increase slightly. You don't want to count this value when measuring the framerate.