MS3D & frames

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
cartoonit
Posts: 286
Joined: Mon Nov 15, 2004 6:36 pm

MS3D & frames

Post by cartoonit »

Is there any reason why the frames are offset, by around 40 to 42?? Wouldn't it be more appropriate to have the frames the same as the modelling environment?? :roll:
Guest

Post by Guest »

My guess is because the animation in MS3D is done using keyframes, and there is some kind of frames-per-second property.

Animation is interpolated anyway, so for smooth animations it may be preferable to use a higher precision.

I can't say that that is what is going on - the documentation does not seem to say anything about it.

But using frame numbers in a fixed rate (e.g. 1 ms intervals), even if they aren't all played back, does allow you to replace old animations with more fluent ones without changing any code - as long as the relative length of each separate sequence (e.g. walk, run, die or whatever) stays the same.

I don't know the granularity used by irrlicht, but here are some possibilities:

Code: Select all

MS3D framerate     Irrlicht framerate      factor
24                 1000                    41.6667
25                 1000                    42
24                 1024                    42.6667
25                 1024                    40.96
cartoonit
Posts: 286
Joined: Mon Nov 15, 2004 6:36 pm

Post by cartoonit »

When you set the frame loop for the animation, it truncates the floating point numbers, to signed integers, therefore loosing this precision, might look in to this later on tonite... :roll:

Cheers for the information :D
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Anonymous wrote: I don't know the granularity used by irrlicht, but here are some possibilities:
Thanks for posting. I think I remember writing something like that, and I've just looked at the code, but could not find it. Quite strange.
Nemesis
Posts: 65
Joined: Sun Mar 20, 2005 12:45 pm

Post by Nemesis »

Oh yes Niko :D ! Try to fix that code please :) ! Or just post the exact value to let the Irrlicht users find the exact frame loop value :D !
Example: A FPS weapon made with Milkshape 3D, with 180 frame loops need (I don't know the exact value, and this make me crazy :evil: :lol: ) about 7500 Irrlicht frames :shock: ,guest before have write that milkshape use keyframes, that are quite differents... Please post as soon as possible an help on how have the exact value for milk 3D animation! Thanks :) !
S.T.A.R.S.! (Resident Evil 3)
Nemesis
Posts: 65
Joined: Sun Mar 20, 2005 12:45 pm

Post by Nemesis »

A question: Maybe some people already work with milshape model so they already know the exact frames for anim in irrlicht :) !
S.T.A.R.S.! (Resident Evil 3)
cartoonit
Posts: 286
Joined: Mon Nov 15, 2004 6:36 pm

Post by cartoonit »

Well you can't set the frames exactly, as I've already said because when you pass in a floating point number to the set frames function they get rounded to signed integers. Its something I was going to look at, but time has kinda caught up with me, so I've got some more important things to be doing at the moment...
Nemesis
Posts: 65
Joined: Sun Mar 20, 2005 12:45 pm

Post by Nemesis »

Mhh... So what about Modeling with milkshape 3D, export the model in character FX, end export all in a good 3ds, x, md2, or obj formats?
How do you think about that? What is the best format for characters and what the best for cars? In any case character FX use keyframes(making all useless :( ) Please reply! Thanks :) !
S.T.A.R.S.! (Resident Evil 3)
cartoonit
Posts: 286
Joined: Mon Nov 15, 2004 6:36 pm

Post by cartoonit »

Well your still going to loose the precise setting of the animation, I'm no modeller, and really only use other peoples models. I'm more of a programmer... I think you would need to look at the source to make it precise...
Nemesis
Posts: 65
Joined: Sun Mar 20, 2005 12:45 pm

Post by Nemesis »

Arrgh :shock: ! No! I don't! It's too complicated for now :lol: ! Just kidding(although isn't too easy), but since I'm lazy for this operation, I wonder if anyone do 3Dmodelling and know the values of frames.That's all :) ...
In any case thank for reply,cartoonit :) !
S.T.A.R.S.! (Resident Evil 3)
Post Reply