Control primitives with PTEX maps

 
 
 

You can use PTEX files with XGen Descriptions to specify the location and density of primitive generation as well as to control a number of primitive attributes. PTEX files are overlaid on the polygon mesh as maps. You can create PTEX maps using PTEX painting in Maya or by using a PTEX file created in Autodesk Mudbox 2012 (or later). In Maya, you can use the Paint 3D tool to paint textures which generate PTEX files when saved by XGen.

Typically, a PTEX map can consist of areas painted in black, white, and grey. The black areas of the map represent a value of 0, white a value of 1, and grey areas represent values between 0 and 1. You can also paint different colors on the mesh to specify distinct areas on the surface. Use this type of PTEX map for Region Maps. See Region maps and masks.

When you attach a map to an attribute, such as Mask for Density, the map inputs the set attribute and generates an output based on the color. For example, white areas of the map display the full attribute value, while areas painted black generate an attribute value of 0.

You can varying the value of an attribute, such as Length, by painting grey.

You can use PTEX maps to control:

See Create a PTEX map to control primitives.

Understanding texels

With PTEX painting, texels are added to each face of the mesh. Texel is an abbreviation of the term 'texture element'. A texel is like a pixel, but is not limited to your flat computer screen. You can think of a texel as a single point of color on the surface of your mesh.

When creating a PTEX map, you specify the texel resolution (Map Resolution) required for each base face of the mesh. The texel resolution you specify tells Maya how much detail per base face you require for the map.

PTEX file names and folders

When you create a PTEX map in Maya, the Map Name you specify is assigned to the folder name that contains the PTEX file. The PTEX file name is derived from the polygon mesh object you paint on. Maya stores the PTEX folder and file in a paintmaps folder, which is stored in the Description directory. For example, if you painted a map named GrassDensity on a polygon mesh named LandscapePlane, the folder and file structure appears as:

Related topics

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License