Crates.io | sprite_dicing |
lib.rs | sprite_dicing |
version | 0.1.3 |
source | src |
created_at | 2024-04-04 17:54:08.559288 |
updated_at | 2024-07-27 11:23:22.478861 |
description | Cross-engine tool for lossless compression of sprite textures with identical areas. |
homepage | https://dicing.elringus.me |
repository | https://github.com/elringus/sprite-dicing |
max_upload_size | |
id | 1196551 |
size | 60,084 |
Use SpriteDicing to split a set of sprite textures into units, discard identical ones, bake unique units into atlas textures to then seamlessly reconstruct the original sprites at runtime, without actually keeping original textures in the build.
The solution significantly reduces build size when multiple textures with identical areas are used. Consider a visual novel type of game, where multiple textures per character are used, each portraying different emotion; most of the texture space is occupied with identical data, while only a small area varies:
These original five textures have total size of 17.5MB. After dicing, the resulting atlas texture will contain only the unique areas of the original textures and consume just 2.4MB, effectively compressing the textures by 86.3%.
Sprite Dicing is used in Naninovel — visual novel engine. Check it out!