Game Development Reference
Figure 2.5. Model with vector displacement.
Conventional texture atlases are often dicult to author without wasting texture
of the space is wasted. Ptex, by contrast, is built completely from rectangular
pieces and is therefore much easier to pack into a rectangular domain. We make
no special effort to find the optimal resolution to pack the face textures into, and
yet the waste in our experience has been only around 7% ( Figure 2.4(c) ).
The greater memory overhead for packed Ptex is in the use of borders. Funda-
mentally, the border cost goes up proportional to the square root of the area. Here
we give some formulas and concrete numbers to give an idea of what the overhead
is. Each face of square resolution r and border size n B wastes (2 n B + r ) 2
texels. Table 2.2 shows example costs as a percentage of waste due to borders
in packed Ptex. Two items are worth mentioning here. First, we can see more
concretely how high the per-face resolution should be to keep memory overhead
down. Second, we also see why borders beyond a couple texels, as would be
required for anisotropic filtering, is too expensive in memory cost.