MS3D groups without bones bug
MS3D groups without bones bug
I review forum but not found answer for my qustion.
Please help me.
I am found bug report for X Model Player. But my version of IrrLicht has fix for this bug.
But I can not obtain normal result.
I am create model with bones.
After I am load it in my project.
I add Cubes to my scene to joints possitions.
This cubes have incorrect positions!!! My scene in 3D Max has other positions.
Are the bones functional in the X-model or MS3D model?
Please help me.
I am found bug report for X Model Player. But my version of IrrLicht has fix for this bug.
But I can not obtain normal result.
I am create model with bones.
After I am load it in my project.
I add Cubes to my scene to joints possitions.
This cubes have incorrect positions!!! My scene in 3D Max has other positions.
Are the bones functional in the X-model or MS3D model?
I am create MS3D object:
http://www.webpolit.com/irr/123.ms3d
After I am load model, and try to get joint positions.
But line
core::matrix4 *pmatTest = rod->getMatrixOfJoint(i, 0);
is return NULL.
Why?
http://www.webpolit.com/irr/123.ms3d
After I am load model, and try to get joint positions.
Code: Select all
rod = (IAnimatedMeshMS3D*)smgr->getMesh("../storage/123.ms3d");
smgr->addAnimatedMeshSceneNode(rod);
int c = rod->getJointCount();
for (int i=0;i<c;i++)
{
core::matrix4 *pmatTest = rod->getMatrixOfJoint(i, 0);
vector3df pos= pmatTest->getTranslation();
}
core::matrix4 *pmatTest = rod->getMatrixOfJoint(i, 0);
is return NULL.
Why?
I am create new animated model:
http://webpolit.com/irr/111.ms3d
And this code in main loop for display bones.
And take this results:
1. Model is displayd.
2. Model is aminated.
3. I have accesse to bones and its matrix
But I have other scene in my game
http://webpolit.com/irr/111.ms3d
And this code in main loop for display bones.
Code: Select all
int c = rod->getJointCount();
vector3df start, end;
for (int i=0;i<c;i++)
{
core::matrix4 *pmatTest = rod->getMatrixOfJoint(i, 0);
end= pmatTest->getTranslation();
if (i>0)
{
driver->draw3DLine(start, end, SColor(255,255,0,0));
}
start=end;
}
1. Model is displayd.
2. Model is aminated.
3. I have accesse to bones and its matrix
But I have other scene in my game
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Ah, yes, in version 1.1, ms3d models don't return joint information unless the mesh is animated. This has been fixed in the latest subversion source so that it returns the initial joint matrices for non-animated models, regardless of the frame number you supply.
If you just want the joint positions, then you may be able to work around it in 1.1 by using IAnimatedMeshSceneNode::getMS3DJointNode(), then getting the position of the returned ISceneNode (then dropping it if you don't need the scene node itself), although I haven't tried that.
If you just want the joint positions, then you may be able to work around it in 1.1 by using IAnimatedMeshSceneNode::getMS3DJointNode(), then getting the position of the returned ISceneNode (then dropping it if you don't need the scene node itself), although I haven't tried that.
Yes. I am create animated model and I access to joints with getMS3DJointNode now.If you just want the joint positions, then you may be able to work around it in 1.1 by using IAnimatedMeshSceneNode::getMS3DJointNode(), then getting the position of the returned ISceneNode (then dropping it if you don't need the scene node itself), although I haven't tried that.
But I have other problem:
I bind object to bone in 3DSMAX and export scene to ms3d file.
Then I open ms3d in milkshape, and take normal model, but if I load model in IrrLicht object, which binded to bone, is located not on its place.
Screenshot on Milkshape:
Screenshot on my project:
Boxes is my joints.
Why the spool is not located on its place?
Can objects do not save the rotating vector?
Probably this so!
Becouse, I am change scene to:
And take this:
The rod is using joint animation, but other objects not have it.
My scene:
http://webpolit.com/irr/rod.ms3d
It is bug?
Probably this so!
Becouse, I am change scene to:
And take this:
The rod is using joint animation, but other objects not have it.
My scene:
http://webpolit.com/irr/rod.ms3d
It is bug?
looks like ms3d doesnt hold information for the positions of groups (at least in the ascii format), so i'm guessing irrlicht's ms3d loader changes each bone matrix as it loads them, leaving everything that isn't attached to a bone in its original position.
this would also explain why you see the mesh flip around before the animation starts.
this is a bug, so i'm moving this topic to bug reports and renaming it
thanks for the test models, and such detailed bug reporting, i'll try and get it fixed
this would also explain why you see the mesh flip around before the animation starts.
this is a bug, so i'm moving this topic to bug reports and renaming it
thanks for the test models, and such detailed bug reporting, i'll try and get it fixed
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
You sunk my battleship!
Well, capsized my destroyer anyway. I forgive you, but I don't know if the brave men of the z1.ms3d can.
This is with svn 282. The positions of the bone nodes are correct (note the guns floating in the air, at the expected positions), but the models have been rotated 90 degrees counterclockwise around their Z axes and 180 around their Y axes compared to the previous behaviour (the ship points backwards, and the guns now point in towards the centre of the ship).
Code for this example (sans the sky and water textures). Previously (around 275 or so), the models appeared as I would have expected based on the Milkshape views.
Well, capsized my destroyer anyway. I forgive you, but I don't know if the brave men of the z1.ms3d can.
This is with svn 282. The positions of the bone nodes are correct (note the guns floating in the air, at the expected positions), but the models have been rotated 90 degrees counterclockwise around their Z axes and 180 around their Y axes compared to the previous behaviour (the ship points backwards, and the guns now point in towards the centre of the ship).
Code for this example (sans the sky and water textures). Previously (around 275 or so), the models appeared as I would have expected based on the Milkshape views.