Easy Ogre Exporter for 3DSMAX

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

ok, tell me if it works for you
OpenSpace 3D Project manager
http://www.openspace3d.com
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

arkeon wrote:ok, tell me if it works for you
No..not work,uv coord still incorrect
teapot right.jpg
This is 3DSMAX
teapot wrong.jpg
This is exported scene by EOE
You do not have the required permissions to view the files attached to this post.
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

EOE 1.8 really fixed some uv incorrect problems,for example my Sponza scene from Crysis,but there are still some incorrect here:)
(I'm using 3DSMAX 64bit and Ogre1.8)
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

arg :/

can you send me this max file, I'll try to understand the difference with my tests
OpenSpace 3D Project manager
http://www.openspace3d.com
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

I tried a teapot with a checkboard texture and get it right on export.
Which version of Max do you use ?
did you change something on the teapot or the UV ?
OpenSpace 3D Project manager
http://www.openspace3d.com
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

arkeon wrote:I tried a teapot with a checkboard texture and get it right on export.
Which version of Max do you use ?
did you change something on the teapot or the UV ?
I use 3DSMAX 2013 64bit and Ogre1.8.2 and EOE 1.8
The teapot model is the original one,just set a higher segments(from default 4 to 12)
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hmm, did you try to apply a reset Xform on the mesh before the export ?

EOE get the informations directly from max classes, but some values are not up to date on meshs until a reset Xform.

I'll try so set it to 12 to see if I get the bug.
OpenSpace 3D Project manager
http://www.openspace3d.com
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Export of a teapot with 12 segments and a checkboard, look good in Ogre 1.8 ^^
I did the test with max 2014, I'll try tomorrow on 2013

Image


Edit : works well for me on 2013 too ^^
OpenSpace 3D Project manager
http://www.openspace3d.com
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

arkeon wrote:Hmm, did you try to apply a reset Xform on the mesh before the export ?

EOE get the informations directly from max classes, but some values are not up to date on meshs until a reset Xform.

I'll try so set it to 12 to see if I get the bug.
Strange...... :shock: Reset Xform doesn't work...back to segments 4 doesn't work too...
Tried other EOE settings(build edge list,old mesh version),no one worked.

Post my scene here for test :D
Single.7z
You do not have the required permissions to view the files attached to this post.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Your file works well for me.
you did not apply a texture on the teapot, only a material, do you add the texture by code ?
if yes I think that your texture unit UV mode can be bad here.
OpenSpace 3D Project manager
http://www.openspace3d.com
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

arkeon wrote:Your file works well for me.
you did not apply a texture on the teapot, only a material, do you add the texture by code ?
if yes I think that your texture unit UV mode can be bad here.
God...I got it...The culprit is tex_address_mode!I set use CLAMP tex_address_mode,it's ridiculous...why I can't use clamp mode,it is widely used in my material O.O,do you have some ideas?
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

I think that you could use the clamp method on textures with no repetition.

(glad to ear that the problem was not on the export :))
OpenSpace 3D Project manager
http://www.openspace3d.com
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Easy Ogre Exporter for 3DSMAX

Post by panzhiyi3 »

arkeon wrote:I think that you could use the clamp method on textures with no repetition.

(glad to ear that the problem was not on the export :))
It's very intresting :?
rossTnick
Gnoblar
Posts: 8
Joined: Thu Jan 03, 2013 4:47 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by rossTnick »

Hello,

I posted back in late January 2013 regarding a series of

Info: Ignore instanciated mesh
Error writing mesh binary file
Warning, mesh skipped

Messages that I would get on export from Windows 7 Max 2013 of my models. It seemed that it was related to some sort of mesh instancing going on. You proceeded to promptly correct it in version 1.5, which I was very thankful for.

My current issue is that the same thing appears to be happening with the latest version of the exporter for Max 2014. Could it be that the previous correction may not have moved over to a next version?

Thank you for any help / advice regarding this.

Ross
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hello,

I checked the code from 1.5 about instantiated meshs, there is no change in the last versions.
Are you sure this is the same problem ?

please can you show me the log again.

[EDIT]

In fact the "Error writing mesh binary file" is back in the log even if this is only a mesh skipping cos of the instantiated mesh.
(I'll correct that for the next versions)
Did your scene export well even with this message ?
OpenSpace 3D Project manager
http://www.openspace3d.com
rossTnick
Gnoblar
Posts: 8
Joined: Thu Jan 03, 2013 4:47 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by rossTnick »

Here's a better example of what I'm getting - I have a vase mesh in a max scene where 1/4 of the vase is instanced and repeated 4 times to form the full vase. The exporter will correctly export the first vase mesh but then give that error for the 3 rest of them - I would suspect that it would try to also re-use the same mesh - and looking at your eoe plugin code it looks like that is what it tries to do - but then no Node information is output in this case - if the node informaiton was still output and it just used the already exported mesh, then I think things would be fine. I wonder if it has to do with submeshes this time? Here is the log:

Found node: Vase_Quarter_001
Found mesh node: Vase_Quarter_001
Info: Number of map channel (UV) found in this mesh : 2
Exporting 0 textures...
Writing Vase_Quarter_001 mesh binary...
Info: Create Ogre submeshs
Info: create submesh : 0
Info: Create mesh bounding box
Info: Create mesh edge list
Info: Create mesh tangents
Info: Write mesh file : v:\rtredinnick\prototype_projects\desbarres\max\mesh\desbarresVase_Quarter_001.mesh
Found node: Vase_Quarter_002
Found mesh node: Vase_Quarter_002
Info: Number of map channel (UV) found in this mesh : 2
Writing Vase_Quarter_002 mesh binary...
Info: Create Ogre submeshs
Info: create submesh : 0
Info: Ignore instanciated mesh
Error writing mesh binary file
Warning, mesh skipped
Found node: Vase_Quarter_003
Found mesh node: Vase_Quarter_003
Info: Number of map channel (UV) found in this mesh : 2
Writing Vase_Quarter_003 mesh binary...
Info: Create Ogre submeshs
Info: create submesh : 0
Info: Ignore instanciated mesh
Error writing mesh binary file
Warning, mesh skipped
Found node: Vase_Quarter_004
Found mesh node: Vase_Quarter_004
Info: Number of map channel (UV) found in this mesh : 2
Writing Vase_Quarter_004 mesh binary...
Info: Create Ogre submeshs
Info: create submesh : 0
Info: Ignore instanciated mesh
Error writing mesh binary file
Warning, mesh skipped

Thanks for any help!

Ross

Edit - looking at the "exportNode" function in EasyOgreExporter::ogreExporter, it just appears that what is happening is since the mesh is already exported, "writeEntityData" returns false, the exporter writes "Warning, mesh skipped", and then the bit below never gets hit - where the node is written. I think if the writeEntityData function returned true if the writeOgreBinary function recognizes an instanciated mesh, it would be fixed. Thanks!

And yes - my scene did export fine despite the message, I just ended up with missing geometry / objects after wards due to the missing nodes.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

So you were totally right :)

EOE 1.9 :
- correction on ignored instantiated meshes
- setup available for Max 2011 to 2014 (there is no environment variable for older versions)

You can try the installation setup from https://arkeon.dyndns.org/svn-scol/trun ... EOEMax.exe
OpenSpace 3D Project manager
http://www.openspace3d.com
rossTnick
Gnoblar
Posts: 8
Joined: Thu Jan 03, 2013 4:47 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by rossTnick »

Thanks a ton for such a quick turnaround!

Ross
RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile
x 3

Re: Easy Ogre Exporter for 3DSMAX

Post by RigoCL »

Hi, So far now I'm experimenting a couple of issues using the Exporter for 3ds Max 2013, I'm using Win7 and the .exe mentioned in this page:
http://www.ogre3d.org/tikiwiki/tiki-ind ... e+Exporter

1.- The EOEMax.exe didn't work for me, I'm testing the export from 3ds to Ogre, so I have also installed Max 9 and Max 10, I think the installer got confused with so many versions installed and ended creating a "plugins" directory in root C: with only one file in it named EasyOgreExporter.dle, so Max 13 didn't have the "Ogre Scene" option available. Fortunately, I had tested the exporter with Max 10, so I knew I had to install the .dle file in the "plugins" directory, so I did manually and it worked. For who this is the first time, this problem will be a big problem.

2.- Having the "Ogre Scene" option available, I tried to export a single mesh with three animations, the exporter worked creating the dotscene, mesh, skeleton and material files. But the problem is that the Ogre.txt complains not finding the skeleton file.

Code: Select all

13:32:24: Skeleton: Loading Dwarf.skeleton
13:32:24: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource Dwarf.skeleton in resource group General or any other group. in ResourceGroupManager::openResource at ..\..\..\OgreMain\src\OgreResourceGroupManager.cpp (line 756)
13:32:24: Unable to load skeleton Dwarf.skeleton for Mesh Dwarf. This Mesh will not be animated. You can ignore this message if you are using an offline tool.
The simple questions here are:
a) I have used the dotscene exporter for Blender, that exporter creates XML files (.mesh.xml and .skeleton.xml) that can be serialized with any version you want, according to Ogre version you are using. This 3ds Exporter doesn't create this XML files?? or it does and deletes them??
b) I'm really confused because I don't know what serializer the 3ds exporter is using. How does this serializing process work?? where is OgreXMLConverter.exe taken from by the exporter??

Besides, the Ogre Mesh Viewer v0.1 complains on the version the resulting mesh was serialized, will look for a more updated one.

Need to solve this just to be able to my animations.

Thanks in advance.
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

hi !

you're right there must be something wrong in the setup.
it search for system variables to get max directories.
you can try to install the files manually.

I'll look at this.

About the skeleton warning in the ogre log this is normal, since the skeleton do not exist when the mesh is created, it is set after.
There is no xml conversion, the exporter use ogre directly to generate mesh files.
it use ogre 1.9, so you can choose the ogre mesh version on export.
OpenSpace 3D Project manager
http://www.openspace3d.com
RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile
x 3

Re: Easy Ogre Exporter for 3DSMAX

Post by RigoCL »

Thanks for the fast reply, this is a wonderful exporter.

But I have one new issue, I downloaded a Mesh Viewer and it only shows one Animation called "default_skl", looking at Ogre.txt I see this:

Code: Select all

15:11:36: Exporting bones..
15:11:36: Bones exported.
15:11:36: Exporting animations, count=1
15:11:36: Exporting animation: default_skl
15:11:36: Animation exported.
But my mesh has 4 animations, "default_skl" is just one of the four available.

I must say that I'm totally new to Max and am loading the mesh from a PSK and the four animations from its corresponding PSA, using ActorX Import, all the animations play ok in Max. I first thought should "attach" the animations to the mesh, but if one is being exported, why not the others? besides, "default_skl" is not the name of any of my animations, so why the exporter recognizes there is an animation but doesn't know/consider the real name?
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hello,
you can look at the FAQ here : http://www.ogre3d.org/tikiwiki/tiki-ind ... e+Exporter

the animations can be defined in the motion mixer, or with animation time tag.

9 How can I set the animation intervals ?

This can be defined from the Max Motion Mixer by using clips.
The animations can also be defined directly in the track line using time tags (the time tag interface is on the right bottom of the track line).
how it works ?
add a time tag on the first key of your animation with the desired animation name
add a time tag relative to the first tag to set the last animation key
OpenSpace 3D Project manager
http://www.openspace3d.com
def87
Halfling
Posts: 90
Joined: Wed Sep 19, 2012 1:41 pm
x 1

Re: Easy Ogre Exporter for 3DSMAX

Post by def87 »

Hello arkeon,

first of, you have done a great job an EOE. Thank you for sharing!

I have trouble creating a working version of your plugin. Compiles, initializes in max2012 32bit, but crashes on export, mostly empty logs.
For my Ogre application I need to genrate a bit different .scene format and additional files.

I have created my own .scene exporter for Softimage based on the XSIExporter from the Ogre src, so I am not new to this, but _SECURE_SCL=0 and staic linking is confusing me for the last 4 days...

- Is _SECURE_SCL=0 not default in vs8 and up? I have tried with vc9 and vc10.
- Only OgreMain is needed for your plugin, correct?
- Couldn't I also use OgreMain.dll from the SDK for dynamic linking?
- I tried with a CMake build of the 1-9-0 Ogre src and the STATIC option.
- I am using the prebuild dependencies... that my only problem?
- because I do not need dss conversion I eliminated the nv code to avoid any problem there.
- which version of boost is needed?

Any help would be greatly appreciated!
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi !

I got my hair off with the _SECURE_SCL=0, I don't know if this is need on last max sdk versions, but this is needed to get the morpher working on old max.

I use VS 2010 to compile.
- rebuilt all dependencies with _SECURE_SCL=0 in preprocessor (don't know if this is really needed)
- Built Ogre 1.9 static and add the _SECURE_SCL=0 flag in the cmake or in the ogre project setting
- build NVTT in static too (but not needed in your case)
- build Max SDK maxsdk\samples\modifiers\morpher lib in 32 & 64b

about boost I use the last version but I don't think this change something.

then it should be ready to compile.
OpenSpace 3D Project manager
http://www.openspace3d.com
def87
Halfling
Posts: 90
Joined: Wed Sep 19, 2012 1:41 pm
x 1

Re: Easy Ogre Exporter for 3DSMAX

Post by def87 »

Thanks for the feedback arkeon.

This _SECURE_SCL=0 thing is a nightmare! Thank you Microsoft!
It turns out vs2010 has it disabled by default, older versions have it enabled in release mode.
3dsmax 2012 supports vs2008.
If the morpher lib is compiled with vs2010 _SECURE_SCL=0 is used, I guess.
3dsmax 2013 and up will use vs2010 only...

Which means, moving to vs2010, one needs to recompile every single lib, expecting most older external library code out there using the default msvc settings.

I will give it a try with vs2008 and 3dsmax 2012 and the standard ogre sdk libraries...

Q: Does this make sense to you?