www.jpct.net
Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: AGP on April 15, 2012, 06:11:04 am
-
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).
-
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?
-
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
-
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
-
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)
-
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!
-
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
-
Then please PM me your e-mail address.
-
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 ;)
-
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.
-
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
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
-
I'm not sure how a drawing could help. But modifying the loader to load the animationLinks would do it.
-
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?
-
Yes, the binary one load right on the viewer. And the XML file has the right number of frames for the animations.
-
ok, please send me the incorrectly loaded xml files
-
well, I've converted xml files to Ogre's native (binary) form with OgreXMLConverter and opened with OgreMax viewer. The animation is the same as Bones renders.
How do you convert them from Ogre binary to xml? Maybe that's the faulty part?
-
No, I just have OgreMax save the XMLs. There's no binary-XML conversion on my part.
-
Yes, the binary one load right on the viewer. And the XML file has the right number of frames for the animations.
then which binary were you talking about here?
-
The binary that OgreMax also exports.
-
I see. then try this: export to binary and convert to xml with OgreXMLConverter and see if that helps
-
If it does, will you please nevertheless fix the importer?
-
I don't think there is a problem with importer. which is I'm trying to show you
-
There's no problem with the exporter, as I've argued. There might be a problem with the OgreXMLConverter, but since OgreMax converts the exact same data in both binary and XML forms, there's no need to go through that tool. I am, nevertheless, testing it. If the result works with your loader, it means that your loader misses by the same amount as the OgreXMLConverter. But I've talked to Derek (the OgreMax developer), and he assured me that the binary and XML files are identical (and it looks a lot like that to me, by simply comparing the number of frames with the data in Max's Mixer).
-
well, OgreMax viewer and Bones renders same output. it is very unlikely that Bones and OgreXmlConverter do the exact same mistake while importing.
-
It would make sense, if whoever wrote the importer used OgreXMLConverter, wouldn't it? I just e-mailed Derek again: OgreMax 2.41's output files for both Ogre 1.7 and Ogre 1.8 isn't working with OgreXMLConverter. I'm just going to have to wait for his response.
-
importer is pure java. it doesn't use any other tool
-
That's not my point: if whoever wrote it tested against the output of OgreXMLConverter, it would make sense for it to load wrong by the same margin as OgreXMLConverter.
-
very very unlikely IMHO. I've never seen importer making such a mistake. and it loads all your animations correct except this one
-
I must be using OgreXMLConverter wrong, because Derek says that internally OgreMax uses it to write the XMLs too, although it doesn't go through for me. But anyway, what's the one animation that you think isn't right ("it loads all your animations correctly except this one")? From where I'm standing, all animations leak into their following ones.
-
i dont think this is OgreXMLConverter related. IMHO this must be something related to your export options.
try increasing key frames. if there are no or very little space (free time) among your animations, try increasing that.
-
There's no space between them, but then I just had OgreMax read the animation data straight from the Mixer, which is how it's done now (you no longer do it manually).