B Tutorial Animation How to add New Animations to your module.

Users who are viewing this thread

:oops: :oops: :oops: I still don't get it! Forgivness!

If tho original SMD exportes export a rigged mesh (which includes a skeleton, right?) that can be imported as a skeleton in OpenBrf
(just use the import skeleton command). Am I wrong?

Same with animation: if it exports a SMD animation (with a skeleton, how else?) and you import it in openbrf as an animation, OpenBrf ignores the mesh and takes the animation alone. If you import the SMD animation as a skeleton, it takes the skeleton and thorws away the rest.



Beside, if the other scripts exportes SMD files that OpenBRF does not understand, I would be interested in seeing it.


 
mtarini said:
:oops: :oops: :oops: I still don't get it! Forgivness!

If tho original SMD exportes export a rigged mesh (which includes a skeleton, right?) that can be imported as a skeleton in OpenBrf
(just use the import skeleton command). Am I wrong?

Same with animation: if it exports a SMD animation (with a skeleton, how else?) and you import it in openbrf as an animation, OpenBrf ignores the mesh and takes the animation alone. If you import the SMD animation as a skeleton, it takes the skeleton and thorws away the rest.



Beside, if the other scripts exportes SMD files that OpenBRF does not understand, I would be interested in seeing it.

Well, the thing with the old script (known in this forum as Hellequin's SMD script - he modified someone's script so that it'd work properly) is that it doesn't export all the animation info (if you look in the SMD file using a text editor all the time information isn't included). As for skeletons, I guess I had made a wrong assumption that I had to export the skeleton without a mesh before openBRF can import it. So I guess the script can export skeletons (along with the mesh), I just haven't actually tried importing the skeletons outputted from this script into openBRF yet.

As for the script which can export animations, here it is: http://dl.dvondrake.com/smd_export.py
 
:oops: Oops, I think I misunderstood you. If it's the SMD outputs you want to have a look at, here they are:
http://amade-wossname.com/tmp/mnb/newscripts_SMD_exporter_output.zip

Explanation of the problem quoted from the openBRF thread:
amade said:
I'm currently testing a new export script which supports exporting animation sequences but there's a problem with the script where it adds a dummy bone into the SMD (for HL2, I think). BRFedit imports them fine and removes the dummy bone when I import it, but if I try importing using openBRF it simply crashes with the default Windows error: openBRF.exe has encountered a problem and needs to close yadda yadda - the despised, generic, not very detailed error message.

edit: here are the SMD outputs of the script if you want to have a look at 'em:
http://amade-wossname.com/tmp/mnb/newscripts_SMD_exporter_output.zip
There were 2 versions of the script. The older one (ver1.0) adds the dummy bone into the SMD. The newer version (v1.03), requires me to add the bone (a new armature) in Blender myself or else it'd not export properly (weird and weirder!). The output of both versions are very similar if you open it with a text editor, both versions crash openBRF. I tried having a look into the .py exporter script but it's way beyond me to determine which part forces the script to ask/add the dummy bone into the SMD. Extra note: If I import these SMDs into BRFedit and export it back out again, openBRF will be able to read them. But this renders the whole exercise pointless since BRFedit can't import/export animation sequence.

This was back with ver 0.0.9 or 11
 
hey,

the script was first intended only for my personal usage, as i was too lazy to look after available smd scripts (theres no standard script for smds in blender).  :wink:

but i thought, it could be useful for other people too, so i released it, no offense against your smd import/export.

@begebies: if you don't want to spend so much time on trying out, what is a good roll value, select your armature, press tab, select all bones (press "a") and then press "Ctrl-N", "1" or goto Armature->Bone Roll->Clear Roll.

that should align the bones for you.

eierkopf
 
eierkopf said:
hey,

the script was first intended only for my personal usage, as i was too lazy to look after available smd scripts (theres no standard script for smds in blender).  :wink:

but i thought, it could be useful for other people too, so i released it, no offense against your smd import/export.

Nah, don't worry about it! I'm glad you released your script as it works very well ;')

Though I'd still like to see a working SMD exporter script someday, it might still be needed or something... so hopefully mtarini can shed some light on why openBRF won't accept it. I've managed to contact the guy who (re)worked the SMD exporter script but since he doesn't do M&B modding there wasn't much he could do about it.
 
Eh, I don't want to butt in here,  but I'm having trouble with a customised (not fully custom) animation, and wondered if anyone could help.  It won't be too complex a problem to people who are more familiar with animation than I am, but it is quite long. 

I am trying to change the stand_lady anim into the "dance" anim - then altering the dance anim so that it in some way resembles a human dancing.  :grin:

So, the unchanged dance anim is this:

["dance", 0,
  [20.0, "anim_human", 0, 387, arf_blend_in_5],
#  [10.0, "anim_human_temp", 0, 10, arf_blend_in_5],
],
["pose_1", 0,
  [3.0, "poses", 0, 0, arf_cyclic],
],
["pose_2", 0,
  [3.0, "poses", 2, 2, arf_cyclic],
],
["pose_3", 0,
  [3.0, "poses", 4, 4, arf_cyclic],
],
["pose_4", 0,
  [3.0, "poses", 6, 6, arf_cyclic],
],
["pose_5", 0,
  [3.0, "poses", 8, 8, arf_cyclic],
],

Am I right in thinking that the part highlighted in red means that the five anims below will be played when the "dance" anim is called, and that the "arf_cyclic" means this will repeat forever?  I suppose what I'm really asking for is a basic guide to animations, but leave that aside for now.

My altered dance animation is this:

["dance", 0,
  [2.5, "anim_human", 0, 387, arf_blend_in_5],
#  [10.0, "anim_human_temp", 0, 10, arf_blend_in_5],
],
["pose_1", 0,
  [0.5, "strikes", 0, 0, arf_cyclic],
],
["pose_2", 0,
  [0.5, "strikes", 2, 2, arf_cyclic],
],
["pose_3", 0,
  [0.5, "strikes", 4, 4, arf_cyclic],
],
["pose_4", 0,
  [0.5, "strikes", 6, 6, arf_cyclic],
],
["pose_5", 0,
  [0.5, "man_cheer", 8, 8, arf_cyclic],
],

I have tried this using the default values of the copied "strikes" anims, but the end result is the same - not much.

Then I changed this:

Code:
 ["stand_lady", 0,
   [29.0, "lady_stand", 0, 863, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],

to this:

Code:
 ["stand_lady", 0,
 [color=red]  [2.5, "anim_human", 0, 387, arf_blend_in_5],[/color]

This definitely alters the stand-lady anim in the mod, but merely makes them very slowly jump and hover with their arms outstretched, as if they were about to do a move from Crouching Tiger Hidden Dragon.  Not exactly the effect I want.

Can anybody help?  I need my dancing girls.  They are very dear to my heart.

 
hey,

first the dance animation is not used in game, mainly because it only shows some animations like stand, jump after each other. As you look at the jump-animation for example, it has a duration of 1.09, the stand animation a duration of 3, so they have totally different running times. When you try to view all with one duration time, they will be shown in a constant time, so you have to take the lowest duration of all sequences, which is 0.3 (jump_end). that looks not like dancing  :lol:

as well, i think the arf_blend_in_5-command blends in the fifth animation from the top, which is the first in "stand_man", but i'm not sure of this.

a more comfortable way to edit the animation of the ladies is open the "module_scripts.py", goto "init_town_agent" and there change the animation after the loop between the kingdom_ladies_begin and kingdom_ladies_end.

why did you change the dance- and poseanimations? they won't be used, as long the animation for the ladies points to "stand_lady".

hope it clears something for you.

eierkopf

 
eierkopf said:
a more comfortable way to edit the animation of the ladies is open the "module_scripts.py", goto "init_town_agent" and there change the animation after the loop between the kingdom_ladies_begin and kingdom_ladies_end.

That's excellent, eierkopf, I knew there had to be an easier way.  And I will have my dancing girls!

eierkopf said:
why did you change the dance- and poseanimations? they won't be used, as long the animation for the ladies points to "stand_lady".

I'm basically clueless with animations.  All I've ever done is transpose one to take the place of another.  To get dancing working right I'm going to have to hunt down the tutorial again, and re-learn what all the values actually mean.  Thanks for your help.
 
I know I'm lazy... Haven't tried making animations, haven't read the tutorial, but is it possible to add kicking and crouching?

If that's possible...  :twisted: ... I'm gonna destroy my dreams of becoming a physicist and become a REAL samurai in MnB!
 
I think that Warband comes with good news regarding Animations. Looking in the CommonRes folder of Warband, I see stuff like this.

ani_crouch_down

ani_horse_mounted
ani_human_mounted
ani_lancer

ani_low_walk

ani_lady_stand
ani_stand_guardsman
ani_stand_shopkeeper
uni_lord_stand

Maybe, with the new ModuleSystem of Warband, we can make custom run/stand animations? Maybe...
cdvader
 
I am having a bit of trouble importing the skeleton into Blender.

I run the SMD script, however, nothing appears to happen. On the blender console thing, I can see that the script is actually working, however, i do not see any mesh or skeleton in the 3d window (its not on other layers, i checked).

Could the SMD importer script possibly be out of date, and does it work with blender version 2.49?
 
Yoman Jenkins said:
I am having a bit of trouble importing the skeleton into Blender.

I run the SMD script, however, nothing appears to happen. On the blender console thing, I can see that the script is actually working, however, i do not see any mesh or skeleton in the 3d window (its not on other layers, i checked).

Could the SMD importer script possibly be out of date, and does it work with blender version 2.49?

The script works with 2.49, the only thing the SMD importer script can't import are animations.
The script you're using is the one linked in the first post, correct? Where was the SMD sourced from?
 
Well, I've just tried importing the skeleton myself and it works fine. What did the console say? Did it mention any error or was it a "normal/working" output? If you had chosen Static Mesh with Textures during import you'd surely get an error mentioning about missing textures. This can be fixed but for skeletons it isn't necessary so you should just choose the option without textures.
 
I tried again, with no results. The console only says this:

Code:
SMD Import 0.1
Done Parseing
0.178361 seconds

It does not mention any errors. And when i run the script, and select a file to import,
i get no box, or whatever, saying if i want "static mesh with textures," like you mentioned. 
 
The console output should show more than that... And it doesn't appear to be the same import script as the one I'm using. The top line should say
Code:
Half-Life 2 SMD Importer (v0.1b)
And afterwards several lines parsing stuff and some bones, vertices, face count, etc...

The script is made by JMD, if you have a variation of that script then I'm not sure if yours is a working variation.
Otherwise it might be your SMD... have you tried importing SMDs from other sources e.g. rigged mesh exported from either openBRF or BRFedit?

But I'm almost certain that the script you're using is not working properly. I've checked the script from the download link and it appears to be the same one as the one I'm using... You sure you are using the right script? Perhaps your Blender came bundled with another SMD importer script. JMD's script is listed as "Half-Life 2 (.SMD)..." in the import menu. I recall once having another SMD importer script which didn't work and it was listed as plain SMD or something to that effect. So if you already have another script installed you should be able to find 2 different SMD import options in your menu.
 
Back
Top Bottom