1/28/2024 0 Comments Packer texturepacker![]() When whitespace stripping, duplicate padding is only applied on edges that have non-whitespace pixels. This can hide "seam" artifacts if texture filtering selects padding pixels. The padding will copy pixels from the closest region. The padding will also be applied to the edge of the page images. Some texture filtering averages neighboring pixels, so a padding of 2 is recommended to avoid neighboring regions from affecting each other. The number of pixels between packed images. Images that are only transparent pixels will not be packed.Īlpha values below this are treated as zero when whitespace is stripped. Two images that are pixel for pixel the same will only be packed once. Applications must take special care to draw these regions properly. More efficient packing is achieved by rotating some images 90 degrees. The amount removed is stored in the atlas data so the images can be drawn in your application as if they were not whitespace stripped. Removes blank pixels around the edges of the input images. This setting should match how the images are rendered at runtime. Packing polygons is more efficient but slower and requires knowing the project file for context. This determines how much can fit on a single atlas page image. This dialog can be intimidating at first, but many settings can be left at their defaults. The texture packer has many settings to control how images are packed. The Settings button configures the texture packer settings. On the texture packer dialog, specify the folder containing the images to pack, where to write the atlas files, and the name of the atlas. Running the texture packer separatelyĬhoose Texture Packer from the main menu: However, it can be more flexible to run the texture packer separately. ![]() This is a convenient way to export both the skeleton data and the texture atlas at the same time. The Pack Settings button configures the texture packer settings. The atlas is named using the name of the project file without the file extension. Single atlas The images for all the skeletons are packed into a single atlas.Each atlas is named using the skeleton name, which matches the name of the corresponding skeleton data file. Atlas per skeleton An atlas is packed for each skeleton. ![]() Two options are provided for how texture atlases are created: This allows use of a pack.json file to configure packing for each folder. Image folders When chosen, the image files found in each skeleton's images path are packed.Attachments When chosen, only the image files used by attachments are packed.Two options are provided for how to find the images files to pack: When exporting JSON or binary, check Pack: The texture packer can be run two ways: Packing during data export Texture packing can also be done using the command line interface. The only reason to use multiple atlases is when some of the images don't need to be loaded at the same time. The regions are referenced in the atlas file by name.Ī single texture atlas can have many page images, allowing all the images for an application to be packed into a single atlas. The atlas file describes the locations within the page images of each of the packed smaller images, called atlas "regions". atlas file extension and one or more image files, called atlas "page images". Texture atlas filesĪ texture atlas consists of a text file with an. Packing is done with numerous heuristics at various sizes and the most efficient result is chosen. Spine uses multiple advanced packing algorithms. Spine can efficiently pack many smaller images into larger images, resulting in what is called a "texture atlas". ![]() Binding the texture is relatively expensive, so it is ideal to store many smaller images on a larger image, bind the larger texture once, then draw portions of it many times. In most graphics APIs (for example, OpenGL), a texture is bound, some drawing is done, another texture is bound, more drawing is done, and so on. While it can be used for your Spine skeletons, it can also be run separately to pack all the images for your applications. Spine's texture packer is a general purpose tool. Spine can pack your individual images into a texture atlas or grid (spritesheet) for more efficient rendering at runtime.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |