O'Reilly logo

Character Animation with Direct3D® by Carl Granberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calculating Decal UV Coordinates

The hard part is behind you. You got a skinned decal mesh attached to the character and you have a way of adding these to a character. The last remaining piece of the puzzle is to calculate the UV coordinates of the decal mesh and then render it. Figure 14.11 shows an image of a run-of-the-mill decal texture.

Figure 14.11. Decal texture with alpha (alpha visualized with square pattern).

The most important thing about the decal texture is that all the edges are 100% transparent. If not, any pixel on the edge will be stretched out when applied to the decal mesh. This is because you will be rendering the decal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required