Maya 6.5 exporter issues

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Mugen
Gnoblar
Posts: 9
Joined: Sun Jul 17, 2005 9:14 pm

Maya 6.5 exporter issues

Post by Mugen »

I am having an issue with the maya 6.5 exporter and trying to see if anyone else is getting the same thing.

First off, I am using both the recent maya 6.5 exporter and the ogerCommandLineTools-1.0.3 to convert everything over.

Exportation and conversion goes fine with no errors at all.

HOWEVER, when I go to view them in the meshViewer I noticed all the animations are the wrong ones, and in some cases, some of the animations have none at all. I checked the xml file and it seems it has something to do with the maya 6.5 exporter.

Has anyone had a similar problem? Or does anyone have any suggestions?
bstrr
Halfling
Posts: 56
Joined: Wed Jul 13, 2005 2:01 pm

Post by bstrr »

How many animations are you trying to export ?
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

ive had some problems with meshviewer... i wouldnt rely on it. its not supported and could cause you headaches that you dont have. problems aside, check out other forums, there are some about maya animation exports.

good luck
maya 7.0, vs 2005, ogre 1.2
Mugen
Gnoblar
Posts: 9
Joined: Sun Jul 17, 2005 9:14 pm

Post by Mugen »

I have used the old exporter with maya 5, but since we decided to upgrade and using 6.5 nothing seems to work.

We even recreated the models in 6.5 and redid the animations and then tried to export them. It still is giving us this weird animation sequence.

last night I even tried making a simple object and animating it 180 deg and then exporting that.

Pulling it up in the mesh viewer it starts its rotation, stops for about 2 seconds and starts again and then jumps around and then starts the sequence over again.

Its as if the exporter is sending the wrong values or something, is there anyway i can view the source to see what it is actually doing in the background?
Maarc
Gnoblar
Posts: 3
Joined: Thu Jan 27, 2005 5:42 am
Location: Brisbane, QLD, Australia
Contact:

Post by Maarc »

I've noticed an issue with the exporter doing similar sorts of things for some of my own animations, and I nearly tore my hair out trying to figure it out. And for me, at least, there was an issue in the exporter code.

In ogreExporter.cpp, the function OgreExporter::doIt, scroll down until you see this:

Code: Select all

MTime t1 = startTime;
MTime t2 = stopTime;
startTime = t1.as( MTime::kSeconds );
stopTime = t2.as( MTime::kSeconds );
For me, to fix this, I had to change it to:

Code: Select all

MTime t1( startTime, MTime::uiUnit() );
MTime t2( stopTime, MTime::uiUnit() );
startTime = t1.as( MTime::kSeconds );
stopTime = t2.as( MTime::kSeconds );
Similar with sample rate:

From

Code: Select all

t		= rate;
rate	= t.as( MTime::kSeconds );
to

Code: Select all

t		= MTime( rate, MTime::uiUnit() );
rate	= t.as( MTime::kSeconds );
This fixed up some of my animation weirdness, where a clip from frame 201->233 was getting exported as 209->240something. I'm working in PAL, metres and degrees. Hopefully this helps fix your issue as well.
Mugen
Gnoblar
Posts: 9
Joined: Sun Jul 17, 2005 9:14 pm

Post by Mugen »

wow... thanks for your help.. do you know where i can get of the original ogreExporter source code so that i can make the changes? I have been looking everywhere for it but cant seem to find it.
Maarc
Gnoblar
Posts: 3
Joined: Thu Jan 27, 2005 5:42 am
Location: Brisbane, QLD, Australia
Contact:

Post by Maarc »

I'm using the code that was in the Ogre CVS, it's under Tools/MayaExport I think.
Mugen
Gnoblar
Posts: 9
Joined: Sun Jul 17, 2005 9:14 pm

Post by Mugen »

OMG :shock: that fixed it.. thank you so much.... you are my hero!
User avatar
bisco
OGRE Contributor
OGRE Contributor
Posts: 235
Joined: Wed Nov 03, 2004 5:01 pm
Location: London, United Kingdom

Post by bisco »

hey guys, sorry I've been busy and haven't touched the exporter in a while.
Thanks for the tip, I'll patch the exporter right away if nobody did it yet

bisco

b.t.w. I'm working to add support for multiple materials per mesh, just have to reorganize the data structure and it'll be ready soon
Post Reply