All Projects → Elringus → Spritedicing

Elringus / Spritedicing

Licence: mit
Unity extension for reusing sprite texture areas

Projects that are alternatives of or similar to Spritedicing

Spriteglow
A sprite glow effect for Unity game engine
Stars: ✭ 1,287 (+118.51%)
Mutual labels:  unity, unity3d, 2d, unity3d-plugin
Hololenscamerastream
This Unity plugin makes the HoloLens video camera frames available to a Unity app in real time. This enables Unity devs to easily use the HoloLens camera for computer vision (or anything they want).
Stars: ✭ 233 (-60.44%)
Mutual labels:  unity, unity3d, unity3d-plugin
Apple Signin Unity
Unity plugin to support Sign In With Apple Id
Stars: ✭ 228 (-61.29%)
Mutual labels:  unity, unity3d, unity3d-plugin
Unity3d Rainbow Folders
This asset allows you to set custom icons for any folder in unity project browser.
Stars: ✭ 519 (-11.88%)
Mutual labels:  unity, unity3d, unity3d-plugin
Swissarmylib
Collection of helpful utilities we use in our Unity projects.
Stars: ✭ 154 (-73.85%)
Mutual labels:  unity, unity3d, unity3d-plugin
Unitybarcodescanner
Simple Unity Barcode Scanner
Stars: ✭ 180 (-69.44%)
Mutual labels:  unity, unity3d, unity3d-plugin
Merino
Merino is a narrative design tool that lets you write Yarn scripts inside the Unity Editor
Stars: ✭ 275 (-53.31%)
Mutual labels:  unity, unity3d, unity3d-plugin
Csharp Eval Unity3d
C# Expression Parser for Unity3D
Stars: ✭ 102 (-82.68%)
Mutual labels:  unity, unity3d, unity3d-plugin
Savegamefree
Save Game Free is a free and simple but powerful solution for saving and loading game data in unity.
Stars: ✭ 279 (-52.63%)
Mutual labels:  unity, unity3d, unity3d-plugin
Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+518%)
Mutual labels:  unity, unity3d, unity3d-plugin
Mapssdk Unity
This repository contains samples, documentation, and supporting scripts for Maps SDK, a Microsoft Garage project.
Stars: ✭ 307 (-47.88%)
Mutual labels:  unity, unity3d, unity3d-plugin
Unity Scriptableobjects Game Events
Based on a great talk by Ryan Hipple, here is my improved version of his Game Event system for Unity
Stars: ✭ 121 (-79.46%)
Mutual labels:  unity, unity3d, unity3d-plugin
Ma textureatlasser
Texture atlas creator for Unity
Stars: ✭ 116 (-80.31%)
Mutual labels:  unity, unity3d, unity3d-plugin
Deadsimple Pixel Perfect Camera
An exceedingly easy-to-use pixel perfect orthographic camera script for 2D scenes in Unity. Punch in a few specs and you've got a working pixel perfect camera. It's that easy.
Stars: ✭ 186 (-68.42%)
Mutual labels:  unity, unity3d, sprites
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+234.13%)
Mutual labels:  unity, unity3d, unity3d-plugin
Deform Prototype
A prototyped framework for deforming meshes in the editor and at runtime in Unity. Not in development anymore, but it's still pretty awesome!
Stars: ✭ 256 (-56.54%)
Mutual labels:  unity, unity3d, unity3d-plugin
Jengine
JEngine是针对Unity开发者设计的开箱即用的框架,封装了强大的功能,小白也能快速上手,轻松制作可以热更新的游戏 | JEngine is a streamlined and easy-to-use framework designed for Unity Programmers which contains powerful features, beginners can start up quickly and making hot update-able games easily
Stars: ✭ 564 (-4.24%)
Mutual labels:  unity, unity3d, unity3d-plugin
Darkconfig
DarkConfig is a configuration library for games which supports fast and expressive iteration
Stars: ✭ 94 (-84.04%)
Mutual labels:  unity, unity3d, unity3d-plugin
Succ
Sexy and Utilitarian Code Configuration
Stars: ✭ 100 (-83.02%)
Mutual labels:  unity, unity3d, unity3d-plugin
Realtime Csg For Unity
Realtime-CSG, CSG level editor for Unity
Stars: ✭ 281 (-52.29%)
Mutual labels:  unity, unity3d, unity3d-plugin

This plugin is used in 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.

Minimum supported Unity version: 2019.3

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 Atlas menu command, select it;
  2. Specify Input Folder — project directory, containing the source textures 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. Generated sprites will appear inside the atlas asset; select any of them and drop to the scene.

Atlas Generation Options

You can optionally configure atlas generation settings via the editor inspector window.

Option Description
Generated Data Size Total amount of the generated sprites data (vertices, UVs and triangles). Reduce by increasing Dice Unit Size.
Default Pivot Relative pivot point position in 0 to 1 range, counting from the bottom-left corner. Can be changed after build for each sprite individually.
Keep Original Whether to preserve original sprites pivot (usable for animations).
Decouple Sprite Data Whether to save sprite assets in a separate folder instead of adding them as childs of the atlas asset.
Atlas Size Limit Maximum size of a single generated atlas texture; will generate multiple textures when the limit is reached.
Force Square The generated atlas textures will always be square. Less efficient, but required for PVRTC compression.
Pixels Per Unit How many pixels in the sprite correspond to the unit in the world.
Dice Unit Size The size of a single diced unit.
Padding The size of a pixel border to add between adjacent diced units inside atlas. Increase to prevent texture bleeding artifacts (usually appear as thin gaps between diced units). Larger values will consume more texture space, but yield better anti-bleeding results. Minimum value of 2 is recommended in most cases. When 2 is not enough to prevent bleeding, consider adding a bit of UV Inset before increasing the padding.
UV Inset Relative inset of the diced units UV coordinates. Can be used in addition to (or instead of) Padding to prevent texture bleeding artifacts. Won't consume any texture space, but higher values could visually distort the final result.
Input Folder Asset folder with source sprite textures.
Include Subfolders Whether to recursively search for textures inside the input folder.
Prepend Names Whether to prepend sprite names with the subfolder name; eg: SubfolderName.SpriteName.

All the above descriptions are available as tooltips when hovering corresponding configuration options in the editor.

Animation

It's possible to use diced sprites for animation. Make sure to enable Keep Original Pivot when generating the atlas to preserve the relative positions of the generated sprites. An example on animating diced sprites is available in the project in "Animation" scene.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].