Code Monkey home page Code Monkey logo

blender-spritesheets's Introduction

Blender Sprite Sheets

Overview

This addon allows you to export an animated 3D model to a sprite sheet and import it into Unity. It can be used for pixel art or pseudo-3D assets to improve performance in your game projects. Simply model, rig, and animate your assets in Blender as you would normally, and then export all animations to a texture sheet and metadata sidecar. These two files can be imported into Unity, automatically creating animations for each Blender action.

This tool is especially useful for complicated sprite sheets you don't want to manually update with each small change. Previously for pixel art sprite sheets, artists had to meticulously change each frame of each animation for every direction that a sprite faced, especially hard in top down pixel art games.

Installation

Blender Add-on Installation

  1. Clone or download this repository and extract it
  2. (Optional) Move the bin folder into another folder of your choosing. This will need to exist as long as you want to use the Blender add on.
  3. Open Blender (this addon was made using 2.81), and open the addon panel by going to Edit > Preferences > Add-ons
  4. Click Install and navigate to the repository you just downloaded and select blender-spritesheets.zip
  5. The add on should be installed now, but it's disabled by default. Check the box next to Animation: Blender Sprite Sheets in the Add-ons menu in Blender and it will be enabled
  6. In Blender's 3D Viewport you should now see a new tab on the right pop-out menu called Sprite Sheet
  7. You've successfully installed the add on

Unity Importer Installation

Use Assets -> Import Package -> Custom Package to browse for the Unity Importer package.

Usage

Blender Add-on Usage

  1. In Blender's 3D Viewport, open the panel on the right side (it may be hidden by default, look for a small arrow near the top-right corner of the 3D Viewport area)
  2. Select the tab called Sprite Sheet
  3. Select the Bin folder where the executables are in that you set up during installation
  4. Select the Target, this is the object that will be animated and rendered to a sprite sheet
  5. Configure your render settings
  6. If you want to choose specific frames to render instead of every single one, you can specify 'Only render marked frames' in the Rendering section. Note that this uses specifically Action Pose Markers in Blender and not Timeline Markers. To edit Action Pose Markers, open the Dope Sheet, and make sure Marker > Show Pose Markers is selected. When this is selected you can use Marker > Add Marker and it will create an Action Pose Marker for that frame and action. This means you can use different Action Pose Markers for each action that you've created!
  7. Select an output folder
  8. Click on Render Sprite Sheet, note this may freeze Blender for a short time as the files are being rendered. Don't worry and let it do its thing. You should see the image generated in the output folder along with a JSON file that can be used for Unity importing.

Unity Importer Usage

Import the texture and the .bss sidecar side-by-side anywhere in your assets folder. Sprites and animations should appear automatically in the same folder.

Examples

If you aren't familiar with how Blender's animation system works, you can try using a sample .blend file in the examples folder of the repository.

You can see the animations for a Blender object through the Dope Sheet.

blender-spritesheets's People

Contributors

mkeating avatar theloneplant avatar tim-harding avatar

Watchers

 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.