zFilter Collection mel scripts |
The zFilter mel collection is a set of 3 useful mel scripts allowing the user to filter textures files, and (most of) 2d/3d textures. To execute the scripts, first source them in the script editor, then select your camera and execute them. Those mel create a shading network based the pointCameraZ allowing the user to control how much and where all the textures in a scene are filtered, and this to avoid most of the texture flicking during an animation. The scripts create 2 locators (near and far) parented to your camera to define the range of the filter in depth (in cam space). It also creates extra attributes (per script/texture) in the camera shape to control the values of the min (nearest of the cam) and max (farthest), and their interpolation. - MinFilterValue:
defines the minimum value of the filter Ok for the attributes? Let's get into the most interesting... How it works! Globally, this script uses the pointCameraZ (camSpace) to drive the filter value of all your textures in your scene. This way, you can set a filter value lower for the nearest part from the camera and another one (say bigger usually) for the part the most distant from the cam. This reduce a lot the causes of texture flicking due to sub-pixels texels (when a texture is far from the camera). zFileFilter:
Only for texture files. zAllTexFilter:
2d textures: checker, grid, fractal - 3d textures: brownian, cloud, crater,
solidFractal zGraniteFilter:
Granite and leather 3d textures only Here is an example: I took the first fractal and solidFractal I had in my pocket, and here we go... Limitations: These
scripts are intended to be executed ONCE. So I strongly suggest you to
use them when you have finish all the texturing and shading. If you have
new textures to be filtered, connect them manually Granite/Leather textures: these textures are not exactly filtered. I use the attribute randomness to smooth and blend all the colors. Note that better effects are achieved when mapped on objects parallel to the camera (ground objects for ex.) than perpendicular ones. |
zFilter Collection mel scripts - Emmanuel Campin - June 6th 2001 |