Easy Ogre Exporter for 3DSMAX

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

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

@Transporter

I see in the log that you checked the LOD generation
In some cases on meshes with closes vertices Ogre crash on Create mesh edge list with LOD enabled.
To prevent that the only thing I found for the moment is to convert all your meshes (or the object which crash) to editable mesh and weld all vertices closes to 0.0001 for example and remove the isolated vertices.
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
thebluefish
Gremlin
Posts: 170
Joined: Tue Apr 05, 2011 1:55 am
x 10

Re: Easy Ogre Exporter for 3DSMAX

Post by thebluefish »

Is there any way to disable exporting of certain models, or only export selective models? I like the convenience of OgreMax for example, where I can select my stage, export only that, and therefore not having to worry about my collision meshes, spawn points, references, or other scene information :p Would be great to also have a menu for this sometime to make the process even more streamlined!
During the code inspection, a couple of minor points were noticed: -

Function inlining was critical to performance.
For MSVC, at least, a "delete 0" caused execution of 11 assembly instructions, including a function call. So in cases where performance is at an absolute premium it can be worth inserting the extra manual test.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Yes you can use the Max "export selection" menu instead of "export"
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
thebluefish
Gremlin
Posts: 170
Joined: Tue Apr 05, 2011 1:55 am
x 10

Re: Easy Ogre Exporter for 3DSMAX

Post by thebluefish »

Ok, one more question I swear! Whenever I export a model, including its materials and textures, using forward-rendering the model appears completely black. I hadn't noticed this because I was using cell shading (and before that, I had SSAO enabled from the 1-line SSAO demo). When I have some other technique enabled such as SSAO or Cel Shading, it appeared normally, however if I use just the default techniques, it doesn't. This happens with/without lights, and ambient lighting has no affect on it. However even now, this exporter is a huge win over OgreMax, since OgreMax doesn't like to play well with unwrapped textures.

Also, any chance for an automatic merge of sub-meshes into one mesh? For example, I have a balloon model that has 4 elements (the lip, cone, knot, and the balloon itself). Even though the elements themselves aren't high-poly (the balloon has ~900 polys, the other 3 elements have ~140 in total), the batch count is going to kill me.
During the code inspection, a couple of minor points were noticed: -

Function inlining was critical to performance.
For MSVC, at least, a "delete 0" caused execution of 11 assembly instructions, including a function call. So in cases where performance is at an absolute premium it can be worth inserting the extra manual test.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

The default technique with pixel lighting use a multi-pass light shader, you need a minimum of one light to display correctly the model, however be careful each light multiply the polygon count on render with this method.
I don't know why it should appear black on your models :/

I don't really understand what you mean by "automatic merge of sub-meshes".
Each submesh correspond to a material id, if you want your model to only have one submesh you need to apply the same id on all your object polys. Also you can add meshs to an existed mesh in max using the edit-poly or mesh-edit modifier.

Another good method can be to link the nodes of your balloon and then manage the parent in your code
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
thebluefish
Gremlin
Posts: 170
Joined: Tue Apr 05, 2011 1:55 am
x 10

Re: Easy Ogre Exporter for 3DSMAX

Post by thebluefish »

Ok, let me rephrase that last bit. I have my balloon model with its 4 elements, they all use the same material, which is a single 512x512 unwrapped bitmap of the entire thing. If I export with Easy Ogre Exporter, it gets thrown into 4 sub-meshes. I have the same model, but with a "pop" animation, that due to my method of splitting it up, ends up having approximately 90 elements to the mesh, all using the same material. While it works, having that many sub-meshes definitely doesn't play so well with my level builder :lol:
During the code inspection, a couple of minor points were noticed: -

Function inlining was critical to performance.
For MSVC, at least, a "delete 0" caused execution of 11 assembly instructions, including a function call. So in cases where performance is at an absolute premium it can be worth inserting the extra manual test.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Even if you apply the same id for each polys on your object and apply a single material ?
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 »

Version 0.99 available :
- this version introduce the optional texture conversion to DDS format
- warm if a vertex is shared with more than 4 bones
- correction on max units conversion to meter

The version of the exporter for Max 2013 will wait a little ^^
Autodesk change the SDK to UNICODE and there is some work to convert the exporter :/
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Easy Ogre Exporter for 3DSMAX

Post by Brocan »

I'm having a problem with the exporter (maybe i'm doing something wrong...).

I've downloaded it, and copied the dle (x64 version for max11) in "C:\Program Files\Autodesk\3ds Max 2011\plugins", but when i start 3dMax11 (x64) it throws an error:
Error Loading DLLs
DLL <C:\Program Files\Autodesk\3ds Max 2011\PlugIns\EasyOgreExporter.dle> filed to initialize. Error Code 126 - Can't find the requested module.
Any ideas?

Thanks in advance!
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hmm strange :/

do you have an nvidia ? maybe the cuda dependencies for DDS conversion ?
Can you provide more info ? look in the windows event logs if it say more.
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Easy Ogre Exporter for 3DSMAX

Post by Brocan »

Where can i find more information? windows event log says nothing about max :|

We are running in Intel Xeon X5670, 24 GB Ram, and a Quadro FX 3800 (Driver 270.61)
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Easy Ogre Exporter for 3DSMAX

Post by Brocan »

Drivers updated to last nvidia version, now having CUDA 4.2.1.
VS 2008 redist (both x86 and x64) updated.

Same problem :(

I'm going to update DX now...
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Send me your PC so I could test :o)

I could reproduce the problem on another PC, I'll try to find out what is missing.
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 »

"Even if the texture tools are compiled with CUDA support it's possible to use them on systems that do not support CUDA or that do not have a valid CUDA driver installed."
from the nvidia texture tools FAQ.

This must be false or not compatible with static version ^^

I've commited a version without CUDA support for DDS conversion

it seem ok now :)
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Easy Ogre Exporter for 3DSMAX

Post by Brocan »

Ok, it seems that now is working, excellent work! :D

Always be aware about static linking, they usually produces tons of headaches! :P
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi all !

The Max 2013 version is now available for download.

EOE now have is first contributor :)
Thanks again to BJoe for is contribution for the UNICODE conversion needed for max 2013
OpenSpace 3D Project manager
http://www.openspace3d.com
Dario ff
Gnoblar
Posts: 12
Joined: Sun Dec 04, 2011 3:13 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Dario ff »

I submitted a feature request(accidentally added it as a bug sorry, even when I selected the other option). It's a simple addition(I hope), instancing detection for EOE just like OgreMax does. It should help lower the amount of exported .mesh files by a long shot if the scene makes heavy use of instanced geometry.

http://redmine.scolring.org/issues/410

Thanks again for all your work on this plugin!
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Thanks, yes you're right this is useful.
I'll think about how to make that in a clean way, since max mesh instances are not really clear in the sdk
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
EricB
Gnome
Posts: 344
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 205
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by EricB »

Hello again!

I was wondering if we could get some way to scale the mesh (or set ogre units) rather than having to use dotscene?
In my project we just purely use .mesh files. We try to keep the scale 1 3dsm unit = 1 ogre unit = 1cm however the exported meshes are very tiny (as someone else pointed out 25x smaller). I haven't found a way to do this scale on the mesh level without using .scene.

I would rather not have my artist fiddling around with other programs like meshmagick :|

Ogremax has this feature: http://www.ogremax.com/Documents/OgreMa ... ifier.html
Even though it does 1:1 unit conversion.

Thanks a million! EOE is working out great for us so far!
Image
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi !

The units are taken from the max System Unit Setup, but converted to meter
if you want 1 max unit = 1 ogre unit then just change the max system unit to 1 Unit = 1.0 meter

maybe that I should add an option to disable the meter conversion ?
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
EricB
Gnome
Posts: 344
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 205
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by EricB »

arkeon wrote:Hi !

The units are taken from the max System Unit Setup, but converted to meter
if you want 1 max unit = 1 ogre unit then just change the max system unit to 1 Unit = 1.0 meter

maybe that I should add an option to disable the meter conversion ?
Actually, no, this works great! I thought i had tried that already but I guess I didn't. Thanks!

I think part of the problem is that there isn't any good documentation on what does what from what yet. Features before documentation of course :)
Image
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi !

EOE v0.955 is available.
It now manage the instantiated meshs as a single file.

I also updated the http://www.ogre3d.org/tikiwiki/tiki-ind ... e+Exporter wiki page with a FAQ for common questions.
Feel free to contribute on this FAQ if something is missing.

I'm looking for a INNO setup script to detect Max versions and paths installed on a computer to generate a simple setup.
If someone have an idea about how to find theses infos :)
OpenSpace 3D Project manager
http://www.openspace3d.com
Dario ff
Gnoblar
Posts: 12
Joined: Sun Dec 04, 2011 3:13 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Dario ff »

arkeon wrote: EOE v0.955 is available.
It now manage the instantiated meshs as a single file.
Works perfectly, thanks a lot for the help, it certainly makes my job much easier now, and the exporting time is faster as well! :)
User avatar
EricB
Gnome
Posts: 344
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 205
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by EricB »

arkeon wrote:The default technique with pixel lighting use a multi-pass light shader, you need a minimum of one light to display correctly the model, however be careful each light multiply the polygon count on render with this method.
I don't know why it should appear black on your models :/
I"m having the same issue. Blackish looking material on some meshes.
I believe the problem stems from UV unwrapping.
At least this seemed to be a problem in previous 3dsm exporters http://linode.ogre3d.org/forums/viewtop ... 714#p70714

I did a little test and made a model without unwrap UV's and it worked fine, no blackish materials. Anything that i manually unwrap, blackness....
Image
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi bronzebeard !

Do you see something wrong in the generated .material ?
Is your max material a "standard material" or an another one ?
if you put an another material on your mesh does it still look black ?
what happen if you perform a reset Xform after your uvw ?

could you send me your max file for debug ?
OpenSpace 3D Project manager
http://www.openspace3d.com
Post Reply