This script connects the Depth White and Depth Black attributes of the Vray Z-depth render element to two locators that follow along with the animation of your camera and object of interest. It gives visual feedback so it's easy to set up and see what area is being covered. The object of interest will always render the same value of gray and the white and black values will remain at a constant distant (set by the user) at all times.
HOW TO USE
First, make sure you have a Vray Z-depth render element in your scene and that it's named exactly "Z_depth". Then select the camera, shift select the object that needs to stay in focus and run the script. The script will create a new group called zDepth_grp which will have two attributes that you can use to control where the whitest and blackest planes will be in the render. When you adjust the value of these attributes you will see in the viewport two locators that slide on the line that connects the camera to the object of interest.
INSTALLATION
To get the Vray Z-depth Tool, download the script file and save it in your "maya/version/scripts" folder:
Download lr_zDepth_tool.py
Then run the following code in the script editor (make sure to be in a python tab):
import lr_zDepth_tool
reload(lr_zDepth_tool)
You can save these lines in a shelf button for easy access.
If you don't want to download the file you can just copy the code below to the script editor and drag it onto your custom shelves so you can access it at any time (remember to save your shelves before quitting Maya)
No comments:
Post a Comment