Viewers


About Viewers

You can create as many Viewers as you want, each dynamically being updated in any channel you choose from any node you choose. This means you can watch the behavior of a function as it modifies an alpha mask in both a Viewer looking at the alpha mask, and a second Viewer looking at the composite itself..

The Viewers take up memory, so if you are doing a render, you might want to close your higher-resolution viewers. Additionally, the more Viewers you have active, the slower your display rate will be. If you are getting strange Viewer behavior, free up some memory, or delete them and create a new one by hitting N.

If you have multiple Viewers, double-clicking in a Viewer window will select that Viewer and display the currently viewed node in it. The next time you click on the left side of a node to view it, it will display in this Viewer.

You can create a separate Viewer workspace to be used on a second monitor with the menu function View: Spawn Viewer Desktop. This only works if the second monitor is being run from the same graphics card.

In order to protect you from accidentally rendering an enormous image (whoops - put 200 instead of 20 into your scale parameter?) the Viewer's resolution is limited. This limit is configurable (see Maximum Viewer Resolution). It has NO effect on rendered images, it only crops the view in the GUI to the set resolution.


Looking at images in a Viewer

Click on the left side of a node to load that node into the current Viewer. If you double-click, you also load that node's parameters into the Parameter Workspace.

If you scrub with the mouse in the Viewer, it will print out the x, y, r, g, b, and a values in both the title bar of the Viewer, and in the help window in the bottom left corner of the entire interface:

The Pixel Analyzer can help you analyze this data as well.

If you Ctrl+scrub with the mouse in the Viewer, the values will be printed out in the shell window that launched Shake.


The Viewer Buttons

Many buttons have correspond to a right mouse menu selection with the same function. You can also select the setting from the menu.

Some Viewer functions have number keys to cycle through them, i.e. 2 will toggle through the channels. Shift+2 will toggle backwards.

Function
Keyboard
Notes
  Drag the cursor over the window and X and Y position, and RGBA color values are printed in the top of the screen
F Fit the Frame to the Image.
Shift+F Fit the Frame to fit the entire Viewer Workspsace. When this button is down, the Viewer "sticks" to the Workspace. You can therefore resize the workspace and the Viewer will expand to match.
Right Menu: Delete Deletes the Viewer. A good strategy if anything bizarre is happening. Create a new viewer by hitting N
1 Buffer tabs. You can have two different buffers in a viewer so you can easily compare images. See below on how to use them.
R,G,B,A,C
2/Shift+2 cycle
Toggles through different color channels.
3/Shift+3 This update mode will display a rendered image only after it is finished rendering. This is for when you have relatively fast renders.
3/Shift+3 Scrolling update mode. This displays each line, starting from the bottom, as the image renders. Used for slower renders.
3/Shift+3 No Update. The Viewer will never update until you turn this off. Use this to load an image into a Viewer, then switch to the second buffer (see below) and do some changes. You can then compare it with the original.
  When this is up, you cannot see on-screen controls for nodes that are not upstream of the currently viewed node.
  When this is down, you can see the on-screen controls for any node regardless of what node you are viewing. This is usually used while viewing a FileIn and creating a mask with QuickShape.
  Incremental Viewer Update. We've added a mode in the Viewers to only update the portion of the image which changes. As an example, if you composite a 10x10 pixel element on top of a 6k plate and panned it around, the entire 6k plate would have to be updated. Now, only the actual 10x10 pixel area is updated when this is turned on. There are still a few update glitches, mainly when doing filter operations. To fix this, turn off the Incremental Update and adjust again - it will be corrected. If we fix this problem the button may disappear entirely. This button has no effect on the output file or batch rendering speed, only on the image in the Viewer.
4/Shift+4 Viewer Scripts. These are scripts applied to an image just in the Viewer; the actual output image to disk would not be modified. An example of this is to apply a DelogC operation to images you want to keep in log space, but see in linear space. See below on how to use these.
5/Shift+5 Off Compare mode. Only one buffer is displayed.
5/Shift+5 Horizontal Compare mode
5/Shift+5 Vertical Compare mode
5/Shift+5 Fade Compare mode
  The slider to control the compare display.
  ROI/Frame display toggle. This will display the green Region-of-Interest (either created automatically by Shake, or manually with SetDOD) and the red border.
Home Centers the image and sets the zoom level to 1:1.
Ctrl+F Fit the image to the Frame. Be careful, since you may get a non-integer zoom (i.e., instead of 2:1, you get 2.355:1), which might give you display artifacts. We don't recommend this one when massaging pixels.
 

Flipbook button to render a RAM-based image player.

Left Mouse: Render with the current settings
Right Mouse: Render Setting Page. For information on this page, jump to The Flipbook Parameters Window under Title Bar Functions and Buttons.

These generic buttons appear for many functions with on-screen controls. For more information on on-screen controls, jump to On-Screen Controls.

Function
Notes
AutoKey is on. Whenever you move an on-screen control, you will be entering a keyframe.
Always display the on-screen control when those parameters are loaded.
Turn off the on-screen control display when actually modifying the image. They return when you release the mouse.
Turn off the on-screen controls.
Delete Key at the current frame. This is used because controls for functions like Move2D enter keys on xPan, yPan, xScale, yScale, and angle simultaneously. Therefore, Delete Key will delete from all of these parameters.
X/Y Lock Button. This indicates that you can move a control in both X and Y directions.
This indicates that you can move a control in only the X direction.
This indicates that you can move a control in only the Y direction.
Press this to change the color of the on-screen control.
Motion Path Display Button. This will display both the path and the key positions. You can grab the keys and move them on-screen.
This will display just the key positions.
This will not display the path or the keys in the Viewer.

 

The Viewer Hot Keys

Also, see above for keyboard equivalents to Viewer buttons.

Keyboard
Notes
N Create/Copy New Viewer
F Fit frame to image
Shift+F, Fit frame to window
Alt+drag Pan image
+/- Zoom image in Viewer
Home Reset view
R,G,B,A,C Toggle Red, Green, Blue, Alpha, and Color views
 

The Right Mouse Menu

Function
Keyboard
Notes
Clone Viewer N Creates a copy of the present Viewer
Delete Viewer   Deletes the Viewer.
Tweak Current Viewer Script   Loads the currently selected Viewer Script (see below) into the Parameter1 Tab.



Using the Compare Buffers

You can load two images at once into a Viewer by using the A and B buffers. In this example, I have pulled a bluescreen key with Primatte. I want to compare the result with the original bluescreen image.

Make sure buffer A is open, and load the Primatte node into the Viewer as you normally would, by clicking on the left side of the node.

Switch over to buffer B either by clicking on the B tab, or by hitting 1 (above the Tab key, not on the NumPad). Load the FileIn of the bluescreen image.

Now, by hitting 1 repeatedly, you switch buffers. Naturally, you can also press the A and B tabs.

Now click the Compare button to vertical mode . Nothing happens until you move the slider at the bottom of the Viewer left and right to reveal the second buffer. You can press the Compare button again to use other compare modes. To remove the compare, switch off Compare .

Be Careful: A common mistake is to move the Compare Slider all the way to the left and right, making the current image disappear, revealing only the background image. Therefore, when you change a node parameter, you don't see any updates, which makes you angry at us, which makes us unhappy, too. To save you from this regrettable error, make sure you turn off the Compare mode.



Using the Viewer Scripts

You can apply an arbitrary tree to a Viewer. These Viewer Scripts are just macros that are applied to your image after they are calculated in your process tree, and visualized in the Viewer. The effect is not passed out to disk if you write an image; its effect is only in the Viewer.

Be Careful: When scrubbing for values with the cursor, or in Primatte or the Pixel Analyzer, you will see the modified values, not the original values in the script. Therefore to truly determine pixel values, turn off the Viewer Script if the script changes image color.

Shake comes with 3 default Viewer Scripts. Click with the Right Mouse button on a Viewer and select Tweak Current Viewer Script to see the parameters for a Viewer Script

  1. Overlay Script

    chartOverlay: video (0), 1.85 (1), off (2)
    videoSafe: off (0) or on (1). This will apply the VideoSafe operator to the image.
    matteOverlay: When on, this will display the the alpha mask as a red overlay.

  2. DelogC Script

    Applies a DelogC operator, with the standard parameters.

  3. SetDOD Script

    This applies the SetDOD operator.

You can designate a Viewer Script in the same way as you would a macro (see Customizing Shake), except that they go in the ui Directory, i.e., $NR_INCLUDE_PATH/startup/ui/something.h. They are declared like this:

image ViewerScript1_(image img, int chartOverlay = 0, int videoSafe = 1, int matteOverlay = 0)
{
    return Overlays(img,chartOverlay,videoSafe,matteOverlay);
}

image ViewerScript2_(image img, float rOffset = 0, float gOffset = 0, float bOffset = 0, float black = 95, float white = 685, float nGamma = 0.6, float dGamma = 1.0, float softClip = 0)
{
    return DelogC(img,rOffset,gOffset,bOffset,black,white,nGamma,dGamma,softClip);
}

image ViewerScript3_(image img, int left=0, int right=width, int bottom=0, int top=height)
{
    return SetDOD(img,left,right,bottom,top);
}

NOTE: You must declare default arguments for the parameters, except for the input image.

When declaring a parameter setting for a Viewer Script, you preface the parameter with the Viewer Script name, not the function it calls internally, i.e.,

nuiDefSlider("ViewerScript2_.rOffset",	-180,	180);

The Overlays function is in include/nreal.h, and is not immediately available as a process tree node.

 

Viewing a Z-Channel

Although you can't see the alpha in a Viewer, you can place a Key - DepthKey on an image and adjust the depth parameters as you view the alpha channel. If you keep the image in float (4 bytes) with the Bytes operator and do a Reorder rgbz, you will be able to see the numeric values when you scrub with the cursor on the alpha channel. This is an ideal candidate for a Viewer Script...