We’d love to hear from you. Whether you have a question that you’d like us to answer as part of our FAQ,  you’ve identified something that just doesn’t quite look right in one of our tutorials, you have a business opportunity or for any other reason, please use this simple form to contact us.

We’ll do our best to provide a prompt response.

Like what you see?...pass it on!

Exporting from Blender to Godot Step by Step Tutorial

One of the most common tutorial requests I receive is “How do I export my 3D models from Blender to Godot?” and this is a very consistent pain point, regardless of the game engine used.  So that is exactly what we are going to do in this tutorial, create a simple but rigged, animated and textured model in Blender 2.79, then export it for use in the Godot 3.1 game engine.  If I miss a point, I have created a step by step video of this process available here as well.  Alright, let’s jump in.

Creating and Texturing Your Model

The first thing you need to do is model your um… model.  The outcome really doesn’t matter, so I’m just going to focus on the parts that are important to the exporting process.  One thing to keep in mind, you are going to want to have denser polygons at the “joints” where your armature is going to bend or deform.  Using a combination of extrusions, scaling, and bevels in edit mode, I created the following simple model.

Blender Model

It really doesn’t matter what you model, the important part is you create a UVMap for it.  The easiest way is to switch into Edit Mode, hit A to select all of the faces, then hit U in the resulting menu select Smart UV Project:

Blender UVMap Menu

Another dialog will pop up, the defaults are fine, simply click OK.

image003

Now that we have our UV Map, it’s time to apply some textures.  First, you are going to need a texture map, you can find tons of free textures over on the DevGa.me Free GameDev resource page.  For this example, I download the 2k resolution version of this texture from CC0Textures.  Simply extract the contents of this zip file to a directory.  Now that we are at it, save your Blend file to the same directory as the textures.

Now in the 3D view, switch to Object mode(this can be done with the TAB key as well as the combo box below).

Blender Object Mode

With your Object selected in the 3D view, check in the Materials tab in the Properties window to make sure that there is a material (there should be).  If there isn’t, make sure you create one.

image005

The name you specify here is the name you will get when imported into Godot.  Since Material is pretty generic, I’m going to simply rename it to Thing1Material, like so:

image006

Simply double click the string to enter edit mode and rename it to whatever you want.  That should be it for the Materials Tab.  Now switch over to the Textures tab.  There are several steps here, so I’ve illustrated them on the graphic below.

image007

Now we are going to repeat the same process, this time for the normal map.  Next, select the next empty spot in the Textures panel, then click new:

image008

Once created, rename it to normal, then repeat the above process, this time selecting the normal map from the extracted archive.  The only difference between the color and normal channel is we turn off color and instead enable normal, like so:

image009

At this point, if you switch the viewport to Material mode, your model should have a texture and normal map, like so:

image010

Woot… our model is done and ready for animating.  Now let’s start with animating.

 

Rigging the Model

First things first, we have to create an armature to control our animation.  With the 3D cursor inside our mesh, select Add->Armature->Single bone.

image011

You may have to translate and rotate your bone so that it’s properly oriented at the base of your mesh.  With the bone selected, switch into Edit mode (Tab), then hit E to extrude and create another bone.  Repeat this process a couple of times so your model looks something like this (hit Z for xray mode if needed):

image012

Now hit TAB again to switch back to Object mode.  Now select our polygon mesh, then holding SHIFT down, select the bones.  Next hit SHIFT+P to parent the mesh to the bones. This will pop up another window, select Automatic Weights:

image013

This will set the influence of each bone over the mesh.  We are now ready to start animating.

 

Animating the Model

Now we are going to configure a pair of animations.  To do this we are going to need to open 3 different windows, the Timeline, the Dopesheet, and the NLA Editor.

First, select one of the bones in your armature and switch to Pose mode.  We are going to make our animation very simple, 50 frames of keyframed bone animation. In the timeline, set the End value to 50 frames, like so:

image014

Now that we are in pose mode, we should be able to select individual bone positions, which will cause the attached mesh to deform.  In the timeline, make sure you are at frame 1, like so:

image015

Now in 3d view, hit A until all the bones are selected, then press I (as in the letter i) to insert a keyframe at this position.  In the resulting menu, select LocRotScale

image016

This will create a keyframe for every bone in the animation.  Now in the timeline advance to the 25th frame, rotate a few bones in Pose mode in the 3D view, hit A again until all of the bones are selected and once again hit I and create another key.  Repeat this process once again at the 50th frame.  Your model should look something like this:

image017

And in the dopesheet and NLA editor, you should see multiple keyframes you created:

image018

Now switch over to the NLA Editor.  We want to rename our animation something other than ArmatureAction, then hit the commit button.

image019

Once complete, you should see something like (if you named yours BendUP as I did):

image020

Now we want to create another animation.  Switch to the Dopesheet, then switch to Action Editor:

image021

Now click the New button to create another animation.

image022

Now you can repeat all of the above steps (pose model, create keyframes across the timeline, rename and commit the action).  Do this over and over for all of the objects in your scene.  Here is the end result with two animations defined.

image023

Now the final AND MOST IMPORTANT PART!  Be sure to mute each channel or they will not export right.  In the NLA Editor, click the little speaker icon next to each animation so they are off, like so:

image024

Installing the Better COLLADA exporter

Now we are ready to export our textured and animated model!  Well almost.  First, we need to install the Better COLLADA plugin.  Download the zip file from the Godot download page ( https://godotengine.org/download ).  Scroll down and locate the exporter:

image025

Remember where you saved it.

Now in Blender, select File->User Preferences.  Then switch to the Add-ons tab, then click Install Add-on from file and select the zip file you just downloaded.

image026

Once done, make sure the checkbox next to it is set:

image027

If you want to keep this plugin always available, click the Save User Settings button.

 

Exporting your Model

With our exporter installed, the rest is pretty easy.  Simply select File->Export and Better Collada should now be an option.

image028

Export to the same location you saved the textures earlier.  The final setting is configuring the export options.  Here is what I used:

image029

Importing to Godot

This really couldn’t be easier.  Simply copy the generated DAE file, as well as the textures into a Godot project’s file directory.  Godot will automatically detect and import them.

image030

Notice the generated Material matches the name we gave earlier.  Create a 3D scene and drag the DAE file into the scene.  Let’s make sure the animations work.  In the Scene window, click the Open in Editor button:

image031

You will then be prompted on how you want to proceed… pick either option that isn’t cancel.

image032

Select Animation Player in the newly opened scene.

image033

Next verify that your two animations imported:

image034

And voila!  A fully textured, animated object imported to Godot!

image035

What other options are there?

This video covered using the Better COLLADA exporter, as it is the de facto standard way of exporting to Godot right now, but by no means is this the only option.  There is also a dedicated Godot exporter for Blender under development, available here.  There is also the option of using glTF2, an open standard by the Khronos group.  For Godot 3.2, there is a project underway to support Assimp with a focus on FBX support.  The problem is, all of these options are currently under development and cannot yet be considered reliable.  If Better COLLADA doesn’t work for you, be sure to check out one of these alternative options.

Finally, there is the option of exporting using the OBJ format, which is very reliable but does not support animations and advanced texturing options.  If you have a static simply textured object, the OBJ exporter is extremely reliable and requires no additional plugins.

Like what you see?...pass it on!

script ends --->