exporting from XSI

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
the_darkone
Greenskin
Posts: 129
Joined: Wed Jun 21, 2006 1:37 am
x 1

exporting from XSI

Post by the_darkone »

I am testing the XSI exporter and been having some problems, what i have is a simple cube wich i animate it moving around and i put this animation in the animation mixer and just export it all, now loading the mesh and creating an entity works fine but when i try to set the animation i get an error.
I have debuged the program and it seems that when i try to get the animation state object i get a null pointer or somthing, thats the conclusion i got, I also thought that myebe i am not using the right name of the animation state so i thoght to iterate through the animation states and dump then into a text file but when that didn't work i understood that i get a NULL pointer.
I By the way I am not using any skeleton animation.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Only skeletal and shape key animation is supported since the exporter is an animated model exporter, not a scene exporter. Animate your objects through bones or the shape manager.
the_darkone
Greenskin
Posts: 129
Joined: Wed Jun 21, 2006 1:37 am
x 1

Post by the_darkone »

i thought this is a simple vertex type animation, so there is no way to export an animated object moving around the scene ?
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

A vertex animation is deforming vertices on a model (like the demo that shows the model "talking").

What you're doing is taking a model and moving it around a scene. That's an animation that would take place at a higher level than the model (at the scene level).
the_darkone
Greenskin
Posts: 129
Joined: Wed Jun 21, 2006 1:37 am
x 1

Post by the_darkone »

ok i understand now but i wtill can't export the animated mesh, i animated it in the sape manager but i still get no animation when i load the mesh in ogre, it just loads its current state in a specific frame when i export.
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

You've got to do more than just "load the mesh in ogre". I'm not too hip on the details, but you've got to start the animation etc. You might want to take a look at the source code in the demos (or wait for someone with more experience to answer :)).
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

You also may need to do the XSI shape animation tutorials. Demo_FacialAnimation is directly out of one of those tutorials and uses the shape manager. But yes, as Kentamanos says it won't animate on it's own, you have to write some code to activate the animation and advance the time on it to actually make it happen on screen, since an application has to have control of that kind of thing. For example, the facial animation demo does something like this:

Setup:

Code: Select all

        Entity* head = mSceneMgr->createEntity("Head", "facial.mesh");
	AnimationState* speakAnimState = head->getAnimationState("Speak");
	speakAnimState->setEnabled(true);
Each frame:

Code: Select all

        speakAnimState->addTime(evt.timeSinceLastFrame);
Post Reply