Git Product home page Git Product logo

spritedicing's Introduction

This project is a part of Naninovel โ€” visual novel engine extension for Unity. Check it out on the Asset Store!

Installation

Use UPM to install the package via the following git URL: https://github.com/Elringus/SpriteDicing.git#package or download and import SpriteDicing.unitypackage manually.

Description

Sprite Dicing is an editor extension for Unity game engine which allows to split up a set of large sprite textures into small chunks, discard identical ones, bake them into atlas textures and then seamlessly reconstruct the original sprites at runtime for render.

This technique allows to significantly reduce build size, in cases when multiple textures with identical areas are used. Consider a visual novel type of game, where you have multiple textures per character, each portraying a different emotion; most of the textures space will be occupied with the identical data, and only a small area will vary:

These original five textures have total size of 17.5MB. After dicing, the resulting atlas texture will contain only the unique chunks, having the size of just 2.4MB. We can now discard the original five textures and use the atlas to render the original sprites, effectively compressing source textures data by 86.3%:

How to use

  1. Create a DicedSpriteAtlas asset using Assets -> Create -> Diced Sprite Atals menu command, select it;
  2. Specify Input Folder โ€” project directory, containing the source textures you wish to process. You can simply drag-drop a folder from the project hierarchy window into the field;
  3. Press Build Atlas button and wait for the generation procedure to finish;
  4. Sub-assets will appear inside the atlas asset, representing the original sprites; select any of them and drop to the scene.

You can optionally configure the atlas generation settings via the inspector editor window. Consult the tooltips for information on avilable options.

spritedicing's People

Contributors

elringus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.