• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Need help with animation created Blender

The_Coyote

Emperor
Joined
Mar 1, 2008
Messages
1,367
Location
Europe
ok, tried to generate an animation in Blender (yes to a certain degree it works), so far it seems to work good, but now there are some problems which i want to be solved before going on.

The animation was created in Blender and exported using the oblivion option in the scripts. Blender version 2.46 and latest nifscipts. Because i was not able to get the oblivion kf to run i manuel copied the NiTransformData in a befor created master kf file, changed the values (start end time, set eventcode) and created a kfm using the kfm editor.

Idle (nothing) and run worked like they should so i tried to complete the animation (now almost all minimum needed kfs are done, beside fading in and out, die fade out and heal) and tested it in game. Beside of HurtA all parts are working, but i don´t get the hurt animation to work (tried also removing all NiTransformData and added only a explosion), when fighting only the strike sequenz is played, followed by the death of one unit. At the moment i have no idea what i could try else to solve the problem.

Another problem, altought i used the frames number given in the flow charts, my animation length differ from the standard one (eg. strike: my = 0.8, standard = 0.7). IIRC Blender uses 25 frames per second, changing this number affect the time. No idea if this could cause problems (i think yes, because some sequences can only have an exact number of frames, but is this the truth).

So any help is appreciated (also what can be done to make the animation better, eg atm the fortify animation works but the movement is too small to be visible in game)

Attached are all files, the blend for the animation, the exported oblivion kf and the latest generated civ kfs (Edit: outdated and removed)

thanks in advance
 
I did not tried all of them but with most sequences a slight deviation in length does not cause obvious problems.
It won't crash or break something important.

The missing hurt anim might be a side effect however - a new anim can not be triggered before the current one is finished, so if your strike is too long, it might prevent hurt from playing (This is only a educated guess).
Another possibility might be a wrong event code. There are different sets of event codes for ranged and close combat Strike and Hurt iirc.

Can't you cahnge the framerate Blender uses ? Civ4 times are based on 30 fps.
If you can't avoid it, making the anim a wee too short might be better than too long (see above).

You can skip heal - it's never used (I checked the XML). I do also skip Fade In / Fade out most of the time - i think these are not used either (here i did not check tho, so not sure).
Die_fade is indeed used on death. It animates the materials opacity (Alpha) value (Not Visibility) to make stuff go away.
 
thanks :)

i can adjust the framerate, so 30 fps should be possible, will be my next try and while doing this i will also add a DieFade, for hurt i used 1023 (should be RangedHurt - use the tank flowchart as master) as eventcode and copied a hurt entry from another tank kfm to get the kfm with the KFMEditor. Now i hope adjusting the framerate will fix the hurt animation, if not, i will need a new idea
 
your guessing was right, finally had the time to test it, changing the framerate did the job (new time = 0.6667), now hurt is played. :) Thanks again Refar!

Now i have a shortly disappering units, but i think the reason is that i didn´t exchanged all kf with a 30 fps version (only strike, hurt, fortify).

Edit 17.09.:
Changing all files to 30 fps did not solve the short disapperaring of the unit, happens especially often after a fight is won (if this helps), the other unit dies and the victorious attacker disappears, no idea what causes this error. I´m almost sure that there is no typo from my side but if there is one i´m not able to see him atm.

Beside of this the animation worked fine. Because of this i decided to beta release the unit, hopeful somebody can help figuring out what causes this error.
 
I've had this error before when I've done a bad material export, so what I do to fix it is - remove all the material/texture properties in scene viewer and then reapply them from scratch. It may work just by remaking the texure in max/blender and re-exporting it as well.
 
thanks a lot, i had never thought that this could cause the problem, will try asap i have time (after the weekend), it also seems that the used flags for the bones are important if an animation is played or not.
 
Are you using the KFM from a mechanical unit ? If so the misreferenced (missed) damage states might cause this disapperaoing thingy... I think there is a XML tag in the art deine to disable Damage States... Maybe it will help.
 
unfortunally my sucess is still limited, changed the flags of nodes, now the animation sequences is played correct but there are CTD (perhaps it is the run sequenz because i have the feeling it happens when a unit moves - turning to fight, moving, but it could be everything - it is guranteed that there will be a CTD but when is ?? - sometime after the fifth fight, sometime when moving for the first time - one time (of two with python exceptions activated) i had an exceptions (iirc selecting icon - unfortunally i did not write it down and my try to reproduce the exception crashed without exception) :undecide:

Also removed and added texture (made a fx version for the case that a skin partition is needed) and added damage states line to the xml and set the value to zero, but still the unit disappears for a short period of time. :(

Has somebody another idea, atm i have no clue what too could cause the problem.

Perhaps the problem was that i wanted to much and started with a new armature and so one, perhaps smaller steps (only changing one sequenz) and the method could work :dunno:

so what i did as beta tutorial:

I use Blender 2.46 and nifscripts 2.37. (with a version after 2.3 and blender 2.46 it was possible for me to import an armature and export them without getting distorted results in game).

I created an animation (after rigging to an armature, etc and using a Blender tutorial [GUS]) in Blender using the number of frames given in the flowcharts (using 30 fps like refar corrected me) and exported the animation using the oblivian setting of the exporter.

This kf files was not usable so i manually copied the entries of the bones to the corresponding bone of a civIV kf file of the same armature and sequenz (ok i created a new kf for this model but perhaps this causes my problems). The interesting values are the child of the modifiers. Last i set the end time in the kf and saved. (only as idea, because the start position of the nodes is not the same for every animation sequenz when only altering one (eg strike), setting the bones in the nif to the start position and importing this nif should work)

Additional because i created a new animation i also used the KFEditor to created a new kfm files (pointing to the new kf files), perhaps also a reason for the problems

hope this helps to understand the steps, a real tutorial was planed but i don´t want to invest the time as long i don´t know if the method works. Like i said, the animations itself are played correct but the units disappears shortly and now with the "correct" ( :confused: ) flags on the armature nodes i have CTD´s.

Attached are the latest bugged files (i´m almost sure there will be CTD - if not - please post your xml) if somebody will help to find the error.

edit: removed outdated beta
 
Did you try changing the textures/materials in blender or scene viewer?

In scene viewer try removing all of the material/texture properties, and reapplying them from scratch in scene viewer. I swear I've had the fading problem you're talking about before, and I fixed it by doing that.

There is a test you can do to see if it's the material or the animations though, because I could be wrong about yours. Maybe try using a different animation (even if it doesn't animate properly) and see if it starts to fade out after you wait, and move the vehicle around a bit.

I'm not sure about the CTD though, I'm not really an animation guy. :(
 
thanks again for your help Chuggi,

so far i only removed and added the texture not all properties (i saw my error yesterday evening shortly after posting :hammer2: ),

i will try it again, also i will try another animation (renaming my bones) with my nif and another nif with my animation (than i should know if it is a nif or an animation problem)

Edit: changed the nif with a standard one (renamed the armature nodes), the disappearing when victorious is still there, when fighting it was no longer visible. Still had CTD - the last not while moving a unit but as i tried to remove the units in the worldbuilder.
 
@ MOHAX

sorry i missed your post :blush: , i will freely make models, the next mech will be the warhammer, but sometimes i´m a bit distracted. If you look at the Marauder download thread it seems there was already a project to create, perhaps you could ask one of this group what was achieved so far. I really hope that someone will finish a BattleTech mod for Civ

@ all

it seems that the animation problem could be solved, the reasons seems to be the version missmatch with the exported oblivion kfs, amorilia just uploaded a new Nifscript for blender test version (thanks again) with activated Civ IV kf export function. With this script i reexported the animation and i had no longer dissappearing units, ctd etc. :)

so here is the new test version, already with gloss support, i hope that also other tester could confirm my result, i will not change the main upload of the unit when there could be still problems or end of the week ;)

Edit: Beta2 removed, final version released

Ciao
The_Coyote
 
I didn't find anything interesting in previous mods.

BTW, I have a lot of mechs models in max, 3ds, dfx formats - they just needed to ported and animated correctly... my ports are quite heavy 1-2MB since I'm not a 3d designer - have just basic skills.

If you want, I can share it :rolleyes:
 
one more btw :)

I'va created a project on a source forge. How do you see the idea to put your mechs (in max and ported nif formats) there? My and my friends sources and works will be there soon
 
@ MOHAX

sorry i missed your post :blush: , i will freely make models, the next mech will be the warhammer, but sometimes i´m a bit distracted. If you look at the Marauder download thread it seems there was already a project to create, perhaps you could ask one of this group what was achieved so far. I really hope that someone will finish a BattleTech mod for Civ

@ all

it seems that the animation problem could be solved, the reasons seems to be the version missmatch with the exported oblivion kfs, amorilia just uploaded a new Nifscript for blender test version (thanks again) with activated Civ IV kf export function. With this script i reexported the animation and i had no longer dissappearing units, ctd etc. :)



so here is the new test version, already with gloss support, i hope that also other tester could confirm my result, i will not change the main upload of the unit when there could be still problems or end of the week ;)

Ciao
The_Coyote

Nice ! I'll have a look when I'll find time. Meanwhile, feel free to write a tuto if you want :D
 
I didn't find anything interesting in previous mods.

BTW, I have a lot of mechs models in max, 3ds, dfx formats - they just needed to ported and animated correctly... my ports are quite heavy 1-2MB since I'm not a 3d designer - have just basic skills.

If you want, I can share it

one more btw :)

I'va created a project on a source forge. How do you see the idea to put your mechs (in max and ported nif formats) there? My and my friends sources and works will be there soon

Sorry i "can´t" help you with porting, the main fun for me is the creation of an object. I like to start from the reference and see how the creation develops. Thats the reason why i prefer to freely make models, if somebody has use for them even better. But perhaps i can use one of the models as master if i´m unable to find references.

Another problem could be, if they are like the one on the google page (not the Timberwolf), i thought that the models is great but could have to much polys for the game. Now if you say your ports are that big i fear it is the case (have you checked the number of polys in Nifviewer?). And if this the case it could be better to start with the model from scratch.

For the sourceforge page, i can´t offer you the max file - i use Blender, but if you like you can put the nifs there - after posting them here i consider them as "public available", so i see therein no problem
 
Back
Top Bottom