Variable Declarations
The naming of variables uses the same rules as C. A variable name must begin
with an alphabetical character, followed by none or more alphanumeric
characters or underscore character. It must not contain any white spaces.
All variables are initialized by Composite upon declaration, depending on
type:
■
Float variables are initialized to 0.
■
Color / vec4 variables are initialized to (0, 0, 0, 1).
■
Image variables are initialized to an uninitialized image. An uninitialized
image will return (0, 0, 0, 1) on sample(), has a pixel aspect ratio of 0, and
has a size of (0, 0).
Numeric Constants
Built-in Variables
PXL has built-in variables to ease script writing. These variables are “x”, “y”,
and “t”. The first two are the floating-point normalized image reference frame
(x, y) coordinates of the pixel being computed—see
Calculating Image Size in
Composite
on page 191. “t” is the floating-point current time, in seconds. All
built-in variables are declared constant by the system, so they cannot be
assigned to. PXL exposes the IRF coordinates of each pixel in its x and y built-in
variables. This means that in PXL horizontally adjacent pixels will have a
value of the x built-in variable that differs by 0.9 for an NTSC image. Thus,
an NTSC image (with 720x486 pixels) is actually 648x486 IRF units (720 * 0.9
= 648), which represents a 4:3 image aspect ratio (648/486 = 4/3), as expected.
Built-in Functions
PXL provides a number of built-in functions. Functions can return any of the
PXL fundamental types, or can return void. Built-in function argument
460 | Chapter 18 Pixel Expressions
Содержание 495B1-05A111-1301 - 3ds Max Design 2010
Страница 1: ...Composite User Guide ...
Страница 16: ...4 ...
Страница 18: ...6 ...
Страница 88: ...76 ...
Страница 92: ...6 A new composition has been created 80 Chapter 4 Start Compositing Now ...
Страница 101: ...8 The Render dialog appears Click the Start button to start the rendering process To Render the Composition 89 ...
Страница 102: ...90 ...
Страница 122: ...110 ...
Страница 126: ...114 ...
Страница 186: ...174 Chapter 9 Getting Familiar with Your Workspace ...
Страница 195: ...UdaTextField XML Resource Files 183 ...
Страница 196: ...UdaValueEditor UdaMenu 184 Chapter 9 Getting Familiar with Your Workspace ...
Страница 197: ...UdaPushedToggle XML Resource Files 185 ...
Страница 198: ...UDA Declaration 186 Chapter 9 Getting Familiar with Your Workspace ...
Страница 200: ...188 ...
Страница 250: ...238 ...
Страница 309: ...The stereo rig is ready to use You can adjust left and right eye convergence Setting up a Stereo Camera Rig 297 ...
Страница 310: ...298 ...
Страница 348: ...336 ...
Страница 399: ...About Blurs 387 ...
Страница 411: ...Output Controls The Output UI allows you to control the following parameters About Blurs 399 ...
Страница 450: ...438 ...
Страница 478: ...466 ...
Страница 520: ...508 ...
Страница 548: ...536 ...
Страница 578: ...566 ...
Страница 596: ...The last step is to add the sun s reflection to the water 584 Chapter 24 Raster Paint ...
Страница 606: ...594 ...
Страница 670: ...658 ...
Страница 710: ... a Tool time cursor b Global time frame markers 698 Chapter 28 Time Tools ...
Страница 722: ...710 ...
Страница 729: ...Backward vectors Forward and backward vectors The Show Vectors tool has the following parameters Show Vectors 717 ...
Страница 805: ...8 Add any correction using the Translation Rotation Scale parameters Simultaneous Stabilizing and Tracking 793 ...
Страница 806: ...794 ...
Страница 828: ...816 ...
Страница 870: ...858 ...
Страница 888: ...876 ...
Страница 898: ...886 ...