Description: zutilz gives you a mask or grayscale output based on the zbuffer.
Author: paprmh
email: paprmh->gmail.com
licence:GPL

zutilz gives you a mask or grayscale output based on the zbuffer. You can select the beginning and ending z-values which makes it alot easier to get an accurate mask or a good 8bit grayscale depth map.  It also can insert a zbuffer into a previously rendered image via a second strip for other plugins that use the zbuffer

The default settings give you an instant 8bit grayscale depth map of the USED portion of the zbuffer. Turn off autoselect and adjust the start[>Z] and end[<Z] values for even better results.

Load a scene strip or Iris+Z and add the plugin and push the [n] key to access the buttons that control the plugin. 

Options:
3 new TOG3 mode buttons:
	1)Depth/dumpZ
		a)selected range grayscaled(8bit depth map) - outside selected range masked to mask color & alpha
		b)dumps the zbuffer into the output image so that you can save a 32 bit png of the zbuffer that can be
		   reinserted to the image png later for composting

	2)viewZ/DOFmask
		a)Gives you 3 gradients- red->yellow below start-z, grayscale of the selected zvalues, blue->cyan above end-z
		   This mode is useful for setting the start and end z values for the selection
		   (NOTE: if you save this image as rgba, the blue and red gradients will be saved
		     with the alpha value that you have set for the mask).
		b)a dof mask of sorts, that leaves the selected z all black or white then gradient outward.
		  DOF clipping has been added - see below

	3)mask/invmask
		a)selected z-values masked to mask rgba -outside selection output normally
		b)selected z output normally - outside selection masked

The other buttons:

	auto select: plugin's simple guess as to the most important part of the zbuffer:
		>Z set to closest pixel in frame
		<Z set to furthest fully opaque pixel
		->turn off to manually adjust start and end z of selection

	>Z: select start (select greater than this value)

	<Z: select end ( select less than this value)

	DOF clip: clipping factor for the near and far dof mask gradient.
	 Adjust the next 2 num buttons to control the max gradient in each direction

	output zbuf: output the working zbuffer to the plugin output.

	use ibuf2:lets you use ibuf2 (either as a zbuf snapshot img or as a scene) to import a zbuffer to an image

These 2 buttons let you insert a zbuffer into a previously rendered image for composting purposes...remember that pic that took you hours to render and you would like to have the zbuffer for composting that pic in the seq eidtor without the wait?
First, load the scene that you rendered the image from and turn off all of the fancy render stuff that made it take so long to render(ao, shadows, ray, etc). Go to the seq editor and add the image & scene. Now select the img then shift select the scene and add the plugin. Now toggle [use ibuf2] on and the plugin will work with the image according to the zbuffer in the scene...If you toggle the[output zbuf] button, you could now use one of the other plugins that depend on the zbuffer (like the zblur plugin) on your image

	inv gradient: inverts gradient from black closest to white closest

	verbose/TMI:
		a)prints plugin operation info to the console
		b)prints possibly Too Much Information

	The color picker and the alpha slider are for the mask color used in the masking operations
