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
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 138
Joined: Wed Apr 23, 2014 3:49 pm
x 4

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 » Mon Mar 05, 2018 12:17 pm

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.
0 x
Senior game programmer at Vae Victis
Working on Racecraft

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Mon Mar 05, 2018 2:21 pm

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
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 138
Joined: Wed Apr 23, 2014 3:49 pm
x 4

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 » Mon Mar 05, 2018 3:46 pm

Sure, you can download it from here (it's for 3ds Max 2017).
0 x
Senior game programmer at Vae Victis
Working on Racecraft

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Mon Mar 05, 2018 6:10 pm

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.
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 138
Joined: Wed Apr 23, 2014 3:49 pm
x 4

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 » Tue Mar 06, 2018 10:25 am

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.
0 x
Senior game programmer at Vae Victis
Working on Racecraft

User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 138
Joined: Wed Apr 23, 2014 3:49 pm
x 4

Re: Easy Ogre Exporter for 3DSMAX

Post by TaaTT4 » Tue Mar 06, 2018 12:57 pm

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.
0 x
Senior game programmer at Vae Victis
Working on Racecraft

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Tue Mar 06, 2018 1:28 pm

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
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Sat May 05, 2018 9:24 pm

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?
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Sun May 06, 2018 10:25 am

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 :)
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Sun May 06, 2018 8:07 pm

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.
0 x

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Mon May 07, 2018 5:19 am

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.
0 x

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Mon May 07, 2018 9:58 pm

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.
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Mon May 07, 2018 10:27 pm

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
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Mon May 07, 2018 10:31 pm

It's not working .xafs on a non-biped skeleton of mine. Is it because it's .xaf, then?
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Mon May 07, 2018 10:53 pm

Maybe just because it's a skeleton. Try using time tags (button on the bottom rigth on max interface)
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

AGP
Gnoblar
Posts: 8
Joined: Sat May 05, 2018 8:15 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by AGP » Tue May 08, 2018 12:07 am

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.
0 x

charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp » Tue Jul 24, 2018 4:21 pm

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!
0 x

charlieppp
Gnoblar
Posts: 4
Joined: Tue Jul 24, 2018 3:43 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by charlieppp » Tue Jul 24, 2018 5:24 pm

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!
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Tue Jul 24, 2018 6:40 pm

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
0 x
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 » Wed Jul 25, 2018 12:13 am

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!
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Wed Jul 25, 2018 5:31 pm

Ho well yes you need to download tinyxml and change the path in includes directories
0 x
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 » Thu Jul 26, 2018 6:59 am

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!
0 x

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Thu Jul 26, 2018 7:43 am

it use Ogre 2.0
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

arkeon
Goblin
Posts: 267
Joined: Fri Dec 04, 2009 6:02 pm

Re: Easy Ogre Exporter for 3DSMAX

Post by arkeon » Tue Sep 25, 2018 8:16 pm

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

http://wiki.ogre3d.org/Easy+Ogre+Exporter
0 x
OpenSpace 3D Project manager
http://www.openspace3d.com

Post Reply