Page 1 of 18
Easy Ogre Exporter for 3DSMAX
Posted: Tue Jan 31, 2012 10:11 pm
by arkeon
Hello !
new version : 2.3 on April 25 2015
Added Optional textures conversion to DDS format.
Added automatic shaders generator for normal / specular map and simple pixel lighting with multi light
As usual for our users, we were looking for an easy and free Ogre exporter for 3ds Max, and cannot found any with a good standard material converter nor a simple interface.
Last time that I need to export a simple scene it took me several hours to convert and set materials (and several crash).
So I decided to make my own exporter ^^
The objective for the Easy Ogre Exporter is to be the most simple as possible but with a lots of direct conversions from max scenes, and sure to be free and LGPL
3ds Max users are not developers !!
I started from the code of the FxOgreFxExporter (to get some clues), but since this exporter only manage a single mesh, I rewrote almost every thing
Here the current working state :
- one click export from the Max export menu > Ogre scene
- mesh binary export for each objects in the scene
- standard material conversions with colors, multi textures / uvs, refmap channel, transparency and material options like "double sided" or "wire"
- Architecture material conversion, with colors, diffuse texture, multi uv and transparency
- Mentalray Arch / Design material conversion, with colors, diffuse texture, multi uv and transparency
- export the textures files
- skeleton with animations from the main track or from the biped mixer if available
- nodes animations from the main track for each node in the dot scene
- lights and cameras ^^
- automatic unit conversion to meter
- morph animations
- mesh poses
- vertex animations
- small dialog interface for a minimum of setting like the Ogre version for meshs, prefixs, directories ...
- manage animations from the motion mixer
- generated shaders for normal maps or pixel lighting options
- textures conversion / optimization to DDS format
- a setup for quick installation
Actual exporter is compiled for max 9 to max 2015 in 32 and 64bits, can export in all Ogre versions
you can get the plugins files here
https://github.com/OGRECave/EasyOgreExp ... ter/output
chose your max version and copy the dle file in your max plugins directory
Please give me some feed back if you found some mistakes on the materials or animations conversions
If some developers with an experience on the Max SDK want to participate please do 
the lack of max SDK documentation give me some headache ^^
sources : https://github.com/OGRECave/EasyOgreExporter
Enjoy !
Re: Easy Ogre Exporter for 3DSMAX
Posted: Thu Feb 02, 2012 1:50 pm
by madmarx
That's great!
I wrote mine in maxscript (not opened source), because if this lack of sdk knowledge.
Best regards,
Pierre
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 05, 2012 4:13 pm
by EricB
Keep up the good work, really looking forward to this! (specially the morph animations)
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 05, 2012 4:19 pm
by arkeon
Hi I'm actually working on poses but the max morpher plugin return corrupted data and crash :/
I read some cases about this but I really don't understand why I can't access the morpher object correctly !
If anyone find a clue about this, it could help me a lot !
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 05, 2012 6:53 pm
by madmarx
Hi, when I did this with maxscript, I had to export the poses first and do the "rebinding" of the targets.
If the target has 'blue' color it is hidden and you have to do that, otherwise it is green and you don't need.
So for each pose :
- go to 100% for this pose, set all the other poses at 0%
- snapshot mesh, and put it in scene
- bind the morph target to the just produced mesh.
- then you can access data for this pose.
Hope this helps.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 05, 2012 9:16 pm
by arkeon
with the max SDK there is a MorphR3 class to access data from the morpher plugin (the class is from the morpher sample)
I've tried to get the object just like in the faceFx exporter but with no success or as described on this post :
http://dl3d.free.fr/phpBB2/viewtopic.ph ... 90037c671a
but i run into the same problem ^^ the MorphR3* is corrupted :/
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 05, 2012 11:36 pm
by madmarx
Maybe you can ask derek nedelman how he did?
or you may try to encapsulate maxscript calls just for this function?
Re: Easy Ogre Exporter for 3DSMAX
Posted: Mon Feb 06, 2012 7:21 pm
by arkeon
finally I get the morpher data !
Just for those who could lost their mind with this :
- rebuild all Ogre dependencies with _SECURE_SCL=0 in preprocessor
- rebuild ogre _SECURE_SCL=0 in preprocessor
- rebuild exporter with _SECURE_SCL=0 in preprocessor
and then it works ... weird and dirty ... but it works ...
Re: Easy Ogre Exporter for 3DSMAX
Posted: Tue Feb 07, 2012 12:59 am
by arkeon
Exporter update ^^
it now export Mesh poses with the poses names from the morpher modifier.
I've only tested on Max 2011 if some of you get export errors with mesh pose please tell me

I'm not sure if the _SECURE_SCL flag is needed for all max versions :/
Re: Easy Ogre Exporter for 3DSMAX
Posted: Thu Feb 09, 2012 8:23 pm
by Zargman
Hi there!
Thanks for this great plugin!
One question - any chance of supporting one very important feature - storage of parity in tangent w component? For mirrored meshes.
That's the only thing that keeps me from using your plugin instead of OgreMax...
Anyway, great work!
Re: Easy Ogre Exporter for 3DSMAX
Posted: Fri Feb 10, 2012 1:46 am
by arkeon
Hi !
why not ^^ but I don't have any idea of where to get this information from max meshs :/ nor how to set that on ogre mesh ...
Any clue or help is welcome

Re: Easy Ogre Exporter for 3DSMAX
Posted: Fri Feb 10, 2012 12:54 pm
by Zargman
I guess this thread covers this problem pretty well:
http://www.gamedev.net/topic/347799-mir ... ce-solved/
As for where to save it - in tangent vector, as 4th component, "w".
Re: Easy Ogre Exporter for 3DSMAX
Posted: Thu Feb 16, 2012 7:52 pm
by arkeon
Exporter updated to 0.4 !
- it now manage poses and poses animations.
- the node animations have been optimized to only get the track line keys positions.
- a progress bar on bottom of the max interface show the current export state.
- use the max offset instead of the false node position for non reset Xform objects
- correction on root bone translation
- lights and camera are now exported with the correct orientation
@Zargman
I use Ogre::Mesh::buildTangentVectors and Ogre::Mesh::suggestTangentVectorBuildParams to generate tangents for ogre mesh,
doest this manage the parity ?
looking in ogre documentation i saw buildTangentVectors (VertexElementSemantic targetSemantic=VES_TANGENT, unsigned short sourceTexCoordSet=0, unsigned short index=0, bool splitMirrored=false, bool splitRotated=false, bool storeParityInW=false)
Do I only have to set storeParityInW to true ?
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 19, 2012 6:50 pm
by arkeon
Export updated to 0.5
it is now possible to export for all Ogre versions
- added morph vertex animatons
- manage animations defined in the max motion mixer (graph editor menu > motion mixer)
- added a configuration interface to select the Ogre target version and other advanced settings like tangent build options (parity)
see the wiki page for more details
http://www.ogre3d.org/tikiwiki/Easy+Ogre+Exporter
It need tests

please gives your feedback
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 26, 2012 9:29 am
by shanefarris
Great tool, but I'm running into some problems. When I export an animation, the location of the bones are not in the correct location.
I also tried to use OgreMax, the bones are located differently, but still wrong. The only thing I can think of is the animations were used using Pen Attribute Holder, its a script that allows you to store custom attributes, but I'm not an artist, and I don't even know what that means.
http://www.creativecrash.com/3dsmax/dow ... ute-holder
Any ideas on what I can do?
Thanks.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 26, 2012 5:23 pm
by arkeon
what modifier and bone type do you use ?
Is the bind position and animation are bad or only the animation ?
biped with skin modifier seems to works fine.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 26, 2012 8:10 pm
by shanefarris
arkeon wrote:what modifier and bone type do you use ?
Is the bind position and animation are bad or only the animation ?
biped with skin modifier seems to works fine.
How do I find out? I only know enough 3DS to export stuff, and move around in the viewports
The mesh is only bad once I start the animations, if there are no animations the mesh looks fine.
Would you like for me to send you the model?
Re: Easy Ogre Exporter for 3DSMAX
Posted: Sun Feb 26, 2012 10:43 pm
by arkeon
Yes the model could help to understand

Re: Easy Ogre Exporter for 3DSMAX
Posted: Mon Feb 27, 2012 1:43 am
by arkeon
Corrections done for bone structures (not based on biped)
So it was not due to the script.
Just a hint for your model, you should use bones for the models too, it should be easier to only have an animation for all nodes (in your case)
there is also an option to generate automatic LOD levels in this version, but in some cases the edge list construction fail if the vertices are not welded correctly (don't know why)
if someone already had a problem with Ogre::ProgressiveMesh::generateLodLevels and buildEdgeList, please let me know.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Mon Feb 27, 2012 2:40 am
by shanefarris
arkeon wrote:Corrections done for bone structures (not based on biped)
So it was not due to the script.
Just a hint for your model, you should use bones for the models too, it should be easier to only have an animation for all nodes (in your case)
there is also an option to generate automatic LOD levels in this version, but in some cases the edge list construction fail if the vertices are not welded correctly (don't know why)
if someone already had a problem with Ogre::ProgressiveMesh::generateLodLevels and buildEdgeList, please let me know.
Awesome it works!
One more question, the animations are all on one track, how do I split them up into there own animations?
Re: Easy Ogre Exporter for 3DSMAX
Posted: Mon Feb 27, 2012 9:27 am
by arkeon
To split the track you have to use the motion mixer :
- first select your animated object
- Animation menu -> save animation and choose the animation interval (from 0 to 20 for example)
- graph menu -> motion mixer
- add a track for each animated object
- add a clip from each file
so the motion mixer clips will be exported as single animations with the clip name
Re: Easy Ogre Exporter for 3DSMAX
Posted: Wed Feb 29, 2012 3:43 pm
by shanefarris
arkeon wrote:To split the track you have to use the motion mixer
I tried doing that and had problems, so now I am seeing if an artist friend of mine can do it. It is pain when Max has so many different ways of doing something, and having to support all those different technologies just to do the same thing.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Wed Feb 29, 2012 3:48 pm
by arkeon
Yes you're right :/
and this is the only way I found to separate animations in 3ds max.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Wed Feb 29, 2012 5:35 pm
by elegilor
Hello. I am the friend in question

Do you know if it's possible to save animation data from multiple objects (i.e. multiple meshes and their respective bones) into one animation file then create one track for those objects in Motion Mixer, or do I have to export separate files for each individual object and create tracks for every object with animation data (i.e. individual bones)? The animated character in question is a soldier with a gun, so there's separate geometry/bones for gun, body, clothing etc. Any help would be greatly appreciated.
Re: Easy Ogre Exporter for 3DSMAX
Posted: Wed Feb 29, 2012 6:03 pm
by arkeon
Hi
it is not possible to export nodes animations into a skeleton animation (I think), if you want to have only one animation the simple way is to attach all your "objects" and animate them with bones.
Edit :
Sorry didn't understand all your question ^^
animations in ogre are by :
- bones (skin modifier)
- nodes animation
- morph (morpher modifier with mesh poses)
- mesh animation (vertex translations)
animations in max are by object.
an animated mesh with bones should have his animation stored by the skin modifier.
so in Max for the motion mixer, you have to save an animation file per object (I'm not sure of that I'm not a max expert)
- select your object
- in the animation menu > save animation
- in graph menu -> motion mixer
- add a track from the selected object
- import a clip from your animation file
and this for each animated objects
I really hop that you don't need to do this for each bone, but the exporter just get the animation interval and the clip name from the motion mixer and don't care of the animations keys in that case, so I think it 'll work
Tell me if I'm right
