Ms3d and MD2
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
Ms3d and MD2
Hi,
It seem that we can get the bone (or joint or node) of a MS3D model with the function "getMS3DJointNode", but in the same, only MD2 model can be animated...
It is possible to get the advantage of animation with MD2 and the advantage of subnode (or bone or joint) of MS3D ?
Thanks for your help.
Regards.
cyb
It seem that we can get the bone (or joint or node) of a MS3D model with the function "getMS3DJointNode", but in the same, only MD2 model can be animated...
It is possible to get the advantage of animation with MD2 and the advantage of subnode (or bone or joint) of MS3D ?
Thanks for your help.
Regards.
cyb
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
Yes !
This is strange because i have get a model on the Net (ninja) and the text file tell me this :
But it seems that the number doesn't correspond ...
But it work, and i'm really happy because with this feature : getMS3DJointNode i can do localized damages (i check the transformed bounding box of the node) !
thanks for all !
This is strange because i have get a model on the Net (ninja) and the text file tell me this :
Code: Select all
1-14 Walk (normal)
15-30 Stealth Walk
32-44 Punch and swipe sword
45-59 Swipe and spin sword
60-68 Overhead twohanded downswipe
69-72 Up to block position (play backwards to lower sword if you want)
73-83 Forward kick
84-93 Pick up from floor (or down to crouch at frame 87)
94-102 Jump
103-111 Jump without height (for programmer controlled jumps)
112-125 High jump to Sword Kill (Finish em off move??)
126-133 Side Kick
134-145 Spinning Sword attack (might wanna speed this up in game)
146-158 Backflip
159-165 Climb wall
166-173 Death 1 - Fall back onto ground
174-182 Death 2 - Fall forward onto ground
184-205 Idle 1 - Breathe heavily
206-250 Idle 2
251-300 Idle 3
But it work, and i'm really happy because with this feature : getMS3DJointNode i can do localized damages (i check the transformed bounding box of the node) !
thanks for all !
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
Ok, i understand :
with getFrameCount i have 12000 frames...
and in the model i have 300 frames !?!?
with this calculation, i have found the correct range of frame :
1-14 Walk (normal)
15-30 Stealth Walk
range_walk_1 = (12000/300)*1
range_walk_2 = (12000/300)*14
range_stealthwalk_1 = (12000/300)*15
range_stealthwalk_2 = (12000/300)*30
etc...
How can you explain that ?
with getFrameCount i have 12000 frames...
and in the model i have 300 frames !?!?
with this calculation, i have found the correct range of frame :
1-14 Walk (normal)
15-30 Stealth Walk
range_walk_1 = (12000/300)*1
range_walk_2 = (12000/300)*14
range_stealthwalk_1 = (12000/300)*15
range_stealthwalk_2 = (12000/300)*30
etc...
How can you explain that ?
Ah, your're right, I forgot that.
The reason why the frame number is multiplied is because using only 300 frames, your animation would not be smooth at all. By multiplying the frame number with (for example here 40), it is getting smoother. By the factor 40, in this case. I should add a comment on this in the documentation.
The reason why the frame number is multiplied is because using only 300 frames, your animation would not be smooth at all. By multiplying the frame number with (for example here 40), it is getting smoother. By the factor 40, in this case. I should add a comment on this in the documentation.
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
I just thought I'd have a go with ms3d modeling/animation.. I found out I suck
The problem is, I know I animated my ms3d file, I can scrub back and forth and see it animate in MShape. but when I load the mesh into irrlicht I just hmm.. no animations..
This is what I use to load the mesh
The mesh and texture displays, but no animations...Ok one thing I did notice was when the mesh first displayed its frame 1 was all screwed up. the bones were a little stuffed up and in wrong place..
Ideas..??
The problem is, I know I animated my ms3d file, I can scrub back and forth and see it animate in MShape. but when I load the mesh into irrlicht I just hmm.. no animations..
This is what I use to load the mesh
Code: Select all
scene::IAnimatedMesh* mesh = 0;
// mesh = sm->getMesh(".\\Meshes\\Models\\test_soldier.md2");
mesh = sm->getMesh("wart.ms3d");
if (mesh)
{
model1 = sm->addAnimatedMeshSceneNode(mesh);
if (model1)
{
model1->setMaterialTexture(0, driver->getTexture("wart_2_working2.bmp"));
model1->setPosition(core::vector3df(100,40,-80));
model1->setScale(core::vector3df(1,1,1));
model1->setFrameLoop(1,31);
model1->setAnimationSpeed(15);
// model1->setMD2Animation(scene::EMAT_SALUTE);
// model1->setMaterialFlag(video::EMF_LIGHTING, false);
// model1->setMaterialType(video::EMT_SPHERE_MAP);
model1->addShadowVolumeSceneNode();
Ideas..??
Project Admin -
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
Hi,
Yep, it's the same problem i've with my mesh. the first frame is screwed up, but if you read my previous post, you'll see the solution ! :
get total numbers of frames with getFrameCount (ex : 12000)
divide the getFrameCount by the effective number of frames of your animation (ex : 12000/300 = 40)
multiply this factor (40) by the number of the frame you want to display (in your example : 40*1 and 40*31) and you'll get :
That's all...
Yep, it's the same problem i've with my mesh. the first frame is screwed up, but if you read my previous post, you'll see the solution ! :
get total numbers of frames with getFrameCount (ex : 12000)
divide the getFrameCount by the effective number of frames of your animation (ex : 12000/300 = 40)
multiply this factor (40) by the number of the frame you want to display (in your example : 40*1 and 40*31) and you'll get :
Code: Select all
model1->setFrameLoop(40,1240);
-
- Posts: 29
- Joined: Fri Sep 19, 2003 8:36 am
-
- Posts: 64
- Joined: Mon Sep 08, 2003 8:21 am
- Location: Paris, France
Here you can find a ninja and a zombie :
http://www.insanesoftware.de/index.php? ... ources.php
http://www.insanesoftware.de/index.php? ... ources.php