Graphics Reference
In-Depth Information
Creating and exporting a model from
Blender
Blender, which you can download from
http://www.blender.org/download/
,
is a great
tool to create 3D models and has excellent support for Three.js. With the right plugin,
Blender can export models directly into Three.js' own JSON format, which can then
easily be added to your scene.
Getting ready
Before we can use the JSON exporter in Blender, we first need to install the plugin in
Blender. To install the plugin, take the following steps:
1. The first thing you need to do is get the latest version of the plugin. We've
added this to the source code of this topic. You can find this plugin in the
as-
sets/plugin
folder. In that directory, you'll find a single directory with the
io_mesh_threejs
name. To install the plugin, just copy this complete direct-
ory to the plugin location of Blender. As Blender is multiplatform, depending
on your OS, this plugin directory might be stored in a different location.
2. For
Windows,
copy
the
directory
to
io_mesh_threejs
C:\Users\USERNAME\AppData\Roaming\Blender
Founda-
tion\Blender\2.70a\scripts\addons
.
3. For OS X users, it depends on where you installed Blender (extracted the ZIP
file). You should copy the
io_mesh_threejs
directory to
/location/of/
extracted/zip/blender.app/Contents/MacOS/2.6X/scripts/ad-
dons
.
4. Finally, for Linux users, copy the
io_mesh_threejs
directory to
/home/
USERNAME/.config/blender/2.70a/scripts/addons
.
5. If you've installed Blender through apt-get, you should copy the
io_mesh_threejs
directory to
/usr/lib/blender/scripts/addons
.
6. The next step is to enable the Three.js plugin. If Blender is already running,
restart it and open
User Preferences
. You can find this by navigating to
File
|
User Preferences
. In the screen that opens, select the
Addons
tab, which
lists all the plugins that are available.