DepthKey
Function
This creates a key in the alpha channel based on depth (Z) values. Values below
loVal are set to zero, and values above hiVal are set to 1. Values
in between are ramped. You also have roll-off control, plus a mMult toggle.
If there is no Z channel in your image, this function will not work.
If the Z channel isn't directly imported with the FileIn, you can copy it over with the Copy command, using z as your channel.
If you are importing from Maya, they have a wacky Z setting which is -1/distance. This basically means that the numbers in DepthKey are inpractical. Therefore, jump onto www.highend2d.com and grab the MayaDepthKey macro which operates exactly like the normal DepthKey, but does the conversion math for you.
Parameters
|
Type
|
Defaults
|
Function
|
loVal |
float
|
0 | Any pixel below this value (as calculated per its depth) turns black. |
hiVal |
float
|
1 | Any pixel above this value (as calculated by its depth) turns white. |
lo,hiSmooth |
float
|
0,0 |
A rolloff factor to provide a smooth dropoff. |
matteMult |
int
|
0 |
automatic pre-multiplification of the RGB channels. 0 = no pre-multiply |
Synopsis
image DepthKey( image, float loVal, float hiVal, float loSmooth, float hiSmooth, int mMult );
Script
image = DepthKey( image, loVal, hiVal, loSmooth, hiSmooth, mMult );
Command Line
shake -depthkey loVal hiVal loSmooth etc...
See Also
ChromaKey LumaKey,
DepthSlice