Skip to content

Guide on adding a new model, animation, and creature to HoMMV

User Avatar
#59
Auto-translated
IMPORTANT: How to adapt and "fix" movement animation from M&MHVII for HoMMV?

You cannot simply take the movement animation from Heroes 7 and import it into Heroes 5.
"insert Boromir meme here"
If it is not edited beforehand, it will "skip" in-game, meaning it will jump from place to place.

Why does this even happen?
Movement animation in Heroes 7, as in most games, is a looped "in-place" motion.
In Heroes 5, for some strange reason, this is not the case.
In HoMMV, a creature's movement animation moves slightly forward relative to its starting point during one cycle.
The game handles all of this in its own clever way.



Now I will explain in detail how to fix this problem.

Open your creature file that has been prepared for animation import.


IMPORTANT: In 3ds Max, meters must be set in the unit settings.
Click "customize"=>"units setup".
In the window that appears, select "Metric" and choose "Meters" from the drop-down list, then click "ok".


Import your creature's "Move" animation by double-clicking the "Move" line in the animation import window of the "ActorX Import" script.
Stop the animation by clicking the stop button on the animation control panel.

Click the "Auto Key" button in the corner of the screen. A red frame will appear around the viewport.
You have entered "Auto Key" mode (automatic keyframe creation mode).
Select our "Global" bone to create the first keyframe for it.


The animation slider should be on frame zero of the timeline; if not,
move it manually by simply left-clicking and dragging it.
Now, with the "Global" bone selected, click the large button with the plus sign and the key.
Note that a new keyframe indicator has appeared on the first frame of the timeline.


Now move the timeline slider to the last frame of the animation; for me, it is 28.
And move the "Global" bone to an exact negative value on the "Y" coordinate.
I suggest using "-2.0".
(for some animations from Heroes 7, "-3.0" is more suitable)


Your animation is now adapted for Heroes 5.
Next, export it to .fbx and follow the steps from 2.4 to 3.1 in the main Manuals regarding model and animation import.
With the correction that you are adding "move" animation instead of "idle".


After this, the movement animation will likely still have jumps in-game,
but these must now be corrected in the xdb files.

Open your mod template and, in the creature's animations folder
("new_creatures\test_fraction\test_creature\animset"),
open the "move.(BasicSkelAnim).xdb" animation file, where you entered the code name of your exported movement animation.



You need to edit the "MovementSpeed" parameter.


Previously, I had to enter it blindly and test it in-game by eye;
this process was agonizing and could stretch for half an hour to an hour.


But then Frozensoull and I created a formula for you to calculate the "MovementSpeed" parameter.
And slightly later, vova2112 created an even better formula, which I provide below.

"meters" : ("frames" : 30)="MovementSpeed"
where "meters" is the value we moved the "Global" bone by,
in meters (without the minus sign, naturally),
and "frames" is the total number of frames of your animation in 3ds Max
(they are divided by 30 because that is the Max FPS; if using frames from Maya, they must be divided by 24)



Let's test this with a Black Guard example.
Its movement animation cycle lasts 28 frames.
I moved it in Max by -2 meters.

it comes out to 2 : (28 : 30)= 2.14285714286

"2.14285714286" is the desired "MovementSpeed".
Enter it into the xdb file. Sometimes you may need to round it to 7-8 decimal places.

That's it. Now the movement animation should work normally.

Some very small jumps are possible, but those will have to be corrected manually "by eye".

The speed of the movement animation, as well as the speed of any other animation,
can be edited via the "SpeedFactor" parameter in the animation xdb file.
Editing "SpeedFactor" in this case does not create any bugs or jumps,
as it likely changes the "MovementSpeed" proportionally in-game.


A texture or part of it is displayed incorrectly in-game. How to fix?

Sometimes, models from 7 have a slightly shifted UV map.
This is not an issue for modern engines, but complications arise when importing into HoMMV.



Fixing this is very simple.
Attention: the actions described below must be performed on the model before the export/import stage to smd format.
i.e., right before step 1.4


With the model selected, open the modifier list and add the "Unwrap UVW" modifier.
To find this modifier quickly in the list, you can press the "u" key after the list opens.


Now, in the modifier parameters, click the "Open UV Editor ..." button.
The "Edit UVWs" window will appear; here you can edit your model's map.
What exactly is this "map"?
A map (UV map) is a specific "chart" that allows your model—a 3D object—
to understand exactly how to project your texture—a 2D plane—onto itself.

In the "Edit UVWs" window, use a selection box to select the map elements that have "popped out" beyond the main square.
Then move them to where they should be located.
In this case, using an orc as an example, you will need to move it by "-1" on the "u" axis.
This can be done manually or simply by typing the value in the field below.


If you did everything correctly, the map elements should now be inside the main field.

Having finished the process, close the "Edit UVWs" window and continue with the main manual, exporting the file to smd.
After these manipulations, there should be no texture problems in-game.


On some elements of the model, the binding breaks; when animations play, they stick out crookedly. How to fix?

After the export/import stage to .smd format, the skeleton binding may fail on some model elements.
This is unnoticeable when the model is in its base pose but clearly visible during animation playback.


The easiest way to fix this problem is by merging fragmented vertices.

Important: for the "magic" described below to work and not ruin your model, meters must be set in the 3ds Max unit settings
(or even better, centimeters or millimeters).
Click "customize"=>"units setup".
In the window that appears, select "Metric" and choose "Meters" from the drop-down list, then click "ok".


Next.
With the model selected, click on the "Editable Poly" modifier
(it should be on your model after importing the smd file).
Enter vertex editing mode.
Select all vertices of your model using "ctrl"+"a".
In the "Edit Vertices" section, click the button next to "Weld".
A small panel with modifier settings will appear.
In it, you should select the minimum available value "0.01".
Then click the checkmark.


Afterward, check if the problem was fixed by playing the animation.

You can also fix this problem by manually editing the skin modifier.
Through this modifier, new elements can be bound to the skeleton.
Information on how to work with this modifier can easily be found independently online.


The model I am converting has more than one texture. What should I do?

Use your head.
Just import the smd model twice.
In "Editable Poly" mode, cut everything related to the second texture from one copy, and everything related to the first from the other.

Most likely, materials will be separated by ID, so to avoid selecting elements manually,
you can switch between materials in the "Polygon: Material IDs" section via the "Select ID" button,
after entering the ID number in the adjacent window.


Have some mercy on me; I will not explain this part in detail. There is plenty of available information on working with Max online, and I have already spent more than half a month on this manual, which some
still find very difficult.

I'll put it this way:
If you are too lazy to figure things out and if you read the text carelessly, any
even the simplest manual will be too difficult for you.


Problem of disappearing polygons when importing a model into Heroes 5.
footman described it in general terms

Группа в вк посвящённая моим модам

Страничка моего последнего мода на ModDB

Моя страничка на Artstation,
где можно посмотреть и повертеть внутри браузера мои 3d модели.