Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes after deserializing a J3O, animations are broken #371

Closed
pateman opened this issue Oct 26, 2015 · 7 comments
Closed

Sometimes after deserializing a J3O, animations are broken #371

pateman opened this issue Oct 26, 2015 · 7 comments
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Milestone

Comments

@pateman
Copy link

pateman commented Oct 26, 2015

Related to this topic: http://hub.jmonkeyengine.org/t/solved-ogrexml-model-animation-broken-after-exporting-to-j3o/34200

A solution is also present there.

@marshhxx
Copy link

Hi @pateman
I'm experiencing a similar issue on Android.
I exported a 3ds Max model to OgreXml. The animated model works perfectly but the first time takes about 20s to render.
I then imported my OgreXml model to jMonkeyPlatform and convert it to j3o binary. The model takes 1s to render but animations are broken.
Did you solve it adding rootBone.reset(); in the Skeleton.read() method?
Did you then import the new jars to your project?

Thanks for the help!

@pateman
Copy link
Author

pateman commented Nov 18, 2015

@marshhxx, yes, that's basically what solved the problem for me. I didn't really import a modified JAR. I just downloaded the source file from the repo, put it under the same package in my project's source, modified it, and rebuilt the project.

@marshhxx
Copy link

@pateman Thanks for the help! I try it and worked 👍
I found a simpler solution that worked where you don't need to change the library. Have a look at this link http://hub.jmonkeyengine.org/t/android-graphic-glitches/33403/25

Basically what you need to do is apply "setHardwareSkinningPreferred" to your Spatial.
SkeletonControl skeletonControl = player.getControl(SkeletonControl.class);
skeletonControl.setHardwareSkinningPreferred(true);

Hope it helps!

@Nehon Nehon added bug Something that is supposed to work, but doesn't. More severe than a "defect". Contribution welcome labels Jan 21, 2018
@Nehon
Copy link
Contributor

Nehon commented Jan 21, 2018

To anyone willing to take this one
Solution is to add rootBone.reset() be fore this line -> https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/animation/Skeleton.java#L307

@Ali-RS
Copy link
Member

Ali-RS commented Jan 21, 2018

Will take this.

@ianmcclean
Copy link
Contributor

This issue should be closed with the merging of the PR.

@stephengold
Copy link
Member

The PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Projects
None yet
Development

No branches or pull requests

6 participants