Page 1 of 1

[SOLVED] Attached Object within mesh not loading correctly

Posted: Mon Apr 28, 2008 9:50 pm
by qez111
My character has a hat attached to the head. It is exported in .x format.
When I load the .x model in IrrEdit, the model appears correctly (the hat is attached to the head properly). But when I load the same model in my program, the hat appears too big and it is not attached to the head. Basically it seems rotated about 90 degrees and scaled up at least 10 times. However, it moves as the head moves. I am using the latest version of Irrlicht from SVN.
Can somebody explain this unusual behaviour. Is it something to do with the latest version of Irrlicht (because it appears fine when viewing in IrrEdit) ?
Thanks

Posted: Mon May 05, 2008 6:08 am
by qez111
I am wondering if anybody here knows why this happens? Basically my animated mesh has a hat 'linked' to the head of the biped. when i view the model using directX viewer it looks fine(the hat loads correctly and moves along with the head). even in irrlicht editor v0.7 it loads perfectly. but when i load this model in the latest svn version 1324 of irrlicht engine, i see that the hat is separated off from the head and scaled up 10 times bigger.
Can someone help me out... thanks.

Solved..

Posted: Mon May 05, 2008 11:36 pm
by qez111
I solved the problem by doing Reset Xform on the linked objects.

Posted: Thu May 08, 2008 3:07 am
by armzajetset
can you explain how to solve more clearly ?

Reset XForm

Posted: Thu May 08, 2008 5:00 am
by qez111
In Utilities, there's a tool called 'Reset XForm'. I just clicked that and applied 'Reset XForm' on the selected mesh. A new modifier called 'XForm' is then added to the modifier stack.
Thats it.

Posted: Thu May 08, 2008 5:28 am
by armzajetset
thank you, i owe you !!

Posted: Thu May 08, 2008 5:33 am
by Zeuss
Reset XForm is a handy utility.

Probably the latest version of irrlicht on svn wasnt reading in the frame transformation correctly for the hat. Reset XForm resets the rotation, scale and transformation back to 0,0,0 and 1,1,1 and 0,0,0 respectively and transforms the verts themselves, therefore failing to read in the frame transformation wouldn't matter as the verts are where they are meant to be anyway.