4
Table Of Contents
- Shake 4 User Manual
- Contents
- Shake 4 Documentation and Resources
- Part I: Interface, Setup, and Input
- An Overview of the Shake User Interface
- Opening Shake
- Overview of the Shake User Interface
- Making Adjustments to the Shake Window
- Navigating in the Viewer, Node View, and Curve Editor
- Working With Tabs and the Tweaker
- Menus and the Title Bar
- Script Management
- The File Browser
- Using and Customizing Viewers
- Using Multiple Viewers
- Looking at Images in a Viewer
- Suspending Rendering and Viewer Redraw
- Controls in the Viewer Shelf
- Using the Compare Buffers
- Viewer Lookups, Viewer Scripts, and the Viewer DOD
- Using the Viewer’s Domain of Definition (DOD)
- Creating Your Own VLUTs and Viewer Scripts
- Viewer Keyboard Shortcuts
- The Viewer Shortcut Menu
- Node-Specific Viewer Shelf Controls
- The Parameters Tabs
- Using Expressions in Parameters
- The Parameters Tab Shortcut Menu
- The Domain of Definition (DOD)
- The Time Bar
- Previewing Your Script Using the Flipbook
- Setting a Script’s Global Parameters
- Adding Media, Retiming, and Remastering
- Using Proxies
- Using Proxies
- Using interactiveScale
- Using Temporary Proxies
- Permanently Customizing Shake’s Proxy Settings
- Using Pre-Generated Proxy Files Created Outside of Shake
- Pre-Generating Your Own Proxies
- Rendering Proxies on the Command Line
- Pre-Generated Proxy File References in FileIn Nodes
- Anamorphic Images and Pre-Generated Proxies
- How Proxy Paths Are Defined
- Proxies of YUV Files
- Organizing Proxy Files
- Full-Resolution Proxies and Network Rendering
- Customizing the Format of Pre-Generated Proxies
- Pre-Generating Proxies Outside of the User Interface
- Using Pre-Generated Proxies in Your Script
- Keeping High-Resolution Elements Offline
- When Not to Use Proxies
- Proxy Parameters
- Compatible File Formats and Image Resolutions
- Importing Video and Anamorphic Film
- The Basics of Processing Interlaced Video
- Setting Up Your Script to Use Interlaced Images
- Displaying Individual Fields in the Viewer
- Integrating Interlaced and Non-Interlaced Footage
- Video Functions
- About Aspect Ratios and Nonsquare Pixels
- What is Anamorphic Video?
- Anamorphic Examples
- Properly Viewing Squeezed Images
- Node Aspect Ratio and the defaultAspect Parameter
- Compositing Square Pixel Images With Squeezed Images
- Inheritance of the defaultAspect Parameter for Individual Nodes
- 3D Software Renders
- Tuning Parameters in Squeezed Space
- Rendering Squeezed Images
- Handling Video Elements
- Preset Formats
- Table of Common Aspect Ratios
- Using the Node View
- About Node-Based Compositing
- Where Do Nodes Come From?
- Navigating in the Node View
- Using the Enhanced Node View
- Noodle Display Options
- Creating Nodes
- Selecting and Deselecting Nodes
- Connecting Nodes Together
- Breaking Node Connections
- Inserting, Replacing, and Deleting Nodes
- Moving Nodes
- Loading a Node Into a Viewer
- Loading Node Parameters
- Ignoring Nodes
- Renaming Nodes
- Arranging Nodes
- Groups and Clusters
- Opening Macros
- Cloning Nodes
- Thumbnails
- The Node View Shortcut Menu
- Using the Time View
- Using the Audio Panel
- Parameter Animation and the Curve Editor
- The Flipbook, Monitor Previews, and Color Calibration
- Rendering With the FileOut Node
- Image Caching
- Customizing Shake
- Setting Preferences and Customizing Shake
- Creating and Saving .h Preference Files
- Customizing Interface Controls in Shake
- Color Settings for Various Interface Items
- Custom Stipple Patterns in the Enhanced Node View
- Adding Custom Media Formats to the Format Menu
- Setting Format Defaults
- Assigning Default Width and Height to a Parameter in a Macro
- Setting Maximum Viewer Resolution in the Interface
- Default Timecode Modes and Displays
- Autosave Settings
- Undo Level Number
- Amount of Processors to Assign to the Interface
- Font Size for Menus and Pop-Up Menus
- Adding Functions to the Right-Click Menu
- Adding Functions Into a Menu
- Opening Scripts With Missing Macros
- Linking an HTML Help Page to a Custom Node
- The Curve Editor and Time Bar
- Customizing File Path and Browser Controls
- Tool Tabs
- Customizing the Node View
- Using Parameters Controls Within Macros
- Assigning a Color Control
- Assigning the Old Color Control
- Changing Default Values
- Grouping Parameters in a Subtree
- Setting Slider Ranges
- Adding Pop-Up Menus
- Creating Radio Buttons
- Creating Push-Button Toggles
- Creating On/Off Buttons
- Making a Parameter Non-Animateable
- Placing a Curve Editor Into a Parameters Tab
- Viewer Controls
- Template Preference Files
- Changing the Default QuickTime Configuration
- Environment Variables for Shake
- Interface Devices and Styles
- Customizing the Flipbook
- Configuring Additional Support for Apple Qmaster
- An Overview of the Shake User Interface
- Part II: Compositing With Shake
- Image Processing Basics
- Compositing With Layer Nodes
- Layered Photoshop Files and the MultiLayer Node
- Compositing With the MultiPlane Node
- Using Masks
- Rotoscoping
- Options to Customize Shape Drawing
- Using the RotoShape Node
- Drawing New Shapes With the RotoShape Node
- Editing Shapes
- Copying and Pasting Shapes Between Nodes
- Animating Shapes
- Attaching Trackers to Shapes and Points
- Adjusting Shape Feathering Using the Point Modes
- Linking Shapes Together
- Importing and Exporting Shape Data
- Right-Click Menu on Transform Control
- Right-Click Menu on Point
- Viewer Shelf Controls
- Using the QuickShape Node
- Paint
- Shake-Generated Images
- Color Correction
- Bit Depth, Color Space, and Color Correction
- Concatenation of Color-Correction Nodes
- Premultiplied Elements and CG Element Correction
- Color Correction and the Infinite Workspace
- Using the Color Picker
- Using a Color Control Within the Parameters Tab
- Customizing the Palette and Color Picker Interface
- Using the Pixel Analyzer
- The PixelAnalyzer Node
- Color-Correction Nodes
- Atomic-Level Functions
- Utility Correctors
- Consolidated Color Correctors
- Other Nodes for Image Analysis
- Keying
- Image Tracking, Stabilization, and SmoothCam
- About Image Tracking Nodes
- Image Tracking Workflow
- Strategies for Better Tracking
- Picking a Good Reference Pattern
- Picking a Good Search Region
- Manually Coax Your Track
- Identify the Color Channel With the Highest Contrast
- Delog Logarithmic Cineon Files Prior to Tracking
- Avoid Reducing Image Quality
- Do Not Track Proxies
- Increasing Contrast and Preprocessing the Image
- Tracking Images With Perspective, Scale, or Rotational Shifts
- Tracking Obscured or Off-Frame Points
- Modifying the Results of a Track
- Saving Tracks
- Tracking Nodes
- The SmoothCam Node
- Transformations, Motion Blur, and AutoAlign
- Warping and Morphing Images
- Filters
- Part III: Optimizing, Macros, and Scripting
- Optimizing and Troubleshooting Your Scripts
- Installing and Creating Macros
- How to Install Macros
- Creating Macros—The Basics
- Creating Macros—In Depth
- Basic Macro Structure
- File Name Versus Macro Name
- Loading Image Macros Into the Interface
- Typical Errors When Creating Macros
- Setting Default Values for Macros
- Changing Default Settings
- Attaching Parameter Widgets
- Inappropriate Behavior in All the Wrong Places
- Making Radio or Toggle Buttons
- Standard Script Commands and Variables
- Macro Examples
- Expressions and Scripting
- The Cookbook
- Cookbook Summary
- Coloring Tips
- Filtering Tips
- Keying Tips
- Layering Tips
- Transform Tips
- Creating Depth With Fog
- Text Treatments
- Installing and Using Cookbook Macros
- Command-Line Macros
- Image Macros
- Color Macros
- Relief Macro
- Key Macros
- Transform Macros
- Warping With the SpeedBump Macro
- Utility Macros
- Using Environment Variables for Projects
- Keyboard Shortcuts and Hot Keys
- Keyboard Shortcuts in Shake
- General Application Commands
- Navigating in Time
- General Windowing Keyboard Shortcuts and Modifiers
- Saving and Restoring Favorite Views
- The Viewer
- Flipbook Keyboard Shortcuts
- Tool Tab Keyboard Modifiers
- Node View
- Selecting Nodes
- Grouping Nodes
- Macro Shortcuts in the Node View
- QuickPaint
- The Curve Editor
- Parameters Tab Shortcuts and Modifiers
- MultiPlane Node Keyboard Shortcuts
- Keyboard Modifiers for Transform and MultiPlane Nodes
- Keyboard Modifiers for Color Adjustments
- Keyboard Shortcuts in Shake
- The Shake Command-Line Manual
- Index
958 Chapter 31 Expressions and Scripting
sign_mask.iff”, “Auto”, 0, 0);
Lovey = SFileIn(“/Server02/VolumeX/Scene12/truck/
truck.iff”, “Auto”, 0, 0);
MaryAnn = Mult(Lovey, mulVal, mulVal, mulVal);
Thurston = Outside(MaryAnn, Skipper, 1);
Ginger = Over(Thurston, Gilligan, 1, 0, 0);
3 Load the script into the interface with Load Script.
4 Open the local Parameters subtree in the Globals tab to reveal the mulVal slider.
In short, if you load a script to be modified in the interface, you probably want to
declare it as a curve type of data. If you are going to execute the script on the
command line and it is not going to change (that is, it is not animated), you can omit
the curve data type. There are some examples in the following sections.
Functions
Shake is a collection of functions. Some functions modify images, such as Blur. Some
return a number, like distance() (calculates the distance between two points) or cosd() (a
cosine function in degrees, not radians). Other functions build the interface, such as
nuiToolBoxItem. The nuiToolBoxItem function loads a button into the interface and
attaches a function to the button. When you call a function, you assign a variable to it.
The following example reads the angle parameter for the Rotate1 node, and returns the
cosine in degrees, assigning it to the variable named myCos:
curve float myCos = cosd(Rotate1.angle);
You can also use functions inside of other functions. In this example, the cosd function
is inside of a Rotate function:
Rotate1 = Rotate(FileIn1, cosd(45));
When you place a function inside of another, it is called a “nested function.” In both
cases, you call the function, and then enclose its parameters in parentheses. When you
assign a variable to a function, terminate the line with a semicolon, as shown in both of
the examples above. Everything in between the parentheses can be formatted
however you want, so the following two examples are identical:
Mult1 = Mult(FileIn1, 1,1,1);
and
Mult1 = Mult(
FileIn1,
1,
1,
1
);