A suite of Layout plug-ins, requires LightWave 6.0 or later. The source code is part of the plug-in SDK.

ZComp is a collection of plug-ins that implement simple compositing. 3DNzcomp.p contains LightWave versions of the 3D Nature z-buffer saving and compositing plug-ins (as of 2002). Although these were originally written for compositing scenes rendered in 3D Nature's World Construction Set, they can be used for any simple z-buffer-based compositing task.

There are three plug-ins in 3DNzcomp.p. 3DN_ZSave is an image filter that saves the depth buffer as a 3D Nature ZBUF file, and 3DN_ZLoad is an image loader that reads ZBUF files. ZBUF is 3D Nature's format for depth buffer images. It has the advantage of storing depth with its full floating-point precision, but the compositor doesn't require you to use it. You can use any image format that supports floating-point and that LightWave can load.

The third plug-in, 3DN_ZComp, is the compositor itself.

To use 3DN_ZComp, you first need two image sequences, which I'll call the comp sequence and the zbuf sequence. The comp sequence is just a set of rendered frames, and zbuf is the matching set of depth buffers for those frames. You can use the 3DN_ZSave image filter plug-in to generate the zbuf as you render the comp.

When you're ready to composite the comp with a new render, open the Image Editor and load both the comp and zbuf sequences there. Then open the 3DN_ZComp interface and select these from the image lists. For each pixel in each rendered frame, 3DN_ZComp compares the depth of the pixel with the depth in the zbuf frame, and if the zbuf value is lower, 3DN_ZComp replaces the rendered pixel with a pixel from the comp frame.

When a pixel is replaced, the z value is also replaced. This should allow rendering processes that are downstream of ZComp to work properly, including additional instances of ZComp itself, so at least in theory, you could composite any number of layers in a single rendering session.

Since both the comp and the zbuf are handled by LightWave's clip manager, the compositor allows gaps and offsets in both file sequences. If the comp and zbuf don't change over a range of frames, you only need one frame of each, numbered for the first frame in the range.

You get the best results when the comp, zbuf and rendered image all have the same resolution. But the compositor doesn't require this.