problem with ms3d files...

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!
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

problem with ms3d files...

Post by buhatkj »

i searched the forum and didnt find anybody mentioning this problem, so i registered and am making this post.

i am having a problem with loading and animating ms3d files, what happens is that it appears to load the file ok, but the animation is stuck between maybe the first 2 frames and it just sits there and jitters. i double checked that i had called setFrameLoop with the right frames, and i had done it right, so i dunno whats wrong. also, when i move the model it becomes stretched vertically while he is in motion, VERY wierd looking....

does anybody have some idea what im doing wrong, maybe its my video driver, i suppose i will upgrade that (if i can)

i'd appreciate any help!!
-Ted :?: :?: :?: :cry:
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
twoflower
Posts: 1
Joined: Sun Dec 14, 2003 9:21 am

The same problem

Post by twoflower »

Hi to all

I got the same problem. I am not sure it is a hardware problem (at least Irrlicht doesn't use any "shaders" tricks ATM). I have tested it on nVidia FX5200 and ATI Radeon 9000 Pro.
So, the problem is somethere in the Milkshape3D class.

I will try to debug what exactly happen.

---------------------------------------------------------------------------
Moonlight Sonate
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

Post by wornaki »

Look for the demo of Komando04. It has a kind of animation with .ms3d models that it is done through bone rotation, I assume. Maybe that works better. If it doesn't, well send a PM (Private message) to Niko to tell him about it...
cheers
Guest

least im not the only one...

Post by Guest »

well im glad im not the only person having that problem, i will look for that demo, and see what it is doing differently than i am. although the model was already animated, and im not too much looking forward to scripting the animations in c++ or whatever for each model id wanna load :(

if i cant figure it out MAYBE ill message niko, but im sure he has lots to do getting ready for 0.5 :lol:
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

couldnt find that demo...

Post by buhatkj »

i couldnt seem to find the aforemention komando04 demo anywheres, got a link handy??

im thinking that for the moment perhaps i will ditch the idea of using the ms3d models (even though they should look better) and stick with md2's. the one bit ill really miss is being able to attach weapons or particle effects to particular joints on the model. maybe ill switch it back once i figure out whats wrong, i dunno. i have a lot to work on with the gameplay anywho...
http://fmorg.sourceforge.net

:twisted:
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

Post by wornaki »

Komando04 demo

http://stimpunx.fr.st/
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

hey buhatkj your screen shots look nice if you need help with modeling or texturing just tell me
Keanu
Posts: 13
Joined: Sun Jan 04, 2004 11:10 am
Location: Italy
Contact:

Post by Keanu »

I'm also experiencing problems with milkshape loader. First of all the frame numbers are different between irrlicht and milkshape. This maybe is not a problem but when I set my frame loop e.g. (0,50) my model appears destroyed in the first frames, but then the animation plays correctly.
Also if I use as ending frame the number returned by getFrameCount() the animation ends with some strange effects. Where's the bug? I'm not able to use the loader, is a library bug or something is wrong with milkshape?
P4 2.53MHz 256MB GeForce4Mx VC++6.0
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

getFrameCount() probably returns the number of frames, not the last valid frame index.

sort of like:
int blah[5];

getFrameCount() is the same as 5 here, which is the number of elements, not the last valid index. if you tried to use:
blah[5] = something;
you would definately get a problem! I think its the same here.

Instead, use getFrameCount()-1 as your last valid index. Just like:
blah[5-1] = something;
would work to store 'something' into the last valid element in the array.
a screen cap is worth 0x100000 DWORDS
Keanu
Posts: 13
Joined: Sun Jan 04, 2004 11:10 am
Location: Italy
Contact:

Post by Keanu »

Yeah I got it. This solves half my problem. The animation plays well until the end. But how about the beginning. To get a normal animation I have to use as start frame the 50th! The previous shows the model in small pieces and not where they sohould be! I think this is an important topic to solve because many had asked about it, so please help!
P4 2.53MHz 256MB GeForce4Mx VC++6.0
Guest

Post by Guest »

Hi,

what I see is: 1Frame in Milkshape seems to translate to 1000 frames in Irrlicht.. So, for a 10 frame animation, I have to set

node->setFrameLoop(0, 10000);

My animation consists of three keyframes, and Irrlicht seems to translate the position of the mesh in the middle keyframe in a way that halfway through the animation the mesh seems to "jump" into the camera.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

the bottom line??

Post by buhatkj »

so does anybody know what the bottom line is?
given this:

Code: Select all

scene::IAnimatedMeshSceneNode* Node = 0;
scene::IAnimatedMesh* Mesh = smgr->getMesh("model.ms3d");
Node = smgr->addAnimatedMeshSceneNode(Mesh);
how do i call setFrameLoop() to make it animate him for example between ms3d frames 2 and 20??

this could DEFINITELY use a tutorial..... :cry: :?
~ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
tstuefe
Posts: 40
Joined: Wed Jan 07, 2004 12:53 pm
Location: Heidelberg, Germany
Contact:

Post by tstuefe »

I didn't get it to run reliably. Seems simply to be broken. As I said before (as guest), 1000 frames in Irrlicht seem to correspond to 1 frame in milkshape. So to animate between 2 and 20, you would have to call

Code: Select all

node->setFrameLoop(2000, 20000);
node->setAnimationSpeed ( 1000 );
.

Save that the model seems to jump and behave in an inconsistent way. I try to rotate a simple ball, and half the rotation works fine, the other half the ball rotates around some weird axis...
mariusz_p
Posts: 15
Joined: Tue Jan 06, 2004 9:37 pm

Post by mariusz_p »

wornaki wrote:Komando04 demo

http://stimpunx.fr.st/
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

this is what i got. Is there any other place where i can find this demo?
Keanu
Posts: 13
Joined: Sun Jan 04, 2004 11:10 am
Location: Italy
Contact:

Post by Keanu »

I'm thinking about giving up with ms3d format and using some other one until it's fixed, so does anybody knows how to save my animations in md2 format and set the different actions as I read somewhere?
P4 2.53MHz 256MB GeForce4Mx VC++6.0
Post Reply