Sample ZScripts

ZScript Interfaces

Max Detail for UV Map

This example plugin will give you an estimate of the amount of detail that your UVs and map size will be able to capture. If you are wanting to export displacement maps, normal maps or texture maps created from polypaint then knowing how much detail they can hold is very useful.


The plugin works by creating a texture map. The black areas of the map will be the part unused by the UVs, so by using the map to mask a plane, the amount of the map that is used can be calculated. This can then be used to estimate the maximum number of polygons a map of a given size can support.

Download the code for Max Detail here.

Focal Shift & Z Intensity adjustment

This plugin reproduces some of the same functionality that is in the <<Brush and Brush>> buttons located in the ZPlugin>MIsc Utilities sub-palette. Those buttons allow the Draw Size to be adjusted by the [ and ] hotkeys and the increment can be set in the slider. This example will add buttons for adjusting Focal Shift and Z Intensity, along with sliders for setting the increment for each.

The code demonstrates the use of [VarSave] for saving and loading a variable value from a file. This means that the increment slider value is kept between ZBrush sessions.

Download the code for Focal Shift & Z Intensity adjustment here.