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
- Clone or download this repository and extract it
- (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.
- Open Blender (this addon was made using 2.81), and open the addon panel by going to Edit > Preferences > Add-ons
- Click Install and navigate to the repository you just downloaded and select blender-spritesheets.zip
- 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
- In Blender's 3D Viewport you should now see a new tab on the right pop-out menu called Sprite Sheet
- You've successfully installed the add on
Unity Importer Installation
Use Assets -> Import Package -> Custom Package
to browse for the Unity Importer package.
Godot Importer Installation
- If you do not have an
addons
folder in your project, create one. - Move the
godot-importer
folder into theaddons
folder.
Usage
Blender Add-on Usage
- 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)
- Select the tab called Sprite Sheet
- Select the Bin folder where the executables are in that you set up during installation
- Select the Target, this is the object that will be animated and rendered to a sprite sheet
- Configure your render settings
- 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!
- Select an output folder
- 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.
Godot Importer Usage
In the Godot editor, select the .bss
file and go to the Import menu. Enter the spritesheet path and click on the Reimport button.
You now have a 2D scene with a sprite and its animations.
For more details on the Import process, check the Godot documentation.
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.