[SOLVED] Attached Object within mesh not loading correctly

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
qez111
Posts: 54
Joined: Mon Apr 28, 2008 9:44 pm

[SOLVED] Attached Object within mesh not loading correctly

Post 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
Last edited by qez111 on Mon May 05, 2008 11:36 pm, edited 1 time in total.
qez111
Posts: 54
Joined: Mon Apr 28, 2008 9:44 pm

Post 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.
qez111
Posts: 54
Joined: Mon Apr 28, 2008 9:44 pm

Solved..

Post by qez111 »

I solved the problem by doing Reset Xform on the linked objects.
armzajetset
Posts: 40
Joined: Tue Mar 13, 2007 9:23 am
Location: Thailand

Post by armzajetset »

can you explain how to solve more clearly ?
Image Irrlicht NewBie~*
qez111
Posts: 54
Joined: Mon Apr 28, 2008 9:44 pm

Reset XForm

Post 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.
armzajetset
Posts: 40
Joined: Tue Mar 13, 2007 9:23 am
Location: Thailand

Post by armzajetset »

thank you, i owe you !!
Image Irrlicht NewBie~*
Zeuss
Posts: 114
Joined: Mon Nov 08, 2004 9:02 pm
Location: Canberra - Australia
Contact:

Post 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.
Help make Irrlicht even Better! Create and submit your own Irrlicht Extension
Want a Games Education? Try The Academy of Interactive Entertainment
Post Reply