Zpics and the FxTree

Table of contents

What is a ZPic image and what are its limitations?

  • ZPic images are rendered by choosing "Z (Depth)" on the Render Pass property page
  • They are are an external channel for .pic images, and therefore can only be used if you are also using the .pic format.
  • They contain the depth of each pixel, one floating point value per pixel, big endian, between 0.0 and -100000.0, in Softimage units (in other words the values used in the Transform Panel).
  • They do not have an image header, therefore the size of the Z buffer is taken from the .pic image. They must go together! However, the RGBA content of the .pic file is not used anyway.
    • XSI, AfterEffects and other applications will not be able to load .ZPic files unless a .pic with the same name is in the same directory and using the same number padding format.
    • Avid|DS requires that no padding is used for .ZPic files to be found. Example : image.3.Zpic is OK, image.003.ZPic or image003.ZPic is not.
    • Discreet Combustion does not support .ZPic, but Adobe AfterEffects does.

Which FxTree nodes work with Zpics?

  • ZComp : allows compositing of images with Zpic.
    • there is no antialiasing in ZPics, so the quality is not great.
  • Depth Of Field. Tips :
    • Move the mouse over the FxViewer to see the depth values
    • By default the node is in 'preview' mode which will gray out the area of the image that would be blurred, allowing you to quickly set Near and Far focus to values needed to get a region in-focus (non-grayed out).
    • Turn Off "Preview Region" to see the depth of field result.
  • Fake3D, in the Plug-In group, for depth-fading.

How can I load ZPic images in the FxTree?

  • You can load Zpic images simply by importing them directly. If they do not load, it could be because a corresponding .pic file is not found.

In the FxViewer, the Zpic appears Completely white, with no shading. Why?

  • In the file browser, ZPics are shown in orange, and remapped between the near and far plane. A magic number is used to make them look 'pretty'. However, that is not unusable for compositing because the values change too much between frames.
  • In the FxTree, the ZPic is loaded and remapped between 0.0 1.0 , which allows you to use standard tools.
  • The remapping is done like so: final value = 1 - (ZpicValue / -100000.0), which means most of the values will be very close to 1.0. For example, 1 - ((-200)/(-100000.0)) = 0.998

How can I convert a ZPic image to a grayscale image using the FxTree?

Given the explaination above, most ZPics have their values close to 1.0, since most objects are pretty close to the camera, and the value was obtained with the formula above.

You can remap that to a visible range using the Pixel Parser.

Enter the given formula :

   1-((1-pixel)*100000)/a1

(The default expression for the pixel parser is just 'pixel')

Use the 'a1' slider to set the far plane for the Z values, in Softimage units, for example to 50. Larger values if you have objects that are far from the camera.

This shaves off a part of the Z range that you are not using. (The Z Range is by default 0....100,000

After, you can use the Luma Adjust graph to tweak the image. Before this, it wouldn't have worked well because all the Z values would have been close to 1.0.

Plug a file output, potentially after a 'Bit Depth' node to make the output 8-bit, and render.


This page was last modified 17:30, 17 Oct 2005.
This page has been accessed 196540 times.

© Copyright 2009 Autodesk Inc. All Rights Reserved. Privacy Policy | Legal Notices and Trademarks | Report Piracy