source: OGRE/trunk/ogrenew/Tools/BlenderExport/Docs/index.html @ 657

Revision 657, 8.4 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HEAD>
3<TITLE>Blender to Ogre Exporter</TITLE>
4<META NAME="description" CONTENT="Blender to Ogre Exporter Manual">
5<META NAME="keywords" CONTENT="Ogre, Blender, Export">
6<META NAME="resource-type" CONTENT="document">
7<META NAME="distribution" CONTENT="global">
8<LINK TYPE="text/css" rel="stylesheet" href="style.css">
9</HEAD>
10<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
11<DIV>
12<H1>Blender to Ogre Exporter</H1>
13Blender is an open source 3D content creation suite for modeling, animation, rendering and video post production. The Blender to Ogre Exporter is a python script to run directly within Blender. Currently it supports the export of
14<UL>
15<LI>mesh objects with vertex colours, multiple materials, uv textures and blend modes,</LI>
16<LI>armature keyframe animations.</LI>
17</UL>
18<H2>Installation</H2>
19<P>
20The 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.
21</P>
22<UL>
23<LI>
24Copy the script either into ".blender/scripts" or the user defined scripts directory.
25</LI>
26<LI>
27In the "Scripts Window" run "Scripts -> Update Menus".
28</LI>
29</UL>
30<H2>Basic Usage</H2>
31<UL>
32<LI>In the "3D View" select the objects you want to export.</LI>
33<LI>In the "Scripts Window" run "Scripts -> Export -> Ogre XML".</LI>
34<LI>Choose your export options.</LI>
35<LI>Press the "Export" button.</LI>
36</UL>
37You will get a detailed log of the export process. Use the OgreXmlConverter to convert the generated XML files to binary .mesh and .skeleton files.
38<P>
39<DIV ID=exporter>
40<IMG SRC="images/exporter.png" WIDTH="473" HEIGHT="373" />
41<P>Screenshot of the exporter interface.</P>
42</DIV>
43<H3>Options</H3>
44<DL COMPACT>
45<DT>Export Textures</DT>
46<DD>Export uv texture coordinates and texture names.</DD>
47<DT>Export Armature</DT>
48<DD>Export armatures and armature animations.</DD>
49<DT>Export Armature as Mesh</DT>
50<DD>Generate an animated extra mesh in the form of the skeleton.</DD>
51<DT>Material File</DT>
52<DD>The name of the material script file that will be generated.</DD>
53<DT>Mesh Scale Factor</DT>
54<DD>All meshs and bones are scaled on export by this factor.</DD>
55<DT>RotX</DT>
56<DD>Angle of an additional rotation around the x-axis of all objects on export. This rotation is applied first. The default value is -90 degrees. This maps Blender's default up-vector (z-direction) to Ogre's default up-vector (y-direction).</DD>
57<DT>RotY</DT>
58<DD>Angle of an additional rotation around the y-axis. This rotation is applied second, after RotX.</DD>
59<DT>RotZ</DT>
60<DD>Angle of an additional rotation around the z-axis. This rotation is applied third, after RotY.</DD>
61<DT>Animation settings of</DT>
62<DD>Choose an object from the list of all objects selected for export. The animations that will be exported for that object are then displayed in the scroll area below. Each animation correspond to one line.</DD>
63<DL>
64<DT>Action name</DT>
65<DD>The name of the Blender action.</DD>
66<DT>Start frame (Sta:)</DT>
67<DD>Start frame of the animation.</DD>
68<DT>End frame (End:)</DT>
69<DD>End frame of the animation.</DD>
70<DT>Animation export name</DT>
71<DD>The animation name in the exported Ogre file.</DD>
72<DT>Delete</DT>
73<DD>Removes the animation from export.</DD>
74<DT>Add</DT>
75<DD>Add another animation to be exported.</DD>
76</DL>
77<DT>Update</DT>
78<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>
79<DT>Path</DT>
80<DD>All generated files of the exporter are written into this directory. Mesh files are named after the mesh object name in Blender with suffix ".mesh.xml". Skeleton files are named after the armature object name in Blender with suffix ".skeleton.xml".</DD>
81<DT>Export</DT>
82<DD>Export all objects in the list of objects selected for export.</DD>
83<DT>Quit</DT>
84<DD>Exit from the export script.</DD>
85</DL>
86<P>
87The script loads and saves its options to a text buffer "ogreexport.cfg" inside the current .blend file. You can disable this behaviour by changing the script variable KEEP_SETTINGS to 0.
88</P>
89</P>
90<H2>Specifics</H2>
91<H3>Mesh</H3>
92<P>The script supports sticky and per face vertex uv coordinates, smoothed and non-smoothed normals, vertex colours. Each rectangle face is automatically converted into two triangle faces in the exported mesh.</P>
93<P>The script does not support subdivision surface (SubSurf) options. To export a SubSurf object, you have to convert it into a Mesh object, "Object -> Convert Object Type... -> Mesh (keep original)".</P>
94<P> The script does not support double sided faces (Double Sided/Two Sided). To make a face double sided, select the face in the "Edit Mode", duplicate it ("Mesh -> Duplicate", RMB) and flip the normals ("Mesh -> Normals -> Flip").</P>
95<H3>Material</H3>
96<P>
97In contrast to Ogre, Blender treats material, uv texture and blend mode separately. Therefore, the name of the exported material consists of Blender's material name (if any), the blend mode and the name of the texture file (if any). The parts of the name are separated with slashs. Only textures assigned in the "UV/Image Editor" will be exported. You don't need to assign a material to a mesh in order to export uv textures. The following mapping is done on export:
98</P>
99<H4>Material Specific</H4>
100<TABLE>
101<TR>
102<TH>Blender</TH>
103<TH>Ogre</TH>
104</TR>
105<TR>
106<TD>Amb*AmbR Amb*AmbG Amb*AmbB</TD>
107<TD>ambient R G B</TD>
108</TR>
109<TR>
110<TD>Col</TD>
111<TD>diffuse R G B</TD>
112</TR>
113<TR>
114<TD>Spec*Spe, Hard</TD>
115<TD>specular R G B, Shininess
116</TD>
117</TR>
118<TR>
119<TD>Emit*Col</TD>
120<TD>emissive R G B</TD>
121</TR>
122<TR>
123<TD>VCol Paint</TD>
124<TD>vertex colours</TD>
125</TR>
126<TR>
127<TD>TexFace</TD>
128<TD>disable ambient, diffuse, specular and emissive</TD>
129</TR>
130<TR>
131<TD>Shadeless</TD>
132<TD>lighting off</TD>
133</TR>
134<TR>
135<TD>ZInvert</TD>
136<TD>depth_func greater_equal</TD>
137</TR>
138<TR>
139<TD>Shadow</TD>
140<TD>receive_shadows on/off</TD>
141</TR>
142<TR>
143<TD>No Mist</TD>
144<TD>fog_override true</TD>
145</TR>
146<TR>
147<TD>Env</TD>
148<TD>depth_func always_fail</TD>
149</TR>
150</TABLE>
151<P>
152<IMG SRC="images/world.png" WIDTH="288" HEIGHT="203" />
153</P>
154Blender's world settings that affect the exported Ogre material are marked green.
155<P>
156<IMG SRC="images/material.png" WIDTH="288" HEIGHT="203" />
157</P>
158<P>
159<IMG SRC="images/shaders.png" WIDTH="288" HEIGHT="203" />
160</P>
161<P>
162<IMG SRC="images/mirrortransp.png" WIDTH="288" HEIGHT="203" />
163</P>
164Blender's material settings that affect the exported Ogre material are marked green.
165<H4>Face Specific</H4>
166<TABLE> 
167<TR>
168<TH>Blender</TH>
169<TH>Ogre</TH>
170</TR>
171<TR>
172<TD>Textured</TD>
173<TD>texture_unit { texture (image filename without path) }</TD>
174</TR>
175<TR>
176<TD>Invisible</TD>
177<TD>no export</TD>
178</TR>
179<TR>
180<TD>Opaque Blend Mode</TD>
181<TD>scene_blend one zero (Ogre default)</TD>
182</TR>
183<TR>
184<TD>Additive Blend Mode</TD>
185<TD>scene_blend add</TD>
186</TR>
187<TR>
188<TD>Alpha Blend Mode</TD>
189<TD>scene_blend alpha_blend</TD>
190</TR>
191</TABLE>
192<P>
193<IMG SRC="images/face.png" WIDTH="398" HEIGHT="310" />
194</P>
195Blender's face settings that affect the exported Ogre material are marked green.
196<H3>Armature</H3>
197<P>
198You must have no more than four weighted bone assignments per mesh vertex. If you have more, the script will eliminate the lowest weighted assignments and renormalise the other weights. All vertices must be assigned to at least one bone.
199</P>
200<P>
201Armature animations are exported based upon keyframe ranges and action names. You can choose any frame as start and end frame of an animation. The script will automatically insert keyframes at the start and end of the exported animation and reverse the exported animation if the end frame is lesser than the start frame. In order to export armature animations of a mesh you don't have to select the armature separately.
202</P>
203<P>
204The script does not evaluate action constraints. To export an action with constraints you have to convert the constraint effects into ipo keys ("Action Editor -> Bake") and choose the baked action in the animation settings.
205</P>
206Ogre does not support nonuniform keyframe scaling. Ogre does not inherit parent bone scaling by default.
207<P>
208</P>
209The animation speed in the export in terms of frames per second is taken from the corresponding scene render button.
210<P>
211<IMG SRC="images/format.png" WIDTH="288" HEIGHT="203" />
212</P>
213Blender's format setting that affect the exported Ogre animation is marked green.
214</DIV>
215</BODY>
216</HTML>
Note: See TracBrowser for help on using the repository browser.