Skip to main content
History: Tools: Blender
View published page
Source of version: 16
(current)
{IMG(src="http://www.blender.org/typo3temp/pics/d7fb80c032.jpg",height="50%",align="right")}{IMG} !Introduction [http://www.blender.org|Blender] is an open source 3D modeling program. It is one of the most popular programs used for modeling, texturing, animating and rendering. It is available for free, for all major operating systems. You can create any kind of 3D model in Blender, then export it to be used in your Ogre3D application. This page covers what Blender can do for an Ogre developer, the tools available and common problems experienced. {maketoc} {IMG(src="http://www.blender.org/typo3temp/pics/e673bb7b9d.jpg",height="50%",align="right")}{IMG} !Tools The basic tools are importing information into Blender, exporting it out, any necessary conversions and requirements for rendering in Ogre. The list below is a quick summary of the tools available. Further down the page are more in-depth descriptions of some of the major tools. Note that all of these tools are created by the community, you and I, just like this wiki. If a tool doesn't have a feature you'd like (or has a bug you'd like to get rid of), perhaps you can persuade the author to work on it, or you are welcome to submit patches. Search in the [http://www.ogre3d.org/phpBB2/|forum] for news and discussions on a particular tool. Features, bugs and project status are often discussed there. * __((OgreXmlConverter))__ - Converts .xml to .mesh ** Converts a text XML file to a binary Ogre mesh or skeleton file or mesh/skeleton to XML ** Command line tool installed as part of the SDK, also found in Tools/XMLConverter ** A Step-by-step How-To can be found here: __((Blender to Ogre))__ * __((BlenderImport))__ - Imports a single mesh into Blender ** Meshes and materials are imported ** Armatures and animations are not, yet ** See below for more details ** Found in ogreaddons/blenderimport (in SVN - see FAQ below) * __((Blender Exporter|Meshes Exporter))__ - Exports meshes and armatures ** UV mapped textures, many material settings, armatures and animations are exported ** Found in Tools/BlenderExport ** ((NormaliseBlenderMeshForOgre)), a Blender script for adjusting bone weights * __((Blender dotScene Exporter|BlenderSceneExporter))__ - Exports a scene as ((dotScene)) file ** Cameras, lights and object descriptions (nodes, entities, material pointers) are exported ** Individual meshes still need to be exported with the blender exporter ** Can export custom object properties ** Found in ogreaddons/blendersceneexporter * __((dotScene|dotScene Format))__ - (aka DSI) A Framework for loading dotScene files into Ogre ** Works with the dotScene files created from the BlenderSceneExporter ** Source and a viewer is included for integration into your project ** Found in ogreaddons/dotsceneformat * __dotSceneOctree SceneConverter__ - Converts dotScene files to binary octree files ** This tool compiles a dotScene file specifically for use with the dotSceneOctree SceneManager ** Found in ogreaddons/dotsceneoctree * __dotSceneOctree SceneManager__ - A ((SceneManagersFAQ|SceneManager)) for dotScene octree files ** This scene manager organizes scenes based on octrees within Ogre ** It accepts files compiled with the above converter tool ** Found in ogreaddons/dotsceneoctree * __ogrefsrad__ - A radiosity processor specialized for lightmap generation ** A tool for lightmap generation based on Paul Nettle's FSRad, a lightmap generator making use of radiosity techniques ** Imports/exports dotScene files, imports binary .mesh files, exports to text XML ** Exports simplified material files (static lightmapping) ** Found in ogreaddons/ogrefsrad * __((ATI nmf Exporter|ATI .nmf Interface))__ - Interface to ATI's Normal Mapping Tool ** Allows creation of normal maps of Ogre meshes * __Loading ''*.blend'' files by Ogre__ ** can be done by the project ''OgreKIT'' (formerly GameKIT) *** see this [http://ogre3d.org/forums/viewtopic.php?f=11&t=54431|forum thread] *** and the [http://code.google.com/p/gamekit|project page] (which includes a wiki) ** alternatively just use the ''blend file parser'' *** sources are [http://dynamica.googlecode.com/svn/trunk/Demos/BlendParse|here] *** hosted by the project [http://dynamica.googlecode.com|Dynamica] *** for questions ask [http://ogre3d.org/forums/viewtopic.php?p=404750#p404750|here] Look also to ((OGRE Exporters)) - maybe there is something new. !FAQ !!General __Where can I learn more about blender, and how to use it?__ [http://www.blendercookie.com/getting-started-with-blender/|This is a good introduction to Blender]. [http://wiki.blender.org/index.php/Main_Page|The official Blender wiki]. More useful as a reference than for learning. [http://www.blender3d.org/e-shop/|The Blender e-shop]: official books and DVDs for learning Blender. DVDs are under Creative Commons license, and can be downloaded legally for free. WikiBooks: [http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro|Blender 3D Noob to pro]. Popular third-party websites offering Blender education as video tutorials (mostly free): [http://www.blendercookie.com/|Blender Cookie], [http://www.blenderguru.com/|Blender Guru], [http://www.cgmasters.net/|CG Masters], [http://feeds.feedburner.com/theprocessdiary|The Process Diary], [http://cg.tutsplus.com/category/tutorials/blender/|CG Tuts+]. [http://www.blender.org/education-help/tutorials/|A small listing of tutorials from various sources]. [http://www.blendercookie.com/|Blender Cookie] - Many free video tutorials on blender 2.4x and 2.5x. __Blender is confusing, I can't get it to do anything useful__ Blender is not a trivial application one can just play with, and hope to guess how it works. Start at the beginning: follow one or two introductory tutorials from the above-listed websites, and you'll see how the pieces fit together. __What do you mean 'Found in ogreaddons', 'Tools/*' or SVN__ SVN (Subversion) is a tool we use to store the source code for ogre. ogreaddons is in a separate directory from the Ogre Rendering Engine SVN repository. For the most up to date copy, browse our [http://ogreaddons.svn.sourceforge.net/viewvc/ogreaddons/trunk/|SVN Repository] and download the latest versions or read the [http://www.ogre3d.org/index.php?option=com_content&task=view&id=17&Itemid=141|Ogre Community Add-on Projects] to learn more about Ogre Add-ons and how to download. Read [http://www.ogre3d.org/index.php?option=com_content&task=view&id=415&Itemid=144|Getting OGRE From Subversion] for more information about Ogre and SVN. (Note: Ogre and Ogre add-ons used to be held in a CVS-repository, so you may run across references to "CVS" in the wiki pages. You can change "CVS" for "SVN" in those pages and you are fine. They are very similar systems. The link to the repository and tools for reading them are of course changed. See the above links for info.) __What is an Octree?__ An octary tree - a tree with 8 children per node. Each node represents a cube. Cut that cube with 3 even slices, 1 down the middle of each face (X plane, Y plane and Z plane). Now your single cube has turned in to how many cubes? The answer is left as an exercise for the reader. Octree is a space-partitioning technique, an alternative to BSP. Deciding whether to use Octree or BSP depends on several factors, but in general Octrees are better for levels with a lot of open space, or levels that are very dynamic, while BSPs are better for levels with dense, crowded geometry, or levels that are quite static. Octrees usually cost more computationally than BSPs, but that's because BSPs require preprocessing ('baking') and are therefore inherently more static, so that's a tradeoff you'll have to decide on. For comparison, idTech and Unreal Engine use BSPs, while CryEngine uses Octrees. __What is UV Texturing?__ Texture mapping. It means applying a 2D image onto a 3D object. You'll need to define UV coordinates in Blender on your object before you can apply a UV texture or expect Ogre to display it properly. __Why do I get some strange python or other errors when running a script?__ Blender uses the Python programming language to execute scripts. Some scripts need a full Python environment to be executed. Python is not installed by default on some operating systems, such as Windows. So be able to execute the script, you'll have to install the correct version of Python on your machine: # check which version of Python is expected in the console, when Blender starts # go to [http://www.python.org/download/releases/|the list of Pyton releases], and download the appropriate version. Only the first two version numbers matter. For example if Blender asks for Python 2.6, then installing Python 2.6.6 is ok, but not Python 2.7 or 2.5. # install Python, restart your computer, launch Blender. It should say it found Python. Otherwise search [http://blenderartists.org/forum/|the BlenderArtists forum], or [http://www.ogre3d.org/forums/|the Ogre3D forum] for a solution to your problem. !!Mesh and Armature Exporter __When I select multiple objects in blender and use the export with OgreXML, why do I get so many xml files?__ OgreXML is the BlenderExport tool, which is only for exporting a single mesh. Export your objects individually or use the dotScene exporter. You can also join your objects into a single mesh within Blender with Object->Join Objects or Ctrl+J. __My objects look smooth and nice in Blender, but when I view them in Ogre they look all blocky. Why?__ You are probably using subdivision surfaces in Blender (subsurf). Blender does not export these surfaces so you get the original mesh you started with. Use the Object->Convert Object Type or Alt+c functions to convert the subsurfed mesh into a real mesh. This will duplicate your object in the same spot. Make sure to select and export only the new mesh for Ogre. __I added a texture to the material definition file after export, why doesn't it display?__ If you do not define any uv coordinates for your mesh, Ogre sets them to the default value (0,0). In this case you see the first texture pixel as colour. See [http://download.blender.org/documentation/htmlI/|Blender's documentation] on how to use uv-textures. __Why does the export log say "error in normalize"?__ This error happens if the length of the vector to normalize is below some threshold. This may happen in the calculation of face normals (likely) or in the conversion of the armature (not likely). In the case of the face normal you have some really small faces in your mesh, which is usually not what you want. In this case you can use the "Remove Doubles" option in Blender's "Mesh Tools" to get rid of them. __Why does the script abort with an IndexError?__ If you are trying to export an object that doesn't have a material, you may get this error: ~pp~ Traceback (most recent call last): File "<string>", line 3526, in buttonCallback File "<string>", line 3179, in export File "<string>", line 3052, in export_mesh IndexError: list index out of range ~/pp~ To fix this, simply add a material to the object(s). __My model looks squeezed in Ogre. Can I export a mesh object in object coordinates but with object size transformation applied?__ No, but you can apply the object transformations with "Object->Clear/Apply->Apply Size/Rotation" (Ctrl+A). Alternatively, you can apply the mesh object size transformation with the [http://www-public.tu-bs.de:8080/~y0007777/Ogre3D/applymeshobjectsize.py|applymeshobjectsize.py] script before exporting. __Why does my animation look distorted and weird in Ogre, while it looks good in Blender?__ There are several things you can check that can cause a distorted animation: * Select your skeleton/armature, go to edit mode and press N, the property window opens, set the __"Roll"-value for each bone to zero__, unless you intentionally want it different. * Go back to __Object__ mode, select your mesh and press N to get the properties window, make sure all __"size"-values are positive numbers__. * Like in the answer to the previous question mentioned apply the object transformations with "Object->Clear/Apply->Apply Size/Rotation" (Ctrl+A), after parenting the object to the armature, before you animate, or use this [http://www-public.tu-bs.de:8080/~y0007777/Ogre3D/applymeshobjectsize.py|applymeshobjectsize.py]-script for existing animations before you export. __Why are some of the faces not visible in Ogre although I can see them in Blender?__ Usually faces have only one visible side determined by the face normal. You can check visibility in Blender using Blender's internal game engine (P, Esc). Normals can be displayed in "Edit Mode" using the "Draw Normals" option from the "Editing" buttons. You can change normals using the "Mesh->Normals" menu. If you want the face to be visible from both sides in Ogre also, e.g. for foliage, select the face in "UV Face Select" mode and set it to "Two Sided" via the "Face->Active Draw Mode" menu. __What's the purpose of "Game Engine Materials" option?__ If you export with "Game Engine Materials" enabled, the exported mesh should look similiar to the mesh in Blender's game engine (Draw type: Textured, P key). If "Game Engine Materials" is disabled on export, the result should look similar to Blender's rendering result (F12 key). __My mesh has a strange rotation or translation in Ogre relative to how it appears in Blender.__ The mesh exporter computes the mesh relative its own __local__ coordinate system, not the global coordinate system. One way to fix is this is to reset the local coordinate system in Blender to match the global system (using __Transform->Properties__), then transform the mesh to the way it should be in __Edit Mode__, which will not alter the local coordinate system. !!dotScene Exporter __How do I define an object or mesh as static for Ogre?__ First you need CVS revision 1.2 or higher of the export script. Then select the mesh. In logic buttons (F4), add a property of type "Bool", named "static" and set it to true. !!Ogre Blender Import Script __What is the default scale for importing an [http://Ogre.mesh.xml|Ogre.mesh.xml] file?__ If you are using the [http://ogre.cvs.sourceforge.net/*checkout*/ogre/ogreaddons/blenderimport/ogre_import.py?content-type=text%2Fplain] script then it will be scaled by 0.1 by default. You can edit the script to change this to 1.0 or some other scale if needed. !See also * [http://www.blender.org/|Blender website] * ((Blender Exporter)) * ((Blender to Ogre)) * ((Blender Video Tutorials)) * ((Blender dotScene Exporter)) * ((BlenderImport)) --- Alias: (alias(Tools:_Blender))
Search by Tags
Search Wiki by Freetags
Latest Changes
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
131 online users
OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username
Password
CapsLock is on.
Remember me (for 1 year)
Log in