About cautions when placing respective animation parts in the texture

When the Sprite animation is tried with the recent GPU (Graphic Processing Unit: graphic drawing function), it is a general technique that the pattern designs of parts used by plural Sprites are collectively placed in one texture. Generally, it will mean that the pattern designs used by the group of plural Sprites’ parts used for Animation (pattern designs for parts, hereinafter) are collectively placed in one texture.

There are some “recommended matters to be observed” when placing the parts’ group for each Sprite into the single texture.

  • The left-upper placement position of pattern designs for parts must be at the pixel position of the multiple of 8 or 16
  • Both horizontal and vertical sizes of the pattern designs for parts must be the number of pixels of the multiple of 8 or 16, respectively.
  • Never place pixels on the boundary of pattern designs for parts (Be sure to enclose parts with 1 to 2 transparent pixels).

The above issue comes from the fact that, when the recent hardware specifies pixels to be drawn, it specifies the so-called “UV coordinates” i.e., “the proportional position when the horizontal and vertical sizes of texture are made to be 1.0”.

Generally, the UV coordinates are handled by the “Floating-Point number” method.

But, in case of the decimals handled by this “Floating-Point number”, there happens to be “error”.

Therefore, the above-mentioned recommended matters are the measures to create the state to “prevent those errors” and “prevent influences upon the screen even if erroneous”.

In such cases, on the hardware to operate, as “Trash (Never drawn pixel’s color) appears at the edge of Sprite’s parts” and “The Sprite’s pattern design is displayed fuzzy.”, please check the above recommended matters.