Jump to content

Animated Nifs


Evilrunner

Recommended Posts

Posted

I posted some stuff in the maternity clothes thread about animated nifs and have finally got around to doing a tutorial :)

 

I'd actually managed to get this working a few months back, but not really knowing much about shape keys, never really got far enough to do anything major.

 

*Note* This guide is for Blender 2.49. Much of the shape key system has changed with the latest 2.6x releases, the version I am most familiar with, so much of this is based around trial and error on my part. This guide assumes you are familiar with basic blender usage, and mesh altering. It assumes no experience with animation.

 

============

Shapekeys

============

 

Shapekeys (sometimes called morphs) basically store different shapes of a single mesh. A single shape key consists of the base mesh shape, and a second shape and allows blender to smoothly transition between and and the other (similar to Skyrims weight system)

 

To add a Shapekey, enter edit mode on the mesh and go to the Editing tab, and select the shapes tab on the far right of the button.

 

 

Clicking 'Add shape key' will add a single key, that acts as the base mesh shape.

 

 

After this point, you are able to add addition shape keys that allow you to deform the mesh3.

 

 

With this shape key selected, you can enter edit mode and make your changes to the mesh. Once you are happy, you can go into object mode, and drag the slider between 1 and 0 to change the mesh.

 

 

 

Once done you can add addition shape keys to do any other changes to want. In this version, I'd recommend ensuring all shape keys are set to 0 before adding a new one, otherwise it uses the active shape key meshes as the 0 shape.

 

If you want to use a particular shape key as the base for a new one, have it active when creating the next shape key, but be aware that having both active will add the results (two shape keys moving a vertex 1 unit in the +ve x will result in a movement of 2 in the +ve x)

 

 

 

 

 

============

Animation

============

Once you have your shape keys set up, the next step is to keyframe an animation. I like to do this in the animation view (ctrl + left arrow key) with the right window set to 'action editor', 'shapekey editor'.

 

A keyframe defines the start and end of a smooth transition. The mesh will start in the position it is in in the first keyframe, and then move to match the position defined by the second keyframe.

 

Each diamond is a keyframe, yellow if selected, white if not. They can be deleted by right clicking to select (a selects/deselects all as usual, and b is box select) and hitting delete. The green line is the current frame and can be clicked to another frame (as well as manually changing the frame number on the timeline or Panels header, highlighted)

 

 

The first step is to keyframe the 1st frame. Clicking the arrow next to sliders shows the slider values at that frame. With the first frame selected, I usually just drag the slider to 0 to ensure the keyframe is set (a diamond should be on frame 1 if it is).

 

 

From there it is a case of changing to each frame you want to define and adjusting the sliders to the value you want. A keyframe is added to a particular shape key whenever you alter the slider.

 

 

 

 

In the image series above, the finished animation has the belly grow to full size starting at frame 1 and finishing at frame 60 (about 2 seconds?) The ass remains at size 0 until frame 30, then grows to full by frame 60. By varying values at key frames, you can adjust the speed things happen and when they happen.

 

Pressing Alt+ A will play the animation in the blender window.

 

============

Export

============

 

Once the animation is complete, export as normal, however select 'Export Geometry + Animation (.nif)' before export.

 

Once in nifskope, the animation is controlled by the NiGeomMorpherController. Under the value column next to the NiGeomMorpherController is a small icon of a flag, clicking this allows you to easily set the flags for the nif.

 

The flags contain options Clamp, Cycle and Reverse. Setting it to cycle will loop the animation.

 

============

Conclusion

============

 

That should hopefully be everything you need to get an animated mesh into fallout. This should also work with Oblivion, and possibly Skyrim. If I've missed anything, anything is unclear, or I've done something horribly wrong,let me know and I'll get it added/fixed.

Guest user29
Posted

excellent, I'll try this and when I mess something up I'll be back with questions :P

Guest user29
Posted

Ok I think i got close but could you tell me where I went wrong?

 

Basically I'm going for a kick. It's suppose to go out and then come back in again. I think the problem is in animating the key frames.

Posted

Your key 2 seems to do nothing, so you should probably delete that.

 

For your animation, both keyframes on Key 1 are set to 0 on the slider. For an out then in, you'd need a keyframe with the slider at 0 at the start, one with the slider at 1 half way through, and a final one at 0 at the end.

 

I'd say something like set to 1 at frame 15, back to 0 by frame 30.

 

See images 11,12 and 13

Guest user29
Posted

key2 was suppose to act sort of like a reset.

 

edit: aaahhhh I see.

 

edit2: yap, that did it exactly. I didn't quite understand the purpose of setting things between 0 and 1 until just now.

Guest user29
Posted

where exactly is the flag to set it to loop? I've found NiGeomMorpherController but there are a lot of settings and subheadings.

Posted

Just select the NiGeomMorpherController, should be in the details at the bottom, 2nd item I think. Click the picture of a flag. I think clamp runs once, cycle loops and reverse runs it backwards (once?)

 

Or just the flag next to NiGeomMorpherController will do :)

Guest user29
Posted

this is what I'm seeing. It's animating correctly in nifskope though so it's looking good.

Guest user29
Posted

sorry right, you can't read my mind. I want to set it to loop. And how do you know it's set to clamp right now? I don't see where it says that.

Posted

Ok, in the image you posted, on the line you have highlighted under 'Value' there is a picture of a flag. Click it, and it opens the flag menu. Select Cycle from the drop down to loop.

 

The alternate way to set flags is under Block details, under Name:Flags, Type:Flags, Picture of flag (click it)

Guest user29
Posted

worked great. The only thing I would add to your tutorial is a little note that mentions actually clicking on the flag. I haven't ever had to do that previously. Thanks a ton.

  • 4 weeks later...
Guest user29
Posted

Is there any way to import an animated nif into blender and have it keep the shape key timings?

Guest Donkey
Posted

Is there any way to import an animated nif into blender and have it keep the shape key timings?

 

Short answer is no. When i was still animating a month ago. I fully tried this part, but never got this working. So i take it, once you create it with nifscope some part is lost when importing it back in blender.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...