-
Notifications
You must be signed in to change notification settings - Fork 23
Turning 3D models into 2D sprites
-
To convert a 3D animated model into a 2D sprite sheet, you need to install Blender.
-
Download the "isometric-template.blend" from here. This is a prepared scene where the camera has the correct settings for isometric rendering.
-
Delete the default cube and hide the floor plane. Import an animated model into the scene. Switch to the "Animation" tab. Ensure that the model fits within the rendering frame. If not, resize it. Don't forget to import weapons and attach them to the armature.
-
Rename the animation inside the armature to one of the following, depending on the animation:
run_slow
run_fast
stunned
death
floating
-
Switch to the "Scripting" tab. Open the latest render_8_direction_sprites.py script. Run the script. The editor should lag if it's generating correctly.
-
Go to the model's folder. There should be a "script-export" folder nearby. It will contain subfolders named after the animation actions. Find the action that you want to translate into sprites.
-
Download Godot executable to the
<godot-path>
-
Download this script which merges slides together into one sprite sheet to the
<generate-atlas-script-path>
-
Run the following command to merge slides exported from the Blender:
<godot-path>/<godot-console-executable> -s "<generate-atlas-script-path>" --path="<export-path>" --name="<unit-type>_<animation-name>"
So, for example, on Windows the command should look like this:
C:/Users/user/Downloads/godot/Godot_v4.0.2-stable_win64.exe -s "C:\Users\user\Downloads\youtd2\Scenes\GenerateAtlas.gd" --path="run_slow" --name="orc-normal_run-slow"
You should see:
GenerateAtlas.gd begin GenerateAtlas.gd end
And the end result is a folder "generated-atlases" with sprite sheets in the folder where you executed the script.
-
Upload the sprite sheet, Blender project, FBX animations to the Google Drive. Keep file arrangement consistent, example.