Export Blender’s Mesh into Babylon.js

In this tutorial we will look at the method to import the ready made Blender mesh into Babylon.js engine as well as showing you a simple demo at the end of this post.

First of all lets get to the download page of Blender to Babylon.js exporter on Github and only download the latest version of it’s zip file, in this case, Blender2Babylon-5.5.zip.

Next open up your blender software and goto File->User Preferences->Addons and click on the Install Addons from File button and install the entire zip file. Finally tick on the check box beside the Babylon.js addons then save the user settings!

babylon.js
Don’t forget to tick on the check box and save the setting

Now start a new project on Blender and start to create your object, you can do it either in the Blender Render or Cycles Render. If you are ready to export your work look for the Babylon.js part under the Scene tab in the property panel and go ahead and do the following setting.

Babylonjs
Do the following setting

As you can see we can set up a lot of things but in this simple tutorial we will just apply the simplest export setting, notice that the Texture Location has been set to inline which means the addons will not create an extra image file for the texture but instead will write the texture color composition into a single source code file!

The export process will take a while to complete so you might want to do some other thing while waiting.

After the export process has completed you will see a single .babylon file in the folder, make sure to include the file in the same folder as your index.html page and other javascript files.

We are not going into programming in this article but if you are interested in Babylon.js framework you can read all the tutorials on it’s main page through this link.

All right, now lets look at what we got here…

You can also export mesh together with skeletons with this Babylon.js addons which you can then use to move the part of the mesh around so overall speaking this is a great addons for Blender to those who uses the Babylon.js framework!