Game Development Reference
In-Depth Information
Figure 3.2. Visualizing texture statistics using MATT texture browser module. Tex-
tures are annotated with category information, resolution, usage statistics, and shape-
recognition for duplication prevention. (See Color Plate II.)
with relative ease. The MATT tool eventually became an elaborate container for a
variety of previously existing stand-alone asset-tracking tools. This greatly assisted
rapid development of the tool, because Python modules could be written in isolation
or even ported from pre-existing Python tools, and then added as a module simply
by importing the Python script in the MATT tool.
One specific feature that took advantage of Python's flexibility was a system for
visualizing texture usage statistics that was initially written as a separate Python
script. As artists became accustomed to using the MATT tool for viewing the
project asset library, they began to request access to more data, such as material
information or one-click shortcuts to source art files. The Python texture browser
was imported into the MATT tool with only a few lines of script, and soon the tool
encompassed not only asset tracking after asset submission but also assisted during
content creation. Now users could perform traditional texture optimization tasks
such as wavelet comparisons or resolution standardization using the same tool they
usedforbrowsingtheassetlibrary(see Figure3.2 ) .
The texture browser leveraged the Python Imaging Library (PIL) to interpret
raw TGA images before they were optimized into platform-specific binary data (see
Figure3.3 ) .ThePILprovidedapowerfulimagemanipulationAPI, which allowed
us to perform automated image comparison operations by combining PIL func-
tions. For example, one problem was unintentional artist duplication of imported
texture data, which we solved with the texture browser by routinely comparing
every TGA image to every other TGA image and generating a hue/saturation/-
color and resolution-independent percentage of pixel similarity. Duplicate textures
 
Search WWH ::




Custom Search