3ds Max/Conversion

From NifTools
Jump to: navigation, search


This guide is describes a procedure used to convert Denethor’s dragon model from Maya to Max to Oblivion. The NifTools team does have a Maya exporter but it does not currently support animation while the Max exporter does so this procedure prefers Max to Maya for Nif manipulation to try and maintain consistency throughout the process.


Software used during this procedure was Maya 8 (30-day trial), 3ds Max 8, and NifSkope.


The NifTools Max Plug-in can be downloaded from http://www.niftools.org. Click on the Downloads link in the navigation pane to download the latest release from the sourceforge website.

The Alias/Autodesk FilmBox FBX format was used to convert information between the programs and so the converters were required. I used version 2006.2 for both packages. Maya 8 has this version already included but older packages would want to download the latest from the autodesk website.

I use selected features from the Civilization 4 NIF exporter currently as the NifTools Max exporter has not written similar dialogs (mainly because the Civ4 version work well enough). CivFanatics currently hosts the Plugins for Max 6 and 7 though it works for 8 as well: http://forums.civfanatics.com/showthread.php?t=159481

Exporting from Maya

First things first, load the model.

Niftools Max Plugins Maya Conversion 01.jpg

Denethor was kind enough to do all of the hard work. Modeling, texturing, rigging, and setting the constraints is already done and I’m not going to cover it as I’m not a Maya user.

Now that we have it loaded lets go to the Bind Pose rather than the animation pose. I’m not sure if it really matters but I prefer to have the model in a base position prior to doing anything with it. We will come back later to do just the animation but we want a good skeleton and body mesh first.

Bind Pose

This model already had constraints and on it so Maya wont go to the bind position readily. First we have to disable the constraints using the Modify | Evaluate Nodes | Ignore All menu. This allows us to go back the starting position when the model was originally rigged.

Niftools Max Plugins Maya Conversion 02.jpg

Now we need to select all of the bones so that we can use the Go to Bind Pose menu. This is done using the Edit | Select All by Type | Joints menu.

Niftools Max Plugins Maya Conversion 03.jpg

Now we can use the Skin | Go to Bind Pose menu to reset the model back to the starting position.

Niftools Max Plugins Maya Conversion 04.jpg

Niftools Max Plugins Maya Conversion 05.jpg

Exporting with FilmBox

Now that we have a good base pose let export with the FilmBox. This option is available from the File | Export All menu with .FBX as the selected file type.

Niftools Max Plugins Maya Conversion 06.jpg

I use Quaternion rotations over Euler just because they are slightly more stable. Euler rotations can encounter gimble lock when one or more of the axis are rotated at 90º to the other axes and Quaternions do not have that problem by default. The Constant Key Reducer will minimize the garbage in animations but we really aren’t interested in animations. Export constraints, Export character definition and Embed textures all led to some sort of failure when exporting so I leave those unchecked. Finally, Bake complex animation is normally a very required step if we wanted animation. I only have 1 frame of interest so might as well only export that one.

Importing into Max

File Import

Now that we have an FBX file its time to import it into Max. This is simply available from the File | Import menu with Alias (*.FBX) as the File Type. This requires the FilmBox plug-in for Max to be shown.

Niftools Max Plugins Maya Conversion 07.jpg

Animation is not interesting at this time so we don’t bother importing it. I’ve checked Add to new scene because it is necessary to add the model cleanly but Merge should also work. Later when importing animation the Exclusive Merge will be nice.

The Initial Result

Niftools Max Plugins Maya Conversion 08.jpg

Well that looks bad. The problem turns out to be that both Maya and Max allow for non-unique names in the bones structure but that the FilmBox and for that matter Nif formats what exclusive naming on the bones.

Denethor was kind enough to fix the model to have unique names. The problem seemed to arise out of copy and pasting one of the leg models.

Niftools Max Plugins Maya Conversion 09.jpg

We still seem to have some junk in the model. Probably an artifact from the original Maya file that FilmBox exported but its easy to fix. I’ve determined that most of the bones not rooted on root are junk and delete them. Basically, any Helpers that may have been created as a result of the IK animation controllers is removed as it does not seem to help anything.

Niftools Max Plugins Maya Conversion 10.jpg


I don’t have the original textures from Denethor so I just use the Flame Atronach flame textures cause it seems somewhat appropriate.

Material Editor

Open the Material Editor and select the primary material. It shows up as Phong so I change it to Civilization 4 and then browse for flame01.dds from my extracted Oblivion Textures directory.

Niftools Max Plugins Maya Conversion 11.jpg


Now I do a little repositioning so that the Dragon faces in the positive Y-Axis direction and the feet are approximately at floor level. Not sure if this is required but it feels like the right thing to do.

Renaming Root

After trial and error, I’ve learned that it seems to be a good idea to name the root of the model Bip01. Actually, it can be any number after Bip as the regular expression filter is Bip[0-1][0-1]. Bip02 might be a good idea if we ever want to ride the dragon like a horse as the main character is Bip01 and the two skeletons would collide if they had the same root.

Anyway, Root is now Bip01. This is important and perhaps should be done in Maya so that we don’t have to worry about the name of the root when importing animation as it’s typically matched by name.

Exporting Skeleton.NIF

First thing to export is the skeleton to make sure we have something to specify in the Construction Set (CS) later.

Niftools Max Plugins Maya Conversion 12.jpg

I typically hide all Geometry so that those nodes don’t accidentally appear in the final skeleton.

Niftools Max Plugins Maya Conversion 13.jpg

The important settings here are to check Skeleton Only, uncheck Flatten Hierarchy, check Add Accum Nodes, and make sure NIF w/o Animation is selected. I may change the export to enforce Flatten Hierarchy and NIF w/o Animation when Skeleton Only is checked but it is not that way currently.

  • Skeleton Only ensures only bones are exported and it throws in some extra stuff if you use the Bone LOD feature from the Civilization 4 exporter (not interested in that just yet though). For Oblivion, it will also add a BSBound property which is a quick and dirty bounding box for the mesh.
  • Flatten Hierarchy will mess up the skeleton if it’s checked. I usually use it for exporting body meshes and not skeletons.
  • Add Accum Nodes is check so that NonAccum node variants are added to the base node of the skeleton. This will be important later when exporting animation.
  • NIF w/o Animation is selected because we don’t want to accidentally generate a KF file when there is no animation to export.

Niftools Max Plugins Maya Conversion 14.jpg

Exporting Body.NIF

Now that we have a skeleton, lets reverse the process and export the body. If it were in multiple pieces we would do each piece individually but that is not the case currently.

Niftools Max Plugins Maya Conversion 15.jpg

I prefer to reverse the process when exporting geometry and hide everything but geometry.

Niftools Max Plugins Maya Conversion 16.jpg

We keep the same Animation and Miscellaneous setting from the skeleton, but we flip the Skeleton Only and Flatten Hierarchy check boxes. Also this time Skin Modifier and Sort Nodes are important.

  • Flatten Hierarchy basically flattens out the entire bone structures so that every node is a child of the Scene Root node. I think this is a slight performance related change.
  • Sort Nodes is required this time because Oblivion absolutely requires that NiTriStrips or NiTriShape objects be sorted before NiNodes in the Nif file and this option enforces that.
  • Skin Modifer is needed because of the mesh. We enable Multiple Partitions with 18 Bones per Partition as that seems to be the default options used by Oblivion. Also Multiple Partitions has been working better for me than the Single partition.

This step takes a while because the current Skin Partitioning and Triangle Strippers are rather slow. With smaller models this is not really noticeable at least on my machine but this model take about a minute to export.

Niftools Max Plugins Maya Conversion 17.jpg

Note that the NiTriStrips are sorted before the NiNodes. Again this is required to avoid crashes in the CS or Oblivion.

Quick Validation with TES:CS

So before going any further, lets check if the body.nif can be even loaded by the game. Its too early to create a creature since we need at least the idle.kf animation but we can create Furniture as a quick test.

Open the CS but do not load the Oblivion.ESM as there is no need for this test and its rather slow so why do it. Go to Furniture, Right-click New. Browse to the body.nif file and then OK. This will warning about missing Furniture Markers but that’s ok. Now Double-click on the new entry and we can see our lovely model so all is well for now.

Niftools Max Plugins Maya Conversion 18.jpg

Exporting the Animation

After exporting the base Skeleton.NIF and Body.NIF, its time to export the first animation. After reloading the original Maya file, I now just want to export everything as is. Open the FBX Export dialog. This time Export animation only and the entire duration of the animation which is 40 frames for test run.

Niftools Max Plugins Maya Conversion 19.jpg

Importing the Animation

Import FBX File

Now that we have the animation in an FBX file, let’s import it.

This time instead of starting from a blank simulation, I just reuse the same case I used for exporting the Bind Pose data.

This time I select different import options from the FBX Import dialog.

Niftools Max Plugins Maya Conversion 20.jpg

Exclusive Merge is desirable this time because we already have our skeleton in place. I can rename Bip01 to Root and back to make sure I get all of the animation from the root node if I like but it is not really that vital.

After importing, I try out the animation a little and it seems mostly ok. There is some problems with the Left Paw rotating weirdly but that can be dealt with later so I procede onward.

Setting up the Animation Manager

Now we need to setup at least one animation sequence to export. We will name this idle as at least one of the animations require this name as the basis for what our creature will do when it has nothing better to do. Oblivion has very strict requirements on what the names of the animations are called. This is not the name of the file but the name of the sequence.

Civilization 4 Workflow

Since I have the Civilization 4 Animation Manager installed I use it to quickly setup the animation sequence. What this does is writes a couple of keys in to the Notes Tracks area on the Actor Root which is then used when exporting to know how to export the animation.

Niftools Max Plugins Maya Conversion 21.jpg

Alternate Workflow

The Civ4 Animation manager is not required for this so lets look at an alternate workflow.

Open the Graph Editors | Track View – Dope Sheet… editor instead. Now go locate Bip01 in the tree view and select it.

Now add a Note Track. This information can also be found in the Max User guide if its not already familiar to you.

Niftools Max Plugins Maya Conversion 22.jpg

Now go into Add Key mode and add two keys on the Note track. One at Time 0 and one at Time 50. Right click on Time 0 and add "start –name idle -loop". Right click on Time 50 and add "end". Do not add a return after the name.

Niftools Max Plugins Maya Conversion 23.jpg

Exporting Animation

Now that we have our idle sequence defined, lets export it using the NifTools plugin. These are the important settings:

Niftools Max Plugins Maya Conversion 24.jpg

Single KF w/o NIF is selected because we do not have multiple sequences defined in our scene. If we did then Multiple KF would be better. I choose this also because Multiple KF will rename the KF files to have the Root node and sequence name in the file name and I don’t really need that feature for a single animation.

I use Skeleton Only just so speed things up. It does much less processing than when its enabled. Even though we are just exporting a single KF file.

Finally, I check Add Accum Nodes because it’s fundamental to get Oblivion animation working properly. Normally, NonAccum nodes of the root hold all rotation and translation information except the z-axis data.

Creating a Creature in TES:CS

Now that I have by Skeleton.NIF, Body.NIF, and idle.KF files, I can create my dragon in the Construction Set.

No need to load Oblivion.ESM again as it is simply not needed yet.

Niftools Max Plugins Maya Conversion 25.jpg

Close the dialog. Reopen. This refreshes the Animation and ModelList tabs now that it knows where the skeleton is. Now I go to ModelList and check body.nif. Finally, off to the Animation tab.

I can now check the Preview check box and see that all appears well.

Niftools Max Plugins Maya Conversion 26.jpg

Testing in Oblivion

Great now lets plop it down somewhere and check it out. I used the CS to plop one in the Waterfront district since my current save is in the Shack for Sale home.

This is what greets me when I leave the shack.

Niftools Max Plugins Maya Conversion 27.jpg

Bummer. Ok so I go back to the skeleton.nif and rotate it 45º and try again.

Niftools Max Plugins Maya Conversion 28.jpg

Lets try that again.

Niftools Max Plugins Maya Conversion 29.jpg

Done for now.

Quick shaky cam video at: http://s73.photobucket.com/albums/i237/tazpn/Dragon/?action=view&current=NVEExport.flv

Personal tools