The Ptex texture format provides a convenient way of texture mapping on non-parametric surface geometry like arbitrary triangle meshes. When used in conjunction with subdivision, the texture information can be painted on any location of the mesh in desired detail. The resulting data stored in a ptex file is able to keep the relation between individual mesh faces and the assigned texture without the need for a 2D parametric coordinate layout like traditional textures. On the other hand, a specific ptex texture is more closely related to the surface geometry it was created for.
Since the shader is utilizing third-party implementation that is delivered as a separate dynamic runtime the shader comes in its own binary package, which must be loaded into the mental ray rendering software before use. A .mi scene file may use the statements
link "ptex.so" $include <ptex.mi>
Lookup of per-face texture data from a ptex file for mapping on ccmesh subdivision surface geometry. A ptex file stores texture information on a per face basis rather than by spatial 2D coordinates. Thus, it allows to assign colors to the mesh surface without the need of a 2D parametric UV space. On the other hand, a specific ptex texture is more closely related to the surface geometry it was painted for.
shader color "mib_ptex_lookup" ( string "filename", scalar "width", scalar "blur", integer "filtertype", boolean "interpolate_level", scalar "filter_sharpness")
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.