You are here

Animated Placeble - Video Guides (UPDATED FOR BLENDER)

5 posts / 0 new
Last post
Trinital
Animated Placeble - Video Guides (UPDATED FOR BLENDER)

FOR BLENDER:

Reference: (Formatted Nicely)

https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-Animated-Placeable

 

------------

In this tutorial we are going to take the banner of Tyr, which is a placeable included in NWN2, and make it animated using MDK and Blender.

Note: Similar instructions should be applicable to another computer graphics program like 3D Max or Maya. The key about MDK is that it works with FBX, so it allows interoperability with any application that supports FBX.

Step 1: Convert the MDB to FBX

  1. Extract PLC_MC_TyrBanner.MDB from Data\NWN2_Models.zip located at the NWN2 install directory.
  2. Drag and drop the MDB onto nw2fbx-dragdrop.cmd. This should give PLC_MC_TyrBanner.fbx and automatically extract the textures used by the models (PLC_MC_TyrBanner.dds and PLC_MC_TyrBanner_N.dds).

Step 2: Import the FBX into Blender

  1. Open Blender.
  2. Go to File > Import > FBX (.fbx)

blender_import_fbx.png

  1. For importing NWN2 models, the default import options should be fine.
  2. Navigate to the directory where PLC_MC_TyrBanner.fbx is located and double-click it.

Step 3: Make an armature

The animation of a NWN2 model is driven by a skeleton. The animation of this skeleton will animate the model. In fact we don't need to modify the MDB at all.

  1. Move the mouse cursor to the 3D view.

  2. Press SHIFT+A and go to Armature > Single Bone.

    blender_add_armature.png

    This should create an armature with a single bone. Note that the bone is pointing up along the Z axis (blue axis). We'll make use of this fact later.

    blender_single_bone.png

  3. Look at the Outliner area to see how the items we just created are named:

    blender_single_bone_outliner.png

    The object containing the armature is named Armature, the armature is named Armature too and the bone is named Bone. We must name the object and the bone same as the model we want to animate. The armature name doesn't matter but we rename it for consistency. When you rename the object same as the model, it will happen that ".001" is automatically appended to the name. That's because Blender doesn't allow two objects have the same name. Remove ".001" to set the name again and then it will be appended to the model name instead.

    blender_banner_armature_outliner.png

    It doesn't matter that the model name has changed because we aren't going to override the original MDB.

  4. In order to animate a placeable, we don't need to skin the model to the armature, we just need to parent the model to the bone. Select the model by right-clicking it, now right-click the armature while you press the SHIFT key so you add it to the selection, press CTRL+P and select Bone.

    blender_parent_bone.png

Step 4: Animate the armature

Now animate the armature as you wish. Note that you must animate the armature pose and not the object, that is, you must animate the armature in Pose Mode, inserting keyframes for the bone.

Step 5: Export the armature to FBX

  1. We must export the armature in rest position. Right-click the armature to select it, go to the armature tab of the properties area and click Rest Position.

    blender_banner_rest_position.png

  2. Go to File > Export > FBX (.fbx)

    blender_export_fbx.png

  3. Uncheck Add Leaf Bones in the Armatures tab of the export options.

    blender_export_fbx_armatures.png

  4. Do you remember that the bone was pointing up along the Z axis? We worked as if that orientation was zero rotation, this means that we worked as if the primary bone axis was the Z axis. So we must set Primary Bone Axis to Z axis in the Armatures tab.

  5. Navigate to the directory where you want to export, double-click the file you want to overwrite or type a file name and click Export FBX. In this tutorial, we use the file tutorial.fbx.

Step 6: Convert the armature to GR2

  1. Drag and drop tutorial.fbx onto fbx2nw-dragdrop.cmd. This should generate tutorial.skel.gr2.
  2. Rename tutorial.skel.gr2 to PLC_MC_TyrBanner.gr2.

Step 7: Export the animation to FBX

  1. Before exporting the animation, we must turn back the armature to pose position, otherwise the animation isn't exported. Right-click the armature to select it, go to the armature tab and click Pose Position.

    blender_banner_pose_position.png

  2. Go to File > Export > FBX (.fbx)

  3. In the Animation tab, check Baked Animation and uncheck the other options.

    blender_export_fbx_animation.png

  4. Navigate to the directory where you want to export, double-click the file you want to overwrite or type a file name and click Export FBX. In this tutorial, we use the file tutorial.fbx.

Step 8: Convert the animation to GR2

  1. Drag and drop tutorial.fbx onto fbx2nw-dragdrop.cmd. This should generate tutorial.skel.gr2 and tutorial.anim.gr2.
  2. Ignore the generated skeleton: a skeleton was generated because the FBX contains it, however, the skeleton will not be in rest position, so we must use the skeleton generated in step 6.
  3. Rename tutorial.anim.gr2 to PLC_MC_TyrBanner_idle.gr2.

Step 9: Edit placeables.2da

We have generated all the files we need, PLC_MC_TyrBanner.gr2 and PLC_MC_TyrBanner_idle.gr2, but now we must link the placeable with the skeleton. For that, you must edit the file placeables.2da and modify the line of the placeable as follows:

  1. Column PlaceableModelType: set to 2.
  2. Column NWN2_Skeleton: set to PLC_MC_TyrBanner.

Final words

Video showing final result: https://youtu.be/tB5HyjDmG0A

This tutorial explains the simplest case for animating a placeable. Future tutorials may explain:

  • Animate the collision mesh along the model.
  • Animate attached models.
  • Animated placeable with several states: idle, open, ...

 

FOR 3DS MAX

I was having trouble figuring out how to do animated placebles.. So after digging through the depths of my old RWS archive I found a nice stash of videos that Hellfire kept around (I think he has them still hosted?!)

I'm always paranoid that invaluable resources like this may disappear without a trace so with that..

 

I quickly threw them up in a playlist. For myself and others:

https://www.youtube.com/watch?v=MWE9AJEEC4Y&list=PLVACMHEK0HMdtgPq5G56ko...

 

 

Enjoy! And Feel Free To Post Questions..

 

 

  • up
    100%
  • down
    0%
Tarot Redhand

As you worry about resources being lost... Any chance you could also upload them here?

TR

  • up
    50%
  • down
    50%
Kalister68

This is really interesting...

Just a question : how do you import a placeable's animations in 3ds max ?

  • up
    50%
  • down
    50%
Trinital

As you worry about resources being lost... Any chance you could also upload them here?

I don't think the vault allows posting videos?

 

Just a question : how do you import a placeable's animations in 3ds max ?

 

You can't. Obsidian only provided us with expotron.. which allows exporting animations but we have no way to import .GR2 keyframing.. AFAIK. Which means if you wannt share animations - you need to send your .MAX file. sad

  • up
    50%
  • down
    50%
Tarot Redhand

You most certainly can. See these. Tutorials, in whatever format, are welcome on here. They have been since the start. There are old video tutorials on here that were hosted on the old ign vault as well as those new ones that TO has posted.

TR

  • up
    50%
  • down
    50%