![]() |
|||||
![]() |
|||||
Pel Z Tool
The Z Tool is a node designed to ease working with Z (depth) channels in Digital Fusion. It will automatically setup your Z Channel values to work properly with Fusion's built-in depth tools, such as Depth Blur and Fog. Z Tool will even scan your entire clip and normalize the depth values to fit within the smallest possible range for the entire clip. Unlike a frame-by-frame normalization, which is something you should never do, Z Tool will set the near and far clipping planes properly for the entire clip, without causing the depth represented by any particular value to change throughout the clip.
Product Order and Information Page
General Workflow:
First link up the Z Tool to your input image. If your input image already has a Z channel (like an RPF file) then this is the only link needed. If your Z Channel is in a separate file (say a greyscale or RGB file, even) you link this Z Channel file to the secondary (green) input of the Z Tool. The Z Tool will automatically merge the Z Channel into its output.
Next you set up the render range to include the entire input clip. This can be achieved be dragging the loader node directly to the timeline display at the bottom of the Fusion interface (the area in yellow in the image to the left). This is a feature built-in to Fusion. It will automatically set the render range to the active range of the node you drag. If the global range is set too short you will have to increase it and drag the node again. Once you have the render range set to the length of your input clip you should be sure the Z Tool is displayed on a view and then click the "Guess Render Range" button.
That's it! The Z Tool should now have automatically set up the proper foreground and background planes, and magically scaled the Z Channel to work with Fusion's tools. You may want to quickly enable the Overlay function (in the Overlay Tab - see below). This will let you be certain your Z Channel is not inverted. With the default Overlay settings close pixels should be tinted orange and distant pixels purple. If the Z Channel is inverted then toggle the "Invert Z Output" checkbox. See below for futher info.
Note: If your 3D app offers the option to normalize the Z Channel per frame (LW does this) do NOT use this option. It is only useful for still images. If you use it in an animation the depth of a particular Z Channel value will vary from frame to frame, ruining any depth effects.
** See Application Specific Notes at the bottom of this page.
Interface:
The Pel Z Tool plugin has its controls in three tabs. The Settings tab contains the settings used most often. The Overlay tab contains the controls to help you easily visualize your depth channel for precise tuning. Finally, the Curve tab gives you a curve, or LUT in DF parlance, to edit the input vs. output mapping of the depth channel.
Settings Tab:

Foreground Plane / Background Plane:
These set the foreground and background, also known as hither and yon, clipping planes. The values that these need to be set to are very software and scene dependent. This is why we added the Guess buttons (see below). In most cases, the guess buttons should get your clipping planes setup in the right place. You may then refine them, should you desire to clip off the far distant portions or very close portions of the depth channel.
The values between the two planes are scaled to the values that Fusions works with best, a range from 0 at the closest to -1000 at the farthest.
Invert Z Input:
This control can be used to invert the input depth channel information, making what is near be far, and what is far become near. The Guess buttons (below) should set this automatically. This is primarily an automatic setting which is set by the Guess buttons. However, should you need to tweak it manually it is there. If you want to invert the output Z channel instead use Invert Z Output checkbox below.
Invert Z Output:
This control can be used to invert the output depth channel information, making what is near be far, and what is far become near. This is a manual setting. Use this if your depth channel is inverted. You can enable the Overlay feature (see below) to determine what is near and what is far. With the default settings of the Overlay feature near pixels are tinted orange and far pixels are tinted purple.
Z Depth Channel:
This popup menu is only shown if you are using a second input as your source for your Z depth. This allows you to copy the Z information from any file format into the Z Channel of the output. So you do not have to render to RPF or RLA format. Use the popup to select the channel from which to copy the Z information. If the file is greyscale it is marginally faster to copy the information from the Red channel (in a greyscale image all channels are the same. Internally the Z Tool reads the data from the Red channel. If you select the Red channel as the source it avoid copying the data internally.) If the Z Channel input image is a different size from the Bg image it will be resized to match using Bi-Linear interpolation.
Note on File Formats for Z Channels: If you render out your Z Channel information to a separate file be sure to output to a floating point file format such as Radiance (.hdr) or OpenEXR (.exr). These will give you the most precision in your Z Channel. At the minimum render to a 16-bit format. If your application does not support these floating point formats you may achieve better precision rendering instead to RPF or RLA. LightWave users might consider rendering the Z data to either .HDR or .EXR. Z values out of Lightwave are frequently greater than 1.0 (pure "white"), and are thus clipped by any format that does not support floating point. Therefore even 16 bit files may be insufficient. Your safest choices from LightWave are HDR or .EXR for separate Z Channel files, and .RPF and .RLA files for RGBAZ combined files.
Note for DFX+ Users : If you are using DFX+ instead of the full version of Fusion you may want to continue rendering out to RPF or RLA format. Although DFX+ is limited to 8 bits per channel the Z channels from RPF and RLA files are still processed as floating point data. If you instead render to an 8 bit format and merge the channel using the Z Tool you may have some loss of precision and possibly clipping depending on what application you are using and the specifics of your scene.
Guess This Frame: :
When you click Guess This Frame be sure Z Tool is being displayed on a view. This function will analyze your Z Channel and automatically configure the Foreground plane, Background plane, and the Invert Z settings to make your Z Channel work easily with Fusion's built-in tools. This function analyzes only the current frame. If the farthest and closest objects in your scene vary from frame to frame you probably want to use Guess Render Range instead.
Note: If the Z Tool is not being displayed on a view (or otherwise processed by being upstream from a node displayed on a view) this button will appear to do nothing. The Guess Current Frame and Guess Render Range Buttons will go dim. Pel Z Tool will then perform the analysis the next time it is called upon by Fusion to process (like when it is displayed on a view). This can be confusing. So please be certain that the Z Tool is displayed on a view before clicking this button.
Guess Render Range: :
When you click Guess Render Range be sure Z Tool is being displayed on a view . This function will analyze the Z Channel for the current render range and automatically configure the Foreground plane, Background plane, and the Invert Z settings to make your Z Channel work easily with Fusion's built-in tools. This function analyzes the current render range. If the farthest and closest objects in your scene do not vary from frame to frame you may choose to use the Guess This Frame function instead. Though you can always be certain that Guess Render Range will normalize your Z Channel properly for the whole clip.
For Guess Render Range to work properly the Render Range must be setup to be the length of the clip you wish to analyze. Se above in the General Workflow section for tips on setting this up easily.
Note: If the Z Tool is not being displayed on a view (or otherwise processed by being upstream from a node displayed on a view) this button will appear to do nothing. The Guess Current Frame and Guess Render Range Buttons will go dim. Pel Z Tool will then perform the analysis the next time it is called upon by Fusion to process (like when it is displayed on a view). This can be confusing. So please be certain that the Z Tool is displayed on a view before clicking this button.
Overlay Tab:

The Overlay tools are designed to make viewing your Z Channel easier. Though Fusion allows you to view the Z Channel in a view by clicking the little "Z" next to the view it does not automatically normalize the values of the Z Channel. This leads to a very confusing "zebra-stripe" type image when a Z Channel is properly configured for Fusion's tools. Sure, you can click the Show Full Range button to normalize the view, but then you are likely to leave it turned on, possibly wasting hours of color correction time later when you realize it has been on for the past two hours! The Z Tool's Overlay solves this by letting you view the Z Channel as a color gradient between any two arbitrary colors or grey levels. When the colors are setup with an alpha value of less than 100% (the default is 50%) they will be "overlayed" on top of your image. This lets you easily see the different depths of different parts of your image along with the image itself.
Enable the Overlay by checking the "RGB Depth Overlay" checkbox. With the default settings of the Overlay feature near pixels are tinted orange and far pixels are tinted purple.
The option to Post-Multiply the overlay prevents the overlay colors from "infecting" the background in a clip with an alpha that is being additively merged.
Note: If you like the look over the overlay there is not reason you cannot leave it enabled for your final render!
Curve Tab:

This tab provides you with a curve, or LUT in Fusion parlance. This curve can be used to re-map your depth values in the post. You can use it to apply a logarithmic style curve to the Z Channel in order to create non-linear fog. This is an advanced feature that most users will not need. But when you do need it you will no where to find it.
The Z-Curve must be enabled with the checkbox for it to take effect. This avoids the overhead of processing the LUT when the curve is not in use.
When you add a point to the curve you are essentially re-mapping an input depth value to a new output depth value. If you place a point right in the middle of the default straight line curve and shift it upwards you are pushing depth values that are halfway between the foreground and background clipping planes towards the background plane. So you are technically making those pixels seem farther away. This can make the pixels have a stronger fog or blur effect when using fog or blur depth tools.
Hint: You probably want to enable the Overlay when tweaking the Z-Curve.
Each 3D application generates Z Buffers a little differently.
3D Sudio Max - Need Info (submit good docs and screenshots and get a free license!)
Maya - Need Info (submit good docs and screenshots and get a free license!)
XSI - Need Info (submit good docs and screenshots and get a free license!)
Generic Fog Trick - To create a Z buffer using the old-time fog trick Set all of your objects to matte black; disable all lights; and enable linear camera fog with a color of pure white. Set the hither and yon (close and far) points of the fog so that they completely cover the full depth of your scene, but no more. Thus the hither plane is set to the minimum distance that the camera EVER gets to any object, and the yon plane is set to the maximum distance any object EVER gets. Render this out and use it as a secondary input to the Z Tool. Select the Red Channel as the Z Source Channel (see above).
Product Order and Information Page