Difference between revisions of "Importing Animations from Blender"

imported>Breeze582000
imported>Doggieb
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Update}}
{{Tools|req0=[[Blender]]|req1=[[NIF_Importers_and_Exporters#Blender|Blender Nif Plugin]]|req2=[[NifSkope]]}}
== Introduction ==
== Introduction ==
[[Image:Breeze582000_Anim.jpg|thumb|right| Screenshot of altered spell casting animation.]]
Creating animations for Oblivion, so far, has only been possible for users of 3DS Max versions 6 to 8 (AFAIK). If you're like me and don't have access to these versions (and don't want to obtain copies from ~those~ places), then you're stuck with Blender, Milkshape, etc.
Creating animations for Oblivion, so far, has only been possible for users of 3DS Max versions 6 to 8 (AFAIK). If you're like me and don't have access to these versions (and don't want to obtain copies from ~those~ places), then you're stuck with Blender, Milkshape, etc.


Line 8: Line 12:
== Tools Needed ==
== Tools Needed ==
Before you start making animations for Oblivion, you need (at least) the following tools:
Before you start making animations for Oblivion, you need (at least) the following tools:
* [http://www.blender3d.org/cms/Home.2.0.html Blender]
*[[:NIF_Importers_and_Exporters#Blender|Blender and the scripts to import and export NIF files]]
* [http://www.niftools.org/wiki/index.php/NIF_File_Format_Library_and_Tools scripts] for importing and exporting .nif files to and from Blender
* the latest version of [[NifSkope]]
* the latest version of [http://www.niftools.org/wiki/index.php/NIF_File_Format_Library_and_Tools NifSkope]
* some talent :)
* some talent :)


Obviously it helps if you've read some tutorials on how to use these tools. Tutorials are available on the pages linked too above, as well as in the [http://cs.elderscrolls.com/constwiki/index.php/Category:Tutorials tutorials] section.
Obviously it helps if you've read some tutorials on how to use these tools. Tutorials are available on the pages linked too above, as well as in the [[:Category:Tutorials|tutorials]] section.


== Creating an Animation in Blender ==
== Creating an Animation in Blender ==
Line 49: Line 52:


=== Updating the Existing .kf File ===
=== Updating the Existing .kf File ===
{| width="30%" align="right" style="background:#aaffaa;"
|'''Controller vs Interpolator'''
A controller block is connected to a bone and controls the animation of this bone directly. A controller cannot exist in a file without a bone.
An interpolator, on the other hand, does not need to be directly connected to a bone. An interpolator indicates the bone it effects by specifying the name in a string block containing extra information.
|}
The castself.kf file has a NiControllerSequence block that contains controller sequences. A number of NiTransformInterpolator blocks attached to NiTransformData blocks are in this file (one per animated bone). The NiTransformData block contains the actual animation keys (and the exact same structure as NiKeyframeData blocks. We need to replace the existing Data block with the one containing the new animation.
The castself.kf file has a NiControllerSequence block that contains controller sequences. A number of NiTransformInterpolator blocks attached to NiTransformData blocks are in this file (one per animated bone). The NiTransformData block contains the actual animation keys (and the exact same structure as NiKeyframeData blocks. We need to replace the existing Data block with the one containing the new animation.


Line 60: Line 71:
* double click on the name of the NiKeyframeData and rename it to NiTransformData
* double click on the name of the NiKeyframeData and rename it to NiTransformData
* select the old NiTransformData block and delete it
* select the old NiTransformData block and delete it
{| width="30%" align="right" style="background:#aaffaa;"
|'''Importing Animations INTO Blender'''
You can import animations as well, AS LONG AS the animation is merged with the skeleton (i.e. the way it gets exported). So to import an animation into Blender, perform the reverse of what you did to export it. I.e. copy the data blocks from the .kf file into the .nif file and attach these to  controllers on the bones that animate and remember to rename the block correctly.
Tedious, but it works.
A better way to import an animation into blender is this:
At the import screen, select skeleton.nif as target. If you see the import options screen, look below. You will see a "load .kf" button. Select as .kf your .kf animation. Import
And you will have a skeleton + your animation as a action. Your animation is called Defaultaction. Faster and better then copy-paste all those data blocks.
|}


You now have a correctly set up .kf file. Save it. Ignore the "error message" about "unassigned parent link", it doesn't matter. You can use the attach .kf spell to see that the animation does work.  
You now have a correctly set up .kf file. Save it. Ignore the "error message" about "unassigned parent link", it doesn't matter. You can use the attach .kf spell to see that the animation does work.  
Line 79: Line 102:
[[User:Breeze582000|Breeze582000]] 06:42, 9 February 2007 (EST)
[[User:Breeze582000|Breeze582000]] 06:42, 9 February 2007 (EST)


[[Category:Tutorials]]
[[Category:Animation_Tutorials]]
Anonymous user