ProxyToggle Mechanism |
This set of files can be used to help you switch between different sets of pre-generated proxies. It has some problems, but once set up, it works, so there you go. When in place, it allows you to bypass the constant generation of proxies, and therefore allows for very fast flipbooks and network rendering.
The files are in the cookbook:
proxyTemplate.h: This goes in the include/startup/ui/templates directory. This is a template file, which is a file that Shake checks every time it is launched. It is different than a standard ui file, as it can create extra parameters at your disposal. In this file, I have pre-set the relationship between the high, medium and low resolution plates, as well as set some logic for pixelScale and pixelRatio to check which file set should be used.
proxySelect.h: This is an Image node that acts as a Select switch between three image inputs. The select is based on if you have hit the low res, med res, or high res button in the Globals' localParameters area. This goes in your include/startup directory. For more information on this, jump to Customize Shake.
proxyselectUI.h: This loads the ProxySelect node into the Image tab. It goes in the include/startup/ui directory. I have already included the icons in the icons.pak file.
globalProxyToggleUI.h: This ensures that you have the right button behavior for the proxyToggle . It also goes in the include/startup/ui directory. I have already included the resolution buttons in the icons.pak file.
It works like this:
shake hi_res.#.cin -z .5 -fo med_res.#.cin -t 1-100 -v
shake hi_res.#.cin -zoom .3515 .1496 -bytes 1 -fo low_res.#.iff -t 1-100
-v
This generates 100 cineon files of 1024x778 (squeezed plates), and 100 720x232 8 bit iff files (flattened plates).
Read in all three file sets, and feed them into the ProxySelect node in the Image tab from the cookbook.
You will probably want to group these:
The proxy information will be saved into the script, so you don't need the templates file on your network render machines, just when initially setting up the script. All of the appropriate information should be saved into the script that you are rendering.
To disable a template file, I simply remove the .h extension on the templates file.
Warning 1: This switch is for the entire script, not just branches.
Warning 2: All files must have the same relative size differences, though I suppose you could rework the macros to place the scaling factors in the ProxySelect switch itself.
Warning 3: Don't modify pixelScale or pixelRatio, or you will lose your expressions. You can, howeve, use proxyScale and interactiveScale.
Feel free to let me know how this works. Ideally, we will wrap this into the interface in a more elegant manner in a future release.