Animated Milkshape 3D model acting strangely.

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
steveth45
Posts: 14
Joined: Fri Mar 03, 2006 2:42 am
Location: Eugene, OR, USA
Contact:

Animated Milkshape 3D model acting strangely.

Post by steveth45 »

I made an animated model in Milkshape 3D, the latest version and loaded it into Irrlicht by replacing some text in the Hello World tutorial. I have some questions:

1. A six-frame animation became 208 frames when loaded by Irrlicht, is there any way to calculate exactly which frame counts represent the original frame counts?

2. When animating this model, Irrlicht seems to insert some frames at the beginning where the model is deconstructed (arms are not attached, etc), and rotated 90 degrees. Is there a way to avoid this? (I turned off the "Operate on selected joints only" option, so each frame should have each of the joint positions stored.)

3. Also, when animating the model with a light source, the lighting on the model doesn't seem to change (the arms move around but the lighting stays the same, it looks unnatural). Is there a way to get it to recalculate the lighting on the model for each frame of animation?

here is an image, notice the wierd lighting on the arms:
Image

Thanks.
+--------+
steveth45
+--------+
steveth45
Posts: 14
Joined: Fri Mar 03, 2006 2:42 am
Location: Eugene, OR, USA
Contact:

answers

Post by steveth45 »

To answer some of my questions:

The importing of MS3D models is buggy and incomplete in Irrlicht right now. The animation is messed up and the model is a mirror image of what its supposed to be. I was able to export a .x file and loading the .x file took care of those two problems.

However, the issue remains that the lighting does not change on the moving parts of the animation. I've done quite a bit of research on the forum on this particular issue and I couldn't find mention, so I figure it is a bug or unimplemented feature.

I enjoy other aspects about Irrlicht, so I will look into fixing some of these problems instead of just whining about them.
+--------+
steveth45
+--------+
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

unfortunately i can only assist u with the frames
milkshape MS3D files framenummer is multiplited with 41.6665...
..yes , that is -weird-

the lighting artefact must be caused be erroneus normals
the reason for this -could- be a difference in version of milkshape, but i definately cant say (dont own milkshape)
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
steveth45
Posts: 14
Joined: Fri Mar 03, 2006 2:42 am
Location: Eugene, OR, USA
Contact:

Lighting on animated models fixed.

Post by steveth45 »

Thanks bear,
The normals are loaded fine. What happens is that they were not getting transformed along with the animated joints--it happens with .x files too. I found a patch to the engine that adds this missing feature on this webpage:
http://parsys.informatik.uni-oldenburg. ... /irrlicht/ . There are a number of other bug fixes for the engine on this page, but I found the animation normals fix to be the most immediately useful. I hope most of these get rolled into the next release.

Is there any particular reason that the frame number for ms3d models is multiplied by 41.6665 ? Can this be changed easily?

I haven't found a fix for the fact that irrlicht loads ms3d models reversed. I can get around it by exporting them to .x files.

I found another problem with the engine. I have scaled, rotated models in my project and the bounding boxes calculated by irrlicht are too small. I have to calculate my own (easy enough) to get it to work right.
+--------+
steveth45
+--------+
George
Posts: 7
Joined: Tue Jun 20, 2006 12:28 am
Location: Sydney, Australia

Lighting on animated models

Post by George »

steveth45,

Do you know/remember which patch it was on the http://parsys.informatik.uni-oldenburg. ... /irrlicht/

web page that fixed the normals not getting transformed with the animated joints? I looked through the list but it wasn't obvious.
George
Posts: 7
Joined: Tue Jun 20, 2006 12:28 am
Location: Sydney, Australia

Lighting on animated models

Post by George »

ooops just found it, never mind. :)
It was the:

AnimXNormals.patchCXAnimationPlayer normals fix by yin nadie.

under IrrlichtNX(++) patches
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, that's right. I recently added this patch to the SVN sources, so if you use the bleeding-edge version of Irrlicht you'll get the fix for free :D
Post Reply