ogl-es COgreMeshFileLoader bug

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

ogl-es COgreMeshFileLoader bug

Post by penguin03 »

I use EasyOgre exporter to export a mesh with skeleton animation from 3ds max, Use irrlicht to load and render it, and it's wrong. I use OgreMeshViewer to open it, it's correct.

The hand and foot is not correct, I use the latest ogl-es branch r4525

Here is the screenshot:

Image

Here is the ogre mesh:

http://www.vicono.com/girl.zip
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: ogl-es COgreMeshFileLoader bug

Post by penguin03 »

Here is the code:

Code: Select all

 
IAnimatedMesh* mesh = dev->getSceneManager()->getMesh("girlgirl.mesh");
 IAnimatedMeshSceneNode* node = dev->getSceneManager()->addAnimatedMeshSceneNode(mesh);
 node->setMaterialFlag(EMF_LIGHTING, false);
 node->setRotation(vector3df(0, 180, 0));
 node->setScale(vector3df(0.5, 0.5, 0.5));
 node->setMaterialTexture(0, dev->getVideoDriver()->getTexture("UVgirl.png"));
 
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: ogl-es COgreMeshFileLoader bug

Post by mongoose7 »

I think you have to ensure that the base pose has no animation, that is, all bones have the identity transformation.
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: ogl-es COgreMeshFileLoader bug

Post by penguin03 »

Do you mean at the animation frame 0, all bones have no transform? Now we have transforms at frame 0, but ogre mesh viewer is ok
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: ogl-es COgreMeshFileLoader bug

Post by mongoose7 »

Then I guess the OGRE mesh viewer is better than Irrlicht?
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: ogl-es COgreMeshFileLoader bug

Post by penguin03 »

@ mongoose7

I just tried as you said, at the first frame, there is no transform. The result is: only the first frame is correct, the rest is same.

Any other suggestion?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: ogl-es COgreMeshFileLoader bug

Post by Nadro »

Did you have the same effect in trunk? Please check a model in Irrlicht mesh viewer.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: ogl-es COgreMeshFileLoader bug

Post by penguin03 »

@Nadro

Just try it with mesh viewer under trunk, same effect. The hand and foot are not correct. Maybe the 3ds max biped bones affect it?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: ogl-es COgreMeshFileLoader bug

Post by mongoose7 »

penguin03 wrote:@ mongoose7

I just tried as you said, at the first frame, there is no transform. The result is: only the first frame is correct, the rest is same.

Any other suggestion?
Just to be sure, the starting pose has no transformations and the subsequent poses have transformations *relative* to the starting pose? That is, all the bone transformations have been multiplied by the inverse of the original transformation for that bone?
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: ogl-es COgreMeshFileLoader bug

Post by penguin03 »

@mongoose7

I'm not sure the pose transforms are fitted for Irrlicht engine. I use EasyOgreMax exporter to export the mesh and animation from 3ds max 2012.

I'm confusing the Ogre3d engine use the same method to calculate the skin animation with Irrlicht?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: ogl-es COgreMeshFileLoader bug

Post by mongoose7 »

No.
Post Reply