Jump to content
⚠ Known Issue: Media on User Profiles ×

importing a kf


Nadimos

Recommended Posts

Hi!

 

I dont know if it helps at all, but when i import animation into blender my animation is rotated 90 degres to the left, but then when i relink the animation datablock, if i imported it from other blend file or if i imported different animation and then wanted to go back to previous one while using them to help weightpainting, the animation will be facing straight forward on y axis.

 

Maybe the differences between the freshly imported and relinked action can be compared to better understand what is going on.

Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Hi!

 

In action editor there is a little dropdown box that you can use to add new action or browse existing choices.

 

When you import animation it will have the action listed in this box and if you click the x button next to it it will unlink the action from the armature.

 

then the armature will return to the bind position, and you can delete it and import another animation, but when you do that there will be now 2 existing choices in the action editor list.

 

You can also duplicate the action to make more available choices, it might be useful for comparing 2 variations of your animation to decide what looks good also.

 

These are saved in the blend file as datablocks and like other datablocks such as geometry or material, they can be imported into a different blend file with file > append or link (shift f1)

 

it is a nice design feature of blender :)

 

Anyway if u do that u will see what i mean about the rotation of freshly imported animation vs relinked action.

Link to comment
Share on other sites

it is a nice design feature of blender :)

 

Anyway if u do that u will see what i mean about the rotation of freshly imported animation vs relinked action.

 

Really a nice feature. Could never make make much sense out of it, because nif import does not support it very well (everything is "DefaultAction"). It is also not possible to import another (kf) animation, because this can only be done via a new skeleton, and so I would have 2.

 

I can however import it from another blend file, and then it is ok (like in the other blend file). Which is not surprising to me, since the problem(s) we are discussing is not in Blender, but pure Nif import/export. Or did I miss your point?

Link to comment
Share on other sites

Maybe i am not understanding what is the rotation issue that you are talking about since I have not done any animation work yet.

I have one project tho that i will be making animations for and this thread will be a valuable resource for me then.

 

Anyway i do use animations tho when weightpainting cause it lets me see the changes i make to clothing deformation during whatever animation i want.

 

I have been able to import multiple kf files into my blend by importing from other blend files or by importing additional skeletons.

I do not have more than one skeleton at a time because i delete the old one before importing a new one.

If you delete the skeleton without unlinking the action it will apply the deformation to the mesh so you must unlink the action before deleting the skeleton.

 

My observation tho is that when i import say, mtfastforward.kf it will appear in the 3d window with everything rotated x-90, so if i am using a walking animation the character appears to move sideways along th y axis while doing the running animation.

But then say i need another one so i unlink the animation from the armature, delete the skeleton then import a new skeleton.nif with sneakmtforward.kf.

It will display the sneaking animation and rotated x-90 like the other one was, but then if i need the original running one again i can select it in the action eitor.

 

But after switching from sneakmtforward to mtfastforward I will see in the 3d window my character facing forward on the y axis and appearing to run forward properly.

You just said that the problem is not in blender but i have observed this discrepancy within blender.

I am suggesting that maybe it would be helpful to open one instance of blender with a freshly imported animation, and another one that has had the animation relinked to compare the differences in the 2.

Link to comment
Share on other sites

Baduk, I thought you are the hero (probably you are, but not (yet) for that one) :wink:

Yes, I was able to reproduce this in-Blender anim rotation. Apparently you need to switch between Pose and Object mode, and all of the sudden these re-attached anims get a -90° z-rot on Bip01. Exactly what you need to make it walk into the desired direction (in-Blender). Although -90° is not what you have in the .kf file (which is 0°).

 

Is this the solution? Unfortunately not, because Nif export ignores this change and still generates a 90° z-Rot in Bip01. Too bad.

 

(@facole and othe readers of "Avoiding Blender animation pitfalls")

Right now I'm confused about what is really necessary to fix the 90° problem in Nifskope. Definitely you have to:

  • change Bip01 (Euler) R to 0 (if it was exported with 90)
  • change Bip01 NonAccum (Euler) R to <value>, if the imported kf file has a rotation <value> UNEQUAL to 0

I'm not sure, if it is really necessary to

  • change Bip01 NonAccum to 90, if the imported kf file has a rotation <value> EQUAL to 0

I know I had a case were it seemed necessary, and made it a habit. But I cant tell any more, and for all files I tested today it was unnecessary (although it did not hurt). So I probably will change the wiki in that respect.

Link to comment
Share on other sites

facole, you are very analytical and systematic. Your findings like "Bip01 axes have to line up with global axes" and "model has to face left side in top view mode (NumPad7)" might be very valuable in reaching the best possible approach.

 

For creating new animation (most likely poses) you might be right already. I have hardly any experience there. But for your existing animation procedures I'm in doubt:

- why should one ALWAYS rotate before and after animation changes? Left and right are moving correctly in Blender, so after a 90° rot these anims would move to the side.

- why should I change z-rot for non-moving anims before and after pose changes?

- haven't you experienced additional problems due to (unecessary) Bip01 changes?

- what are you doing with anims that have a tilt (like Idles or h2h attackleft). When do you change to the original tilt?

- why do you think it is easier when you save 1 change in NifSkope, but have to do 2 more steps in Blender?

 

I can't "prove" that my method is superior, because I didn't evaluate as systematic as you are doing. It was simply the easiest way I found so far, and I am not yet convinced I should change it. :wink:

 

You asked:

"- why should I change z-rot for non-moving anims before and after pose changes?"

 

You are quite right. Non-moving (location-wise) animations would not require any Bip01 adjustments. I guess I was too focused on the moving animations. Thanks.

 

 

You asked:

"- haven't you experienced additional problems due to (unecessary) Bip01 changes?"

 

No, I was just trying to determine a method of importing/modifying/exporting moving animations that was reliable. There are no additional problems due to the Bip01 change because the procedure undoes that change at the end. That temporary change is just to facilitate making the modifications.

 

I might have been trying so hard to make sure my details were correct that I forgot to mention that that was the reason I created that procedure.

 

 

You asked:

"why should one ALWAYS rotate before and after animation changes? Left and right are moving correctly in Blender, so after a 90° rot these anims would move to the side."

 

You didn't mention which direction your imports are facing but you indicate your imports are moving in the correct directions. My imports always face the left (top view) and always move -90 degrees (rotated on the Z axis) to the direction they should be moving with respect to the direction the model is facing (the import bug). I can't account for why your imports would be different. Maybe there's something different in the way that you import. That's why I'm asking for comments - so I can learn from other's experience. I'm still quite new to all this so please don't take my statements the wrong way.

 

In my experience, an imported, forward moving animation is facing left (in top view) and moves the model to its right (or upward in top view). A right animation moves the model backward (to the right in top view), a backwards animation moves the model to its left (downward in top view) and a left animation moves the model forward (left in top view).

 

Therefore, my procedure rotates the Bip01 bone in Edit mode to correct the direction of movement before modifying the animation. Then, after modifying the animation, it restores the original Bip01 orientation before exporting. This is simply to make the modification of the animation easier.

 

For example, a forward animation should have the model moving in the direction that the model is facing. However, an imported forward animation has the model facing left (in top view) but the direction of movement is to the model's right (up in top view). While not impossible, it would be hard to modify the leg motions without being able to see the forward movement as the feet get planted on the ground.

 

Now, it would be even more difficult to modify an animation that moved sideways (right or left) without being able to see the leg motions and model movement. An imported left moving animation has the model facing left and moving left as if it were going forward. Import the sneakfastleft.kf and look at the movement of the feet in top view - they look like they're sliding as if the model is ice skating. Now look at the feet movement in front view (NumPad1) and they don't appear to move much at all.

 

If you rotate the Bip01 bone as I described, the motion is in sync with the movement and modifications are much easier. If you're only making cosmetic changes, however, you may not need to make the Bip01 adjustments at all. That procedure is probably only needed for significant changes.

Edited by facole
Link to comment
Share on other sites

Sure, facole, I'm talking about import/export, and I have those animation modders in mind, which make "cosmetic" changes, like you call it. People making "significant" changes work with MoCap data (Umpa admittedly does, Beni and Seph I'm pretty sure do as well) and/or they don't use Blender (mur_zik).

 

I don't want to destroy your idealism, but I have not yet seen any good Oblivion anims done with Blender only. But maybe you are the man :thumbsup:

 

So if you want to go that way, you are certainly right to do as you described.

Link to comment
Share on other sites

it is a nice design feature of blender :)

 

Anyway if u do that u will see what i mean about the rotation of freshly imported animation vs relinked action.

 

Really a nice feature. Could never make make much sense out of it, because nif import does not support it very well (everything is "DefaultAction"). It is also not possible to import another (kf) animation, because this can only be done via a new skeleton, and so I would have 2.

 

I can however import it from another blend file, and then it is ok (like in the other blend file).

 

fore, could you explain what you mean by import from another blend file? I was looking for another way to combine two animations together. I've read only a little of the NLA linking that baduk is talking about and I was hoping for something simpler.

 

I have found one way to combine two animations but it involves importing the animations and copying poses from one skeleton to the other. Then you have to be careful how you delete the copied animation to make sure you first delete all the keyframes before deleting the skeleton.

Edited by facole
Link to comment
Share on other sites

Sure, facole, I'm talking about import/export, and I have those animation modders in mind, which make "cosmetic" changes, like you call it. People making "significant" changes work with MoCap data (Umpa admittedly does, Beni and Seph I'm pretty sure do as well) and/or they don't use Blender (mur_zik).

 

I don't want to destroy your idealism, but I have not yet seen any good Oblivion anims done with Blender only. But maybe you are the man :thumbsup:

 

So if you want to go that way, you are certainly right to do as you described.

 

No, I understand what you're saying. I have 3dsmax but have the 2010 version which doesn't seem to be supported by the Civ4 exporter. I would like to find a method of exporting animations from 3dsmax without using the Civ4 exporter. If you know where I could find some help it would be appreciated.

 

I have lots of MoCap files but don't have the knowledge yet to use them. I'm sure the data has to be converted to match the Oblivion skeleton bone names and there are skeleton bones that don't exist in the BVH bone data - I don't know if that is a problem or not. I'd really like to find out how to convert and use them.

 

You mentioned some names. I tried to contact Seph because he specifically mentioned using a BVH file in one of his tutorials but haven't gotten a reply yet.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...