| DepthKey |
Function
The DepthKey function creates a key in the alpha channel based on depth (Z)
values. Values below loVal are set to 0, 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 does not work.
If the Z channel is not directly imported with the FileIn, you can copy it over with the Copy command, using z as your channel.
When you import from Maya, there is a strange -1/distance Z setting. This basically means that the numbers in DepthKey are impractical. To correct this, go to www.highend2d.com and download the MayaDepthKey macro. The macro 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