Heroes 5 Wiki

Prerequisites[]

The following applications and plugins are required for this process.

  • Unreal Engine assets plugin - ActorX Importer - a script for importing assets from Unreal Engine games into 3ds Max. Download it and use it as per the guide. There are no particular restrictions on the version (example is done on 3ds Max 2018). However it is important that ActorX Importer and plugins are compatible.
  • Valve SMD[1] format assets plugins - smd import plugin and smd export plugin used by 3ds Max for import and export in SMD[1] format. Install the plugins:
    • Make sure 3ds Max is closed
    • Download import and export plugin for the specific 3ds Max version that you are using.
    • Files are archives so extract their contents
    • Find the plugin file that reflects the installed 3ds max version:
      • For importer - SMDImporter.dli
      • For exporter - SMDExporter.dle
    • Move the files in 3ds Max plugins folder where default installation should be in "C:\Program Files\Autodesk\3ds Max (application version)\Plugins"
    • Open 3ds Max

Close and open of 3ds Max is required so the software can update its list of available plugins


Creature model - convert from PSK[2] to SMD[1] to FBX with 3ds Max[3][]

Import creature model from PSK[2][]

  • Open 3ds Max and and close the tips window.
  • From menu select "Scripting"->"Run Script", then browse ActorX Importer script, click "Open".

ActorX importer window will appear, configure the following options it:

  • "Mesh settings"- select the minimum size possible for the variables:
    • "Bone Size" - 0.1;
    • "Mesh Scale" - 0.01.
  • "Materials":
    • "Path to materials" browse the exported assets directory[4].
    • "Look in subfolders" - check the box
  • "Mesh Import" - select "Import PSK". This will trigger process of import model and skeleton file. Select .PSK[2] file from export folder[4].

MMH7 Black guard used for this guide will have .PSK[2] located in \CH_BlackGuard\SkeletalMesh3\SK_BlackGuard.psk. Models from MMH7 have a much larger scale than models from Heroes V, so it is good to reduce it as much as possible on import to reduce performance load on the game engine.

ActorX importer configuration
ActorX importer configuration



Model Bones, create a global bone[]

3ds Max command shortcuts

Zoom in/out

mouse wheel scroll

Movement across the plane

mouse wheel pressed

Rotation around the axis

mouse wheel pressed + ALT

Focus view on object

press Z as object is selected

Object selection

mouse left click on desired object

Understanding bones[]

Once imported, the model will be the selected object by default.

  • Press "Z" to zoom on it.
  • Move the mouse pointer over the lower right window (the one in which the model is displayed not as a grid), and press the keyboard shortcut "ALT+ W" to maximize the selected viewport.

If improper viewport is selected you can undo by pressing "ALT+ W" again. This will undo the operation and bring the window back to the four-viewport mode, so a new selection can be made.

  • You should end up with pyramids ugly sticking out of the model, those are the bones.

These pyramids appear when the scale of the model is changed during import but they are not detrimental to the model appearance. This will be automatically corrected by 3ds Max later during export to .FBX format.

  • To hide the bones, right click on the model and in the drop-down window select "Hide Unselected".
  • This can be undone by selecting "Unhide All" from the same menu.


Add new bone[]

  • From the right panel select the "Bones" tool (New(1) -> Settings(2) -> Bones(3) as shown on the picture).
Select a global bone
Select a global bone
  • Left-click on the space next to the model and the bone should starts to stretch.
  • Move the mouse a little and press the left mouse button again - the second bone starts to stretch.
  • Press the right mouse button, this to complete the construction of the bones. After the operation there will be 2 bones where the last one is selected by default. Because we only need one bone, press the "Delete" key to remove the second one.
    Delete the second bone
    Delete the second bone

Set bone coordinates to origin[]

  • Select the "Select and Move" tool by pressing the "W" hotkey. The selected tool will be highlighted in blue on the panel above.
    "Select and Move" tool is highlighted
    "Select and Move" tool is highlighted
    On this panel you can switch between the main tools (left click) or change tool modes (hold left click).
  • Select the remaining bone.
  • Move the object to the starting coordinates by either moving it manually through the control element (square with X, Y, Z coordinates) or by adjusting coordinate numbers to 0.0 in the "X, Y, Z" axis fields.
    Bone with X,Y,Z coordinates adjusted to 0
    Bone with X,Y,Z coordinates adjusted to 0

  • Press enter to move the bone to to zero coordinates and be at the base of the creature model
Bone is at the center of the model
Bone is at the center of the model

Set bone rotation to origin[]

  • Select the tool "Select and Rotate" tool from the top panel or by pressing "E"
  • Re-define the X, Y, Z axis to origin by filling "0" into the boxes.
"Select and Rotate" tool
"Select and Rotate" tool

Link "Global" bone with other bones[]

  • As the bone is selected, go to the “Modify” window and rename it “Global
Rename bone to global form the Modify window

Make sure bones can be seen. If previously hidden, undo it by right click -> "Unhide All" from the context menu.

  • Select "Select by Name" menu by pressing "H".
  • Hold down "CTRL" and select several objects as follows:
    • root bone of the skeleton
    • creature model

In other words, select everything in the drop-down list except the Global bone.

  • Select OK
Root bones and model selection
Root bones and model selection

Naturally, there is no need to select other bones of the skeleton from the heroes7 model /these bones can be viewed by clicking on the small triangle next to the name of the root bone/. Only the root bone needs to be selected.

  • Select "Select and Link" tool by pressing on the chain icon on the top toolbar.
  • Press "H" again. In the window that appears, you will be offered not to select the object, but to link the selected one.
  • Select the only available object - the "Global" bone
  • Click on the "Link" button.
Link the Global bone
Link the Global bone
  • Select "Select Object" tool by pressing "Q" so "Select and Link" tool is unselected. This is to prevent creating any unnecessary links.
"Select Object" tool
"Select Object" tool


Review bone configuration and save[]

  • We press the button "H" and in the window that appears, check the new hierarchy by clicking on the small arrow next to the "Global" bone.
New hierarchy
New hierarchy

If steps were done correctly, a new hierarchy of objects will be successfully created and tied the MMH7 model and its root bone will be linked to the Global bone. All changes made to the Global bone will be displayed on the objects located within the hierarchy.

  • Save the file by using the "Save File" button or pressing "CTRL + S" keyboard combination.

Intermediate model import-export through SMD[]

Why does SMD import-export step is necessary?[]

Due to unknown factors, Maya 6.0 does not see MMH7 models that were exported from 3ds Max. Until a proper solution is found use this intermediate export/import in SMD[1] format as a workaround. If you find a solution please let us know!

The SMD[1] import/export plugins in the prerequisites step are required.

Export model to SMD format[]
  • Open the model file saved in the previous step.
  • Open export settings by selecting "File -> Export -> Export ...".
  • In the "Save as type" window that appears, select the "Valve SMD (* .SMD)" format.
  • Write the name of the file in "File name" and click "Save". The export settings window appears, in it the "Export reference SMD" should be marked with a circle.
  • Select "Export"
    Export model to SMD format
    Export model to SMD format

  • Select "Select Object" tool by pressing the "Q" button.
  • Delete the creature model by selecting it and pressing "Delete" on the keyboard
    Delete model from 3ds Max
    Delete model from 3ds Max
Import model from SMD[1] format[]
  • Go to "File -> Import -> Import ..." and select the SMD[1] file you exported earlier.
  • Set the following import settings (also shown in the screenshot).
    • "SMD purging" - "Skip Mesh" and "Skip Animation" must remain empty
    • "Mesh Options" - check "Import Mesh", "Rebuild Smoothing Normals", "Import Materials"
    • "Bone/Animation Options" - check "Import Bones", "Skin Mesh to bones", "Import first frame (reference) only". Other checkers on this pane should be empty.
    • Click "OK".

You should get a result like in the image marked with a green checkbox.

Import SMD file with these settings
Import SMD file with these settings

The SMD import process has added a new model with name that starts with "SMDImporter.Mesh.111" and an additional unnecessary bone inside the Global bone called with the name of the exported model - in this particular example it is "SK_BlackGuard".

  • Open the hierarchy window by pressing "H"
  • Select and delete the bone named by the exported file.
Delete the bone added by the import process
Delete the bone added by the import process

Create smoothing groups[]

At some stage (previous import/export processes or model alterations) smoothing is removed from the model, and if not repaired, it will look crooked in the game later.

  • While the model object is selected switch to the "Modify" window and click "Editable poly" modifier.
  • In the new window, acknowledge "The dependent modifier is: skin" by selecting "Yes".
  • Switch to "Elements" mode by pressing keyboard button "5".
  • Select everything by pressing the key combination "CTRL+ I" and the model should then turn red.
  • Scroll down the side menu and go to the "Polygon: Smoothing Groups" tab.
  • Just in case, click the "Clear All" button, then check that you have smoothing at 45 degrees, and click the "Auto Smooth" button.

If you did everything correctly, the numbers will disappear in several squares in the smoothing groups field. Smoothing groups are now set.

  • Exit the "Editable poly" mode by pressing the "Elements" button again (hotkey "5").
  • It is not necessary, but as you are in the modify tab, it is advisable to rename the model to something more convenient to avoid confusion. Below example model name was changed from "SMDImporter.Mesh.111" to "H7DarkGuard".


Bind imported model to Global Bone[]

  • Select "Select Object" tool by pressing "Q"
  • Open the hierarchy window by pressing "H" and select the model "H7DarkGuard"
  • Select "OK"


  • Select "Select and Link" tool
  • Open the hierarchy window by pressing "H"
  • Select "Global" bone
  • Bind the new model to the "Global" bone by pressing "Link".
  • Exit hierarchy window by switching to "Select Object" tool by pressing "Q".

At the end of this operation the Global bone should be at the top of the hierarchy.

Hierarchy menu - bind global bone
Hierarchy menu - bind global bone

Set scale[]

  • Press the "R" hotkey to select the "Select and Scale" tool.
  • Select the "Global" bone (if you can't find it in the viewport, use "Select by Name" by pressing "H" hotkey).

The "Select and Scale" tool must be in "Uniform" mode so the "X, Y, Z" axes are not stretched by hand. In "Uniform" mode changes in the value from one axis will be transmitted to all three. The tool is in "Uniform" mode if "X" axis value field is actuve and "Y, Z" axes fields are inactive (gray).

  • To switch the tool to "Uniform" mode you just need to press the "R" key several times, until the "Y, Z" axes fields at the bottom become inactive (gray).
  • Set "X" axis to "70" (70% of the current size). This should fit the model to roughly the size of the Might and Magic Heroes 5.

If the creature should be really big then "Global" bone may need to be increased instead of reduced. Ratio depends on the model but usually values such as "180" or "150" instead of "70" do the work.

Uniform mode - Y,Z axes are inactive
Uniform mode - Y,Z axes are inactive

Set rotation[]

When importing a model into Might and Magic Heroes V using this method, it is tilted by -90 degrees. Therefore, it must be tilted in the opposite direction in advance.

  • Select "Select and Rotate" tool by pressing hotkey "E" (Latin).
  • Select the "Global" bone and tilt it 90 degrees along the "X" axis.

After these manipulations, the model and bones should tilt 90 degrees forward.

Tilt rotation by 90 degrees
Tilt rotation by 90 degrees

Export model to FBX[]

  • Go to "File -> Export -> Export ...".
  • In the "Save as type" window select the "Autodesk (* .FBX)"[5] format.
  • Write the name of the file. In our example the name is "H7DarkGuard_Model".
  • Click "Save".
  • In the "FBX export" window
    • "Geometry" - check "Smoothing groups", "Convert Deforming Dummies to Bones", "Preserve edge orientation"
    • "Advanced Options" -> "Units" -> "Scale Factor" - check "Automatic"
    • 'FBX File Format" window - "Version" field must be "FBX 2009" in order the model to be compatible with Maya 2009.
    • Select "OK"

Model is now ready for export to Maya 2009.

Export model to FBX format

Rotate model to origin[]

It is required to revert the rotation to original state in order to continue with animation steps further below the guide.

  • Select the "Select and Rotate" tool - hotkey "E".
  • Select the "Global" bone, return it to its original position by filling "0" in the "X" axis field.
  • Save your file using the "Save File" button or "CTRL + S" key combination.

Creature animation - Convert from PSA to FBX[]

Import animation from .PSA[]

  • As the model is still opened go to menu and select "Scripting"->"Run Script", then browse ActorX Importer script, click "Open".
  • In the window "ActorX Importer" -> "Animation Import" tab
    • check "Update animation length"
    • check "Play Animation" - this will play imported animations immediately.
    • set "Translation mode" to "Force AnimSet translation"
    • press "Import PSA..." and browse the BlackGuard assets folder[4] for the .PSA animation file. For example: "\CH_BlackGuard\AnimSet\AS_BlackGuard.psa"

"Animations" window will be populated with available creature animations. They can be viewed by double clicking on them. For starters, it is advisable to export only one animation to the game and test that the process works.

  • In "ActorX Importer" -> "Animations" - double click the "Idle" animation and it should start playing on the creature. This is the idle animation for the creature.

You can reopen your saved file and, repeating the export process for as many animations as you like.

22222222

In the lower right corner there is a panel for managing the current animation. Main buttons are circled in red. If bones (pyramids sticking out) interfere too much with the view remember they can be hidden by selecting the model -> right click -> "Hide unselected". After work with animations is done, revert the change by selecting the model -> right click -> "Unhide all"

4444

What if I want to view the model again with texture?[]

Open assets folder[4]. For the current example:

  • Go to \CH_BlackGuard\Texture2D
  • Find a file that ends in "_D.dds" - currently this is T_BlackGuard_D.dds
  • Drag the file into 3ds Max and drop it over the model of the creature

If done correct, the model is covered with texture. This action is for clarity of the person that edits the animations only. It will by no means, affect the export process in any way.

Export animation to .FBX[]

  • Go to "File -> Export -> Export ...".
  • In "Save as type" window select "Autodesk (* .FBX)" format.
  • Fill in any name for the file that you find appropriate. For current example: "H7DarkGuard_Anim_Idle"
  • Select "Save"
  • On the "FBX Export" window
    • in "Include"
      • "Geometry" - check "Smoothing groups", "Converting Deforming Dummies to Bones", "Preserve edge orientation"
      • "Animation" - check "Animation"
    • in "Advanced Options"
      • "Units" - check "Automatic"
      • "FBX File Format"- set "Version" to "FBX 2009" to make it compatible with Maya 2009.
  • Select "OK"
    55555
    Animation is now exported for Maya 2009!

Final result[]

At the end of the article two FBX files should be present, one for model and one for animation named as follow:

  • H7DarkGuard_Model.fbx
  • H7DarkGuard_Anim_Idle.fbx

Next step: Import model and animation in Maya 2009 and convert them for Maya 6.0 (MB format)

References[]