Easy Ogre Exporter for 3DSMAX

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 »

We're using the exporter default options.
I tried disabling the edge list and the empty vertex buffer is still present.

Here and here you can find the logs.

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

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

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Hello,

can you send me the max file you use ? I'll try to debug with your model directly and watch if or when the empty buffers are set
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 »

Sure, you can download it from here (it's for 3ds Max 2017).

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

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

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

When I test your model exported in the Ogre 1.10 version in OpenSpace3D, the animation is correct.
I use a very old version of Ogre 2.0 in the exporter, maybe this can be an old issue in the version I use.

I'll try to build the export against a more recent Ogre 2.0 version maybe it will correct the issue. (will take some times)
Also you can try to select the Ogre 1.10 mesh version in the exporter, and check if you still have the empty buffers when you convert it to Ogre 2.0 mesh.
OpenSpace 3D Project manager
http://www.openspace3d.com
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 »

This is what I'm doing:
  • Export the animated cylinder from 3ds Studio Max 2017 with EOE (select 1.10 or "Latest" as mesh format should be indifferent since they both generate 1.10 meshes)
  • Convert the cylinder mesh in text format calling OgreMeshTool.exe Cylinder001.mesh Cylinder001.xml
At this point, if you open the Cylinder001.xml file, you'll clearly see the empty vertex buffer:

Code: Select all

                <vertexbuffer>
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                    <vertex />
                </vertexbuffer>
I'm not focusing anymore on "if the animation works or not" (since it works on my side too).
I'm focusing on the empty vertex buffer because @dark_sylinc told me that it could destroy the mesh during the upgrade (from 1.10 to 2.1 R2 format) process.
Unfortunately, I doubt the empty buffer would be an issue caused by an outdated version of OGRE.

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 »

OK, I investigated a bit more and I found something.

Looking with the debugger at the vertices declaration (in the following snippet of code of method ExMesh::writeOgreBinary), I've seen there are the semantics for VES_BLEND_INDICES and VES_BLEND_WEIGHTS.

Code: Select all

        Ogre::v1::VertexData* vdata = m_Mesh->getVertexDataByTrackHandle(subIdx + 1);
        Ogre::v1::VertexDeclaration* newadcl = vdata->vertexDeclaration->getAutoOrganisedDeclaration(m_Mesh->hasSkeleton(), hasVertexAnim, sm->getVertexAnimationIncludesNormals());
        vdata->reorganiseBuffers(newadcl);
But in the vertex buffer there's no data about those semantics.

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

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

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Just corrected it :)
It seems that m_Mesh->_compileBoneAssignments(); creates an empty buffer here and anyway it was not necessary ^^

you can download the updated setup here : http://www.openspace3d.com/downloads/EasyOgreExporter
OpenSpace 3D Project manager
http://www.openspace3d.com
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

I would like for EasyOgreExporter to allow you to parse the animations. A simple list like "walk" 0-20, "run" 25-35 would do, but it could also synchronize with the mixer automatically (it's banal to do that in MaxScript and I could post the code here if needed be). Also, I have need of OgreXML. I can still use the command line tools, but I don't know for how long that will work since they haven't been recompiled in a very long time. Do you think this could happen?
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 already define the animations names in the mixer or in the animation time tags.
I don't have time to include the xmlconverter code into the plugin for now but sources are available :)
OpenSpace 3D Project manager
http://www.openspace3d.com
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

I just confirmed that it's syncing with Mixer. I don't think that the previous version was doing it. That's really awesome, thank you.
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

A small favor: Motion Mixer syncronization is working for bips but not for xaf files. Would you mind fixing that? I'd greatly appreciate it.
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

Come to think of it, it's possible that it's not about the file format as much as it is about not using Biped. Still, if you can implement Motion Mixer synchronization of a skinned but not biped character, I'd appreciate it.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Motion mixer for node animation is already implemented. I don't remember how it can be used but it should work. You can get feature list herehttp://wiki.ogre3d.org/Easy+Ogre+Exporter
OpenSpace 3D Project manager
http://www.openspace3d.com
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

It's not working .xafs on a non-biped skeleton of mine. Is it because it's .xaf, then?
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

Maybe just because it's a skeleton. Try using time tags (button on the bottom rigth on max interface)
OpenSpace 3D Project manager
http://www.openspace3d.com
AGP
Gnoblar
Posts: 10
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP »

Time tags worked wonderfully, thanks very much. Now if I may suggest another feature: the ability to cut out the last frame of an animation.
charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp »

Hi arkeon

Congrats for your nice exporter!
I am trying to build the code myself in order to experiment a little bit. Unfortunately, I am struggeling with your build instructions:

Code: Select all

#Build
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

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
Can you give me a bit more details on how these steps are done? Thank you very much for your help!
charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp »

to clarify:
- managed to do the 3ds max sdk stuff
- but not the ogre dependency building (is there some up-to-date procedure?)

some of the errors I see in VS2017:

Code: Select all

1>c:\users\tk\source\repos\easyogreexporter-master\include\exprerequisites.h(46): fatal error C1083: Cannot open include file: 'wm3.h': No such file or directory xmltest.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\xmltest.cpp': No such file or directory tinyxmlparser.cpp
appreciate your help!
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

wm3.h
in recent max SDK you'll have to get the files from the morpher sample directory and copy them in the max sdk include dir
you also have to build the morpher library and copy then in the libs directory
OpenSpace 3D Project manager
http://www.openspace3d.com
charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp »

Thank you for the quick reply!
- I moved the wm3.h also and now the output of the console only contains ogre related issues
- Here are the ogre-related output issues:

Code: Select all

1>c:\users\tk\source\repos\easyogreexporter-master\include\exprerequisites.h(64): fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory xmltest.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\xmltest.cpp': No such file or directory tinyxmlparser.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\tinyxmlparser.cpp': No such file or directory tinyxmlerror.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\tinyxmlerror.cpp': No such file or directory tinyxml.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\tinyxml.cpp': No such file or directory tinystr.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\dependencies\tinyxml\tinystr.cpp': No such file or directory
1>Generating Code...
1>Done building project "EasyOgreExporter_vs12.vcxproj" -- FAILED.
What am I missing? Can you point me to a step-by-step guide? I am slightly confused with the different guides v1 vs v2 and _SECURE_SCL being deprecated.

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 »

Ho well yes you need to download tinyxml and change the path in includes directories
OpenSpace 3D Project manager
http://www.openspace3d.com
charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp »

Hm ok, I thought that this was part of the dependencies.
Btw, do I need ogre v1 oder ogre v2? Or is that irrelevant?
Thank you again!
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon »

it use Ogre 2.0
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 »

EOE V3.2
- now support max 2019
- quaternions are now normalized in scene file

http://wiki.ogre3d.org/Easy+Ogre+Exporter
OpenSpace 3D Project manager
http://www.openspace3d.com
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Re: Easy Ogre Exporter for 3DSMAX

Post by Crashy »

Hi,
After year of using an old version of Ogremax, I'd like to switch to EasyOgreExporter. However, my export toolchain requires a few things.
-Export .mesh only, I don't need .scene files.
-Do not export .material files (on demand) nor textures in some cases.
-be able to export using maxscript.

First two features are, I think, trivial to implement and to add as export options. I could do it and make a pull request.

I know the MaxsScript feature has already been asked here http://redmine.scolring.org/issues/455 . I do not know the maxsdk enough to know how to do it right now, but I could also do it if you want.
Follow la Moustache on Twitter or on Facebook
Image
Post Reply