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

Creating Decal Geometry

In the previous section you learned how to find which triangle of a character that a certain ray intersects with (even if the character happens to be hardware skinned). The next problem that follows is how you calculate which surrounding triangles should be selected for the decal mesh (remember that the decal is, in most cases, larger than the average triangle on your character). Again, there are a few different approaches to this, and as always they have varying accuracy and efficiency. The brute force approach would be to test all triangles of the entire character and select those inside the decal test volume (which could be calculated as a sphere around the hit position with a radius of the decal size). The problem ...

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