1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>OGRE Meshes Exporter</title> |
---|
5 | <meta name="description" content="OGRE Meshes Exporter Manual"> |
---|
6 | <meta name="keywords" content="OGRE, Blender, Export"> |
---|
7 | <meta name="resource-type" content="document"> |
---|
8 | <meta name="distribution" content="global"> |
---|
9 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
---|
10 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
11 | </head> |
---|
12 | |
---|
13 | <body> |
---|
14 | <div> |
---|
15 | <h1>OGRE Meshes Exporter</h1> |
---|
16 | <p> |
---|
17 | Blender is an open source 3D content creation suite for modeling, animation, rendering and video post production. The OGRE Meshes Exporter is a set of python scripts to run directly within Blender. Currently it supports the export of |
---|
18 | </p> |
---|
19 | <ul> |
---|
20 | <li> |
---|
21 | mesh objects with vertex colours, multiple materials, uv textures and blend modes, |
---|
22 | </li> |
---|
23 | <li> |
---|
24 | armature keyframe animations, |
---|
25 | </li> |
---|
26 | <li> |
---|
27 | relative mesh shape animations. |
---|
28 | </li> |
---|
29 | </ul> |
---|
30 | <h2>Table of Contents</h2> |
---|
31 | <ul> |
---|
32 | <li> |
---|
33 | <a href="#Installation">Installation</a> |
---|
34 | </li> |
---|
35 | <li> |
---|
36 | <a href="#Basic Usage">Basic Usage</a> |
---|
37 | <ul> |
---|
38 | <li> |
---|
39 | <a href="#Options">Options</a> |
---|
40 | </li> |
---|
41 | </ul> |
---|
42 | </li> |
---|
43 | <li> |
---|
44 | <a href="#Meshes">Meshes</a> |
---|
45 | </li> |
---|
46 | <li> |
---|
47 | <a href="#Materials">Materials</a> |
---|
48 | <ul> |
---|
49 | <li> |
---|
50 | <a href="#Rendering Materials">Rendering Materials</a> |
---|
51 | </li> |
---|
52 | <li> |
---|
53 | <a href="#Game Engine Materials">Game Engine Materials</a> |
---|
54 | </li> |
---|
55 | </ul> |
---|
56 | </li> |
---|
57 | <li> |
---|
58 | <a href="#Animations">Animations</a> |
---|
59 | <ul> |
---|
60 | <li> |
---|
61 | <a href="#Armature Animations">Armature Animations</a> |
---|
62 | </li> |
---|
63 | <li> |
---|
64 | <a href="#Shape Animations">Shape Animations</a> |
---|
65 | </li> |
---|
66 | </ul> |
---|
67 | </li> |
---|
68 | </ul> |
---|
69 | <h2><a name="Installation">Installation</a></h2> |
---|
70 | <p> |
---|
71 | The script needs access to standard Python modules not shipped with Blender. Consult the Blender documentation at <a href="http://www.blender.org"> www.blender.org</a> how to incorporate Python with Blender. |
---|
72 | </p> |
---|
73 | <ul> |
---|
74 | <li> |
---|
75 | Copy the the script and all subdirectories either into ".blender/scripts" or the user defined scripts directory. |
---|
76 | </li> |
---|
77 | <li> |
---|
78 | In the "Scripts Window" run "Scripts → Update Menus". |
---|
79 | </li> |
---|
80 | </ul> |
---|
81 | |
---|
82 | <h2><a name="Basic Usage">Basic Usage</a></h2> |
---|
83 | <p> |
---|
84 | There is a one-to-one correspondence: |
---|
85 | </p> |
---|
86 | <div class="importantBox"> |
---|
87 | <div class="center"> |
---|
88 | Blender Object (OB) ↔ Ogre::SceneNode |
---|
89 | </div> |
---|
90 | <div class="center"> |
---|
91 | Blender Mesh (ME) ↔ Ogre::Entity |
---|
92 | </div> |
---|
93 | </div> |
---|
94 | <p> |
---|
95 | The OGRE Meshes Exporter maps Blender Meshes (ME) to Ogre Entities. Please refer to the OGRE Scene Exporter for the mapping of Blender Objects (OB) to Ogre SceneNodes. |
---|
96 | </p> |
---|
97 | <p> |
---|
98 | To export Blender Meshes (ME) do: |
---|
99 | </p> |
---|
100 | <ul> |
---|
101 | <li> |
---|
102 | In the "3D View" select the mesh objects you want to export. |
---|
103 | </li> |
---|
104 | <li> |
---|
105 | In the "Scripts Window" run "Scripts → Export → OGRE Meshes". |
---|
106 | </li> |
---|
107 | <li> |
---|
108 | Choose your export options. |
---|
109 | </li> |
---|
110 | <li> |
---|
111 | Press the "Export" button. |
---|
112 | </li> |
---|
113 | </ul> |
---|
114 | <p> |
---|
115 | You will get a detailed log of the export process. All files are exported in the OGRE XML format. Use the |
---|
116 | OgreXMLConverter of your OGRE installation to convert the generated XML files to binary .mesh and .skeleton files. |
---|
117 | </p> |
---|
118 | <p> |
---|
119 | <img style="width: 517px; height: 518px;" src="images/meshesexporter.png" alt="exporter screenshot"> |
---|
120 | </p> |
---|
121 | <p>Screenshot of the exporter interface.</p> |
---|
122 | |
---|
123 | <h3><a name="Options"></a>Options</h3> |
---|
124 | <dl compact="compact"> |
---|
125 | <dt>Selected:</dt> |
---|
126 | <dd>The pop-up menu has an entry for every object that is selected for download. Select a mesh object in order to display its animation settings in the box below. |
---|
127 | <dl> |
---|
128 | <dt>Update</dt> |
---|
129 | <dd>Updates the list of all objects selected for export from the currently selected objects in the "3D View". Also updates the list of possible actions, deletes animations for removed actions and sets default animations for new actions.</dd> |
---|
130 | </dl> |
---|
131 | </dd> |
---|
132 | |
---|
133 | <dt>Animation Settings of</dt> |
---|
134 | <dd>Shows the animations that will be exported for the given mesh. You can switch between Skeleton, Pose and Morph animations, if available. |
---|
135 | <dl> |
---|
136 | <dt>Skeleton</dt> |
---|
137 | <dd>Show the skeleton animations, that will be exported. Only available if the mesh is modified via an armature either as parent or as modifier.</dd> |
---|
138 | |
---|
139 | <dt>Pose</dt> |
---|
140 | <dd>Show the pose animations, that will be exported. Only available if the mesh has shape keys.</dd> |
---|
141 | |
---|
142 | <dt>Morph</dt> |
---|
143 | <dd>Show the morph animations, that will be exported. Only available if the mesh has shape keys.</dd> |
---|
144 | </dl> |
---|
145 | Each line in the area with the scrollbar corresponds to an animation, that will be exported. |
---|
146 | <dl> |
---|
147 | <dt>Action name</dt> |
---|
148 | <dd>The name of the Blender action. Only available for skeleton animations.</dd> |
---|
149 | |
---|
150 | <dt>Start:</dt> |
---|
151 | <dd>Start frame of the animation.</dd> |
---|
152 | |
---|
153 | <dt>End:</dt> |
---|
154 | <dd>End frame of the animation.</dd> |
---|
155 | |
---|
156 | <dt>Animation export name</dt> |
---|
157 | <dd>The animation name in the exported OGRE file.</dd> |
---|
158 | |
---|
159 | <dt>Delete</dt> |
---|
160 | <dd>Removes the animation from export.</dd> |
---|
161 | |
---|
162 | <dt>Add</dt> |
---|
163 | <dd>Add another animation to be exported.</dd> |
---|
164 | </dl> |
---|
165 | </dd> |
---|
166 | |
---|
167 | <dt>Material Settings</dt> |
---|
168 | <dd> |
---|
169 | <dl> |
---|
170 | <dt>Material File</dt> |
---|
171 | <dd>The name of the material script file that will be generated.</dd> |
---|
172 | |
---|
173 | <dt>Coloured Ambient</dt> |
---|
174 | <dd>Use scaled diffuse colour as ambient colour instead of scaled white. |
---|
175 | This does only work for materials for which TexFace is not set.</dd> |
---|
176 | |
---|
177 | <dt>Game Engine Materials</dt> |
---|
178 | <dd>Export materials as displayed in the game engine. Materials are exported |
---|
179 | as displayed in the rendered results on default.</dd> |
---|
180 | |
---|
181 | <dt>Copy Textures</dt> |
---|
182 | <dd>Copy textures to the export path, if possible</dd> |
---|
183 | </dl> |
---|
184 | </dd> |
---|
185 | |
---|
186 | <dt>OgreXMLConverter</dt> |
---|
187 | <dd>Convert the XML files to binary files via the OgreXMLConverter. The exporter must be able to find the converter executable. You can specify its location in the preferences.</dd> |
---|
188 | |
---|
189 | <dt>Path</dt> |
---|
190 | <dd>All files of the exporter are written into this |
---|
191 | directory. Mesh files are named after the mesh name in Blender with suffix ".mesh.xml". Skeleton files are named after the mesh object name and the armature name in Blender with suffix ".skeleton.xml".</dd> |
---|
192 | |
---|
193 | <dt>Export</dt> |
---|
194 | <dd>Export all objects in the list of objects selected for export.</dd> |
---|
195 | |
---|
196 | <dt>Preferences</dt> |
---|
197 | <dd> |
---|
198 | <dl> |
---|
199 | <dt>OgreXMLConverter</dt> |
---|
200 | <dd> |
---|
201 | <dl> |
---|
202 | <dt>Auto</dt> |
---|
203 | <dd>OgreXMLConverter is called without specifying its location. Only works if the executable is in the PATH.</dd> |
---|
204 | |
---|
205 | <dt>Manual</dt> |
---|
206 | <dd>Calls the executable specified in Converter.</dd> |
---|
207 | |
---|
208 | <dt>Additional arguments</dt> |
---|
209 | <dd>Additional arguments added to the converter call.</dd> |
---|
210 | </dl> |
---|
211 | </dd> |
---|
212 | |
---|
213 | <dt>Ok</dt> |
---|
214 | <dd>Apply changes.</dd> |
---|
215 | |
---|
216 | <dt>Cancel</dt> |
---|
217 | <dd>Discard changes.</dd> |
---|
218 | </dl> |
---|
219 | </dd> |
---|
220 | |
---|
221 | <dt>Help</dt> |
---|
222 | <dd>Display the manual in the default browser.</dd> |
---|
223 | |
---|
224 | <dt>Quit</dt> |
---|
225 | <dd>Exit from the export script.</dd> |
---|
226 | </dl> |
---|
227 | |
---|
228 | <p>The script loads and saves its options to a text buffer |
---|
229 | "OgrePackage.cfg" inside the current .blend file. You can save the current settings, if you save the .blend file after quitting the exporter. |
---|
230 | </p> |
---|
231 | |
---|
232 | <h2><a name="Meshes">Meshes</a></h2> |
---|
233 | |
---|
234 | <p>The script supports sticky and per face vertex uv coordinates, |
---|
235 | smoothed and non-smoothed normals, vertex colours. Each rectangle face |
---|
236 | is automatically converted into two triangle faces in the exported mesh. The exporter defaults to using 16 bit indices but if the submesh vertex count exceeds the 16 bit limit then 32 bit indices are used.</p> |
---|
237 | |
---|
238 | <p>The script does not support subdivision surface (SubSurf) options. |
---|
239 | To export a SubSurf object, you have to convert it into a Mesh object, |
---|
240 | "Object → Convert Object Type... → Mesh (keep original)".</p> |
---|
241 | |
---|
242 | <p>The script does not support the "Double Sided" mesh option, use the "Two Sided" face option instead.</p> |
---|
243 | |
---|
244 | <p>To force the export of vertex colours, select "VCol Light" in the meshes' materials and export with "Game Engine Materials" disabled. |
---|
245 | </p> |
---|
246 | |
---|
247 | <h2><a name="Materials">Materials</a></h2> |
---|
248 | |
---|
249 | <p>In contrast to OGRE, Blender treats material, uv texture and blend |
---|
250 | mode separately. Also Blender distinguishes between material appearance |
---|
251 | in the game engine and material appearance in the rendered results. |
---|
252 | </p> |
---|
253 | |
---|
254 | <h3><a name="Rendering Materials">Rendering Materials</a></h3> |
---|
255 | |
---|
256 | <p>The name of the exported material is the same as in Blender. If the |
---|
257 | "Two Sided" face option is set, the suffix "/TWOSIDE" is appended. If |
---|
258 | the "TexFace" material option is set, the suffix "/TEXFACE" and the |
---|
259 | name of the texture image that is assigned with the UV/Image Editor is |
---|
260 | appended. The "Two Sided" face option has no effect in Blender's |
---|
261 | rendering results and is evaluated on export for convenience only. |
---|
262 | </p> |
---|
263 | |
---|
264 | <p> |
---|
265 | <img src="images/material.png" alt="material panel" height="203" width="288"> |
---|
266 | </p> |
---|
267 | |
---|
268 | <p> |
---|
269 | <img src="images/shaders.png" alt="shaders panel" height="203" width="288"> |
---|
270 | </p> |
---|
271 | |
---|
272 | <p> |
---|
273 | <img src="images/mirrortransp.png" alt="mirrortransp panel" height="203" width="288"> |
---|
274 | </p> |
---|
275 | |
---|
276 | Blender's material settings that affect the exported OGRE material are marked green. |
---|
277 | <p> |
---|
278 | <img src="images/image.png" alt="image panel" height="203" width="288"> |
---|
279 | </p> |
---|
280 | |
---|
281 | <p>The script exports image textures with "Map Input" set to "UV" and |
---|
282 | "Map To" set to "Col" and optional "Alpha". The supported image options |
---|
283 | are marked green. |
---|
284 | </p> |
---|
285 | |
---|
286 | <table> |
---|
287 | <tbody> |
---|
288 | <tr> |
---|
289 | <th>InterPol</th> |
---|
290 | <th>MipMap</th> |
---|
291 | <th>resulting filtering</th> |
---|
292 | </tr> |
---|
293 | <tr> |
---|
294 | <td>yes</td> |
---|
295 | <td>yes</td> |
---|
296 | <td>trilinear</td> |
---|
297 | </tr> |
---|
298 | <tr> |
---|
299 | <td>yes</td> |
---|
300 | <td>no</td> |
---|
301 | <td>linear linear none</td> |
---|
302 | </tr> |
---|
303 | <tr> |
---|
304 | <td>no</td> |
---|
305 | <td>yes</td> |
---|
306 | <td>bilinear</td> |
---|
307 | </tr> |
---|
308 | <tr> |
---|
309 | <td>no</td> |
---|
310 | <td>no</td> |
---|
311 | <td>none</td> |
---|
312 | </tr> |
---|
313 | </tbody> |
---|
314 | </table> |
---|
315 | |
---|
316 | <h3><a name="Game Engine Materials">Game Engine Materials</a></h3> |
---|
317 | The material name has to be unique. Therefore, the name of the exported |
---|
318 | material consists of Blender's material name (if any), the face blend |
---|
319 | mode and texture file name (if any). If vertex colours are defined, a |
---|
320 | postfix "/VertCol" is appended. Also, if the two-sided face option is |
---|
321 | set, "/TWOSIDE" is appended. |
---|
322 | |
---|
323 | <p>If a material is assigned to face, only the properties that affect |
---|
324 | the appearance in the game engine are exported. These are the "Col" and |
---|
325 | "Spe" colours, the "Amb", "Spec" and "Hard" factors and the "VCol |
---|
326 | Paint" and "TexFace" options. |
---|
327 | </p> |
---|
328 | Textures assigned with the UV/Image Editor are exported. Note that |
---|
329 | material image textures, which can be exported as rendering engine |
---|
330 | materials, give you more control over filtering and texture address |
---|
331 | modes. |
---|
332 | |
---|
333 | <p> |
---|
334 | <img src="images/face.png" alt="face options" height="310" width="398"> |
---|
335 | </p> |
---|
336 | <p> |
---|
337 | Blender's face settings affect the mesh appearance only in the game |
---|
338 | engine. The properties exported by the script are marked green. |
---|
339 | </p> |
---|
340 | |
---|
341 | <h2><a name="Animations">Animations</a></h2> |
---|
342 | <p> |
---|
343 | The animation speed in the export in terms of frames per second is taken from the corresponding scene render button. |
---|
344 | </p> |
---|
345 | <p> |
---|
346 | <img src="images/format.png" alt="format panel" height="203" width="288"> |
---|
347 | </p> |
---|
348 | <p> |
---|
349 | Blender's format setting that affect the exported OGRE animation is marked green. |
---|
350 | </p> |
---|
351 | <h3><a name="Armature Animations">Armature Animations</a></h3> |
---|
352 | |
---|
353 | <p>Armature animation export is available if the mesh has an armature as parent deform or an armature modifier and that armature has at least one action. Armature animations are exported based upon keyframe ranges and action names. You can choose any frame as start and end frame of an animation. In order to export armature animations of a mesh you don't have to select the armature |
---|
354 | separately. On export, the script will sample the bone poses of the selected action frame by frame. |
---|
355 | </p> |
---|
356 | <ul> |
---|
357 | <li>All vertices must be assigned to at least one bone.</li> |
---|
358 | <li>In OGRE, you can have no more than four weighted bone assignments per mesh |
---|
359 | vertex.</li> |
---|
360 | <li>Note that OGRE does not inherit parent bone scaling by default.</li> |
---|
361 | </ul> |
---|
362 | <p> |
---|
363 | <img src="images/armaturemodifier.png" alt="modifiers panel" height="203" width="288"> |
---|
364 | </p> |
---|
365 | <p> |
---|
366 | <img src="images/armatureparent.png" alt="modifiers panel" height="203" width="288"> |
---|
367 | </p> |
---|
368 | <p> |
---|
369 | The script supports a parented armature as well as an armature modifier. |
---|
370 | </p> |
---|
371 | |
---|
372 | <h3><a name="Shape Animations">Shape Animations</a></h3> |
---|
373 | Relative shape animations can be exported as pose or morph animations. On export, the script will sample the vertex positions frame by frame. |
---|
374 | <p> |
---|
375 | <img src="images/relativeshape.png" alt="shape panel" height="203" width="288"> |
---|
376 | </p> |
---|
377 | <p> |
---|
378 | The script exports relative shape keys. |
---|
379 | </p> |
---|
380 | </div> |
---|
381 | </body> |
---|
382 | </html> |
---|