Bad Animation Parsing

Started by AGP, April 15, 2012, 06:11:04 AM

Previous topic - Next topic

AGP

I've looked at my skeleton.xml file and other than the animations being in alphabetical order, it looks right, but when I try to play a given animation, it leaks to the next one (meaning, the parsing isn't right).

AGP

By the way, since OgreMax was exporting correctly, I tried exporting each animation as a separate skeleton file. But this crashes the loader with a message claiming there are no pose animations. Is there a way for me to try this that doesn't crash it?

raft

Quote from: AGP on April 15, 2012, 06:11:04 AM
but when I try to play a given animation, it leaks to the next one (meaning, the parsing isn't right).
I'm not sure I understand what you mean here

raft

Quote from: AGP on April 15, 2012, 06:21:21 AM
By the way, since OgreMax was exporting correctly, I tried exporting each animation as a separate skeleton file. But this crashes the loader with a message claiming there are no pose animations. Is there a way for me to try this that doesn't crash it?
post the stack trace please

AGP

Not very interesting. It crashes because my loader assumes the model is there and does SimpleVector cameraPosition = theWorld.getObject(0).getTransformedCenter():

Problem loading file: No controller found in OgreEntityNode. Means there is no s
keleton or pose animation!
[ Sun Apr 15 01:19:50 BRT 2012 ] - ERROR: Can't retrieve object #0!
Exception in thread "main" java.lang.NullPointerException
        at OgreLoader.<init>(OgreLoader.java:69)
        at OgreLoader.main(OgreLoader.java:335)

AGP

So again, what is the correct way to load the model with individual .skeleton.xml per animation? My way is producing the following message.

Problem loading file: No controller found in OgreEntityNode. Means there is no s
keleton or pose animation!

raft

well as the error says, there is no animation in that file. possibly your exporter does not export it because of something..

if you are sure, that's not the case (by manually inspecting skeleton.xml) send me the mesh and skeleton files and let me have a look

AGP

Then please PM me your e-mail address.

raft

I had looked at your skeleton file. it contains animationlink elements which are references to other animation files. unfortunately seems as jME Ogre loader does not load them. does your exporter have any options to embed all animations into skeleton.xml file?

I will try to have a look at jME loader and made it load such external files but no promises about when and it will be done ;)

AGP

#9
That's right, because of the bad parsing (let's not go into it again), I exported the individual animations separately. If not automatically reading all your animationLinks, what about something like Skeleton.addAnimation(String xmlFile)?

So to explain the initial problem: say I had two animations, a walk and a run. The model was being loaded such that the end of "walk" was the beginning of "run." It must come from bad parsing, as the animations had the right number of frames in the skeleton.xml file, so I split them into separate xml files. Which brings us to this current problem, whereby the loader doesn't load the animationLink references in the main skeleton.xml.

raft

Quote
what about something like Skeleton.addAnimation(String xmlFile)?
Bones do not do parsing the xml file. it depend on jME's loader. I prefer it stay this way, so such a method is not an option at the moment

Quote
So to explain the initial problem: say I had two animations, a walk and a run. The model was being loaded such that the end of "walk" was the beginning of "run."
I still dont understand what the problem is here. Maybe a drawing or something may help

AGP

I'm not sure how a drawing could help. But modifying the loader to load the animationLinks would do it.

raft

It would help me understand the problem.

How are you sure that it's exported correctly but loaded incorrectly? have you tried to open exported animation in another viewer, OgreMax's viewer for example?

AGP

Yes, the binary one load right on the viewer. And the XML file has the right number of frames for the animations.

raft

ok, please send me the incorrectly loaded xml files