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
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 »

arkeon wrote:What do you think about to use the Time tags ?
someone talk to me about it and it seems to be a good solution (if I found how to get this infos in the sdk)
Not entirely sure, I've never used them. Personally, I'm a huge fan of the way OgreMax handles it by adding the animations to the object settings manually and sampling it from the Skin morpher. Though I'm nowhere near the point where I can justify $250 for an exporter, and I end up spitting the skeleton to xml and adding all my skeleton links manually.
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 »

It seems that the tag method should be really easy since you'll don't have to specify the animations for each node.
for example, on the time line add a tag ("Add Time Tag" near the bottom right) on 0 key as "open" and a tag at 50 as "close" could define animation open 0 to 50 and close 50 to the last available key frame

I'll try to found how to use this ASAP
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 »

I actually didn't even notice that button until you said it. If I ever found the time to sit down and try to compile Ogre 1.8, I'd also look into testing out the track tags :) Though you really could still get a little more control with user-added information.
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.
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 »

I was wondering if you had any plans on expanding the number of material types that are exported into shaders?

I think ogre has long needed something that'll easily create basic shaders from something other than hardcode.
Image
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

@thebluefish
I didn't noticed the tags too until someone talk to me about it :) but I think it should be really easier than adding a special interface to manually manage animations intervals by hand for each node, user parameters by node in max are not dynamic in the SDK, you need to generate a xml before the plugin initialization, also special datas on nodes like OgreMax do make the max file crash when you try to open the file on a max who don't have the plugin installed.
And the lack of documentation on the SDK make any simple thing takes several days to found the good method to implement ...

@bronzebeard
yes I was thinking about mental ray car material conversion and car paint shader generation and the cartoon material too
I'd like to implement a decal pass too for shadows, if you have some ideas you can add a feature request on the redmine
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 »

The new version is online !
- your tickets are closed ^^
- the animations can be split directly in the track line using time tags.

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

no need to set the animations for each nodes and it's saved by max file ^^
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 »

Exporting the model/animations crashes ~1/3 of the way through, running 3ds Max 2012 x64 and exporting to Ogre 1.7/1.8. I originally thought this was because my animation was still in the motion mixer, but removing the motion mixer tracks and having a static body still produces the same issue.

Here is my test dummy with crappy animations: http://www.mediafire.com/?az0sghapaqocrat
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 Ogremax setting make my 3ds crash when I try to open your file :/ because I removed OgreMax from my max ^^

try this :
- remove all OgreMax materials
- select all objects and save selected as a new file
(this is the only way I found to remove OgreMax settings from a max file)
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 »

ok I re install OgreMax to open your file
it seems that the mesh scale modifier force the Max node to mesh against bone type.
so the exporter try to export the bone and for an unknown reason the hand mesh is found with a mesh animation that is not the case ^^
and when the exporter try to get the vertex position on a frame and max return no vertices on the frame (this should not be possible :/)

for the moment I really don't know if you found a bug in Max SDK export interface (this is not the first time) or a special case to manage in the exporter and how...

another things I see the keyframes in the track line but there is nothing moving ?!

retry with a simple biped or CAT skeleton
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 »

I noticed the animation thing too, not sure how to go about that one (motion mixer works correctly, but keyframed animations no longer work).

I honestly think it's an issue with OgreMax's scale placement on every bone (which is not undo-able!) because that's the only major thing i've tried before using the MotionMixer (which did somewhat work before).
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.
Lana
Gnoblar
Posts: 4
Joined: Wed Apr 04, 2012 11:33 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Lana »

shanefarris wrote:
arkeon wrote: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
I have finally figured out how to export animations using the mixer, but when I do the bones are messed up just like before. Could there be something I am doing wrong with this process?
Hi,
since I am trying for 2 days now to get my 3ds max animation exportet with seperate animation layers I decided to register and ask for help.

Like mentioned in previous posts I tried to use the motion mixer to get my mesh with animations in seperate layers. But I still ONLY get the default_skl one, which contains all animations, but i really need them seperated.
I have no clue to what I am doing wrong.
It is not a biped, it's just bones, i can add all the stuff to motion mixer and organize it, but when I export with EOE all animations are still stored in the default_skl animation thingy.

So could somebody please be so nice as to explain what I need to do in order to get seperated animation layers?
I also couldn't achieve it by using time tags.
Would save my day, and work come to that.

*viewing mesh with ogre meshy

*update

Okay now I am even more confused to why it is not working.
I saved my max file as max 2011 file, did the time tag thing and everything works out perfectly well!

Someone tried that with max 2012? I double checked to have the new dle but still doesn't work.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

I did the test with tags on 2012 and it works for me, maybe that the motion mixers tests break your scene.

Anyway i'm happy that we finally found a better method for animations split :)
OpenSpace 3D Project manager
http://www.openspace3d.com
Lana
Gnoblar
Posts: 4
Joined: Wed Apr 04, 2012 11:33 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Lana »

Hi,
first of all thank you for your reply.
Unfortunatley I still have no clue whie I can't get it to work with my 2012 3ds Max, but since it's working with 2011 I'll try and reinstall Max during easter week.
I love how simple it is to just add time tags, that's brilliant.

Still I have a problem with the export of my animation, maybe someone knows what to do or can guide me in the right direction, I tried to figure it out plus googled, but I am out of searching phrases.

The problem is that i need my mesh to change it's position and scale during an animation.
But in the exportet file it just doesn't change it's position/scale at all, just stays in one place.
I tried to move it around by animating the root bone.

I appreciate your help, thank you.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hi

in max this is not "easy" to manipulate skinned mesh on translation or scale :/
usually I add a node (dummy) and attach the skinned mesh to the dummy and I animate this dummy for translations / rotations.
This animations should be exported in the dot scene but in max even if your dummy move, the mesh can not follow it (don't know why all bones in max are in global positions and not relatives to the mesh...)
this should work in ogre.
OpenSpace 3D Project manager
http://www.openspace3d.com
Lana
Gnoblar
Posts: 4
Joined: Wed Apr 04, 2012 11:33 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Lana »

Sadly I still don't get it.
I tried like you suggested to add a dummy, attached the mesh to it and animated the dummy, but in the exportet file still nothing moves (I open the xx.mesh with meshy).

So what is the hierarchy supposed to look like?
I have my root (it's a dummy, that a problem?) over all to the root all other bones are attached, and I tried attaching the mesh to the root (with dummy attached) or just leave it unattched.

Maybe I should just do in place animations. xD
In max, when I have the root animated the mesh moves along, but that translation movement doens't get exportet.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

the skeletal animations (bones) are exported in the skeletal file.
nodes or mesh translations are exported in the dot scene file.
Ogre meshy only open the mesh and skeletal file not the dot scene file containing the node animations.
OpenSpace 3D Project manager
http://www.openspace3d.com
Lana
Gnoblar
Posts: 4
Joined: Wed Apr 04, 2012 11:33 am

Re: Easy Ogre Exporter for 3DSMAX

Post by Lana »

Oh, thank you !
So I'll need somone to have it tested in the engine.
Thanks a lot, that was fast.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

If you want to test your scene quickly you can try our Editor http://www.openspace3d.com :)
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: @bronzebeard
yes I was thinking about mental ray car material conversion and car paint shader generation and the cartoon material too
I'd like to implement a decal pass too for shadows, if you have some ideas you can add a feature request on the redmine


Awesome! Car paint shaders are exactly what I need!


Also I tried your open3d program and it wouldn't install on xp64, something about "Can't Import Data" :cry:
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!

to import data you need to export to the my documents/openspace3d directory.
if you have another problem with os3d please post on the os3d forum or redmine.

about the other shaders I'll work on it when I'll have time ^^
OpenSpace 3D Project manager
http://www.openspace3d.com
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Easy Ogre Exporter for 3DSMAX

Post by Transporter »

I've built a huge city and like to export it to ogre. During the export 3dsmax 2012 (x64) is crashing. My next step was to build the plugin from source and debug it with Visual Studio, but I failed. I can't compile the source with VS11 and VS2010.

That was the bad news, now let me introduce a few suggestions. Maybe it's possible to add more settings to control the LOD generation. Another performance optimization would be the integration of Nvidia's nvDXT library. The library allows the creation of DDS images (http://en.wikipedia.org/wiki/DirectDraw_Surface), which can be processed faster than JPEG and PNG. Last, no exception handling in the plugin is available, what makes it difficult to debug without a running Visual Studio instance.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hello !

what do you have in the exporter log when it crash ?

for ideas / issues please post them on the redmine : http://redmine.scolring.org/projects/eoe

to build the exporter it's a little complicated because of some max sdk components :/

- create an ext directory in EOE project directory

Ogre 32 & 64b in static :
- rebuild all Ogre dependencies with _SECURE_SCL=0 in preprocessor
- rebuild ogre with _SECURE_SCL=0 in preprocessor

- copy the ogre 32 to ext/ogre3d_secure_scl/sdk/static (bin/, lib/, include/)
- copy the ogre 64 to ext/ogre3d_secure_scl/sdk_x64/static (bin/, lib/, include/)

Max SDK: (for each max sdk ^^)
- build the maxsdk\samples\modifiers\morpher lib in 32 & 64b
- copy max sdk in ext/maxversion ex: ext/2012/include, ext/2012/lib, ext/2012/libx64
- also copy the morpher sample lib and include in the corresponding directories

after a lot's of hours passed to just copy the dependencies then you can open the EOE vcproj and build.

To debug in max you need to build in hybrid mode and launch max from the debugger (disable exceptions max will throw thousands of them only at start)

I use VS9 but the conversion to 2010 should work ?
OpenSpace 3D Project manager
http://www.openspace3d.com
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Easy Ogre Exporter for 3DSMAX

Post by Transporter »

Maybe it's not nessecary to recompile everything:
http://msdn.microsoft.com/en-us/library ... .100).aspx
Defines whether Checked Iterators are enabled. If defined as 1, unsafe iterator use causes a runtime error. If defined as 0, checked iterators are disabled. The exact behavior of the runtime error depends on the value of _SECURE_SCL_THROWS. In debug mode, the default value for _SECURE_SCL is 1, meaning checked iterators are enabled. In release mode, the default value for _SECURE_SCL is 0.
If I took the release version of all dependencies it should work. I'll try it if I can find some free time.

Edit: I've uploaded the Testprojekt: https://rapidshare.com/files/2755215783/test.7z
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 »

Haven't gotten back to you in a while, but I did get my skeletal animation working correctly :D I'm also loving the morpher animation support, makes things 10x easier for my cartoon-ish game. Cheers!
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 »

@Transporter
Thanks I'll test your scene ASAP

@thebluefish
Great it's good to know :)
please share your tips with us
OpenSpace 3D Project manager
http://www.openspace3d.com
Post Reply