Maya2012 + OgreMax
First i made an dog-animation "run without position-moving"(which means the dog just run in situ). The animation played fine on my phone.
Then i changed the animation to "run with position-moving"(which means the dog run here and there). The .mesh and .skeleton runs fine in OgreMax-WinViewer. But when i played it on my phone(with .bones), something seemed to be strange:
The dog's body moved, but the tail didn't move with the body. The tail seemed to stretched from origin position to where the dog's body moved to.
I tried jme3 with the same .mesh.xml and .skeleton.xml , evething was ok.
Shall i send the xml-file to you?
I will try .xml instead of .bones.
that's strange and shouldn't happen. can you please double check if it seems ok in OgreMax viewer and has a problem in Bones?
.xml or .bones shouldn't differ. .bones format is created by first laoding xml files.
I have checked again. The same mesh+skeleton played fine in OgreMax-WinViewer, but strange on phone with .bones(tail stretched). I am not sure how to use .xml instead of .bones, so i don't know if the result are some difference between them. Could you do a test with my .xml? This problem bore me a long time. Thanks!
Here are my codes:
//onSurfaceCreated
AnimatedGroup group = BonesIO.loadGroup(mContext.getAssets().open("dog21.bones"));
mGroup = group;
for(Animated3D a : group)
{
a.setTexture("world");
a.build();
}
mDog = group.get(0);
group.addToWorld(mWorld);
Camera camera = mWorld.getCamera();
camera.setPosition(0, 0, 150);
camera.lookAt(mDog.getTransformedCenter());
camera.rotateCameraZ((float) Math.PI);
mWorld.buildAllObjects();
mFrameBuffer = new FrameBuffer(480, 800);
MemoryHelper.compact();
// onDrawFrame
mDog.setAutoApplyAnimation(false);
mDog.animatePose(time_line, animation_index);
mDog.animateSkin(time_line, animation_index);
mDog.applyAnimation();
time_line += 0.05 * speed;
if(time_line > 1)
time_line = 0.01f;
mFrameBuffer.clear();
mWorld.renderScene(mFrameBuffer);
mWorld.draw(mFrameBuffer);
mFrameBuffer.display();
ah you are using animation blending. that may be the cause. send me the files and let me have a look
Quote from: kiffa
I am not sure how to use .xml instead of .bones, so i don't know if the result are some difference between them.
have a look at OgreSample to see how to load Ogre xml files directly. but that is both slower and requires Ogre3D jars on classpath, that's why .bones format is preferred
Yes, i prefer .bones too.
And i have sent the files to you, thanks!
yes, there is definetely a flaw there. jME shows it correct to. I will investigate it in detail.
can you please provide me some screenshots of your skeleton, just the one below, from a similar perspective
edit: I need the screenshots in bind pose
(http://s17.postimage.org/h6pduelzj/skeleton.png)
..and looking at your skeleton hierarchy, there are two root bones (without a parent): joint1 and joint5. This is uncommon, mostly there is only one root bone (without a parent) I think this may be causing the problem. Reorganize your skeleton that there is only one root bone and see if that helps.
I agree that Bones should handle that and I'll try to fix it.
it should be fixed now, please re-download the zip
It works! ;D Thank you very much!