modding-guide

Editing .rdm models with animations

along with solving the problem of disappearing objects.

This guide is intended for people who already know how to edit models and know what tools to use. If you’re just getting started, check out the guides below first:

https://github.com/anno-mods/modding-guide/tree/main/hier0nimus-tutorials/06-basics-modelling

https://github.com/anno-mods/modding-guide/tree/main/hier0nimus-tutorials/04-making-new-ship

https://github.com/anno-mods/modding-guide/blob/main/guides/rdm_animations.md

Introduction

If you have already dealt with editing models containing animations, then most likely you have encountered the symptom of invisible models or their parts in the game after using the rdm4 converter. The way to work around this problem is described in the second part of the guide and you can skip the first part, intended for people unfamiliar with editing such models.

If something is not clear about the editing steps described below, e.g. setting animation paths (sometimes it is necessary) - check out the guides mentioned above.

PART I

Editing models.

After loading the .cfg file with the model, you need to load the animations into it. Select the layer with the model that has them and load it using the “Load Animations” button:

alt_text

If you are not sure which model it is, you can view the .cfg file to which some animations are assigned:

alt_text

Once loaded (and the layers expanded), it should look something like this:

alt_text

Theoretically, you could already edit the model and try to save it according to the “Create .rdm Animations with Blender” guide, but we may encounter some problems and inconveniences that do not make sense to write about here, so it will be best to just clean up so as not to have them later:

  1. Move the layers with animations (“armature”) outside the MAIN_FILE object:

alt_text

As you can see in the picture, there may be transformations of the model to its original version (size and orientation) and we now have 3 of the same models, but we don’t care about it and we continue our work.

  1. Remove the whole MAIN_FILE:

alt_text

  1. Then remove one of the meshes with the model and the other move to the Scene Collection:

alt_text

  1. Set the “Armature” modifier to the object containing animations, i.e. “armature” (first on the list):

alt_text

alt_text

Now you can go to edit the object and …

… some time later:

alt_text

In this example, we have a reduced wagon, and on the side, a list of how everything should look arranged - make sure that the idle animations with others (walk) are not mixed up, use the spacebar to check if everything works correctly.

According to the art, we should now export everything (according to the “Create .rdm Animations with Blender” guide) and convert using rdm4-bin, but after loading the model into the game it will disappear (although there are exceptions) … why?

and here we go to part 2 of this guide:

PART II

How to solve the problem of disappearing models with animations in the game after editing and converting them through rdm4.

What’s the problem?

As you can see on one of the first screenshots in part I of the guide, the correct structure of the animation after loading looks like this:

alt_text

We have bones assigned to the Armature node (Armature.002). And the game reads such a structure for the models it uses. I’m not sure if it does it by name, or by index, or maybe it depends on the object. But the fact is that the rdm4 converter changes this structure by adding an additional parent bone (using the “Armature” node we have created in Blender), which in turn completely changes the bone node indexing:

nodes in blender before exporting:

alt_text

nodes after converting by rdm4:

alt_text

SOLUTION

Step 1

Bone structure modification in blender.

We have to choose one of the bones that is responsible for the main element of the model and make it a “parent” for the rest. In this case we select “SKN_root”:

before

alt_text

after

alt_text

Now we can export the file, but we must save it as a .GLTF file (not .GLB), remembering the following rules:

alt_text

alt_text

After saving, it is worth checking, e.g. in the 3D Windows browser, whether the model loads correctly and has animations (there should be, for example, two - idle and walk as Animation 1 and Animation 2)

Step 2

Open the .glTF file for the model in a text editor. You can see something like this at the beginning:

alt_text

We are interested in “scenes” and “nodes”.

“Nodes” is just a list of all the nodes in the structure and we need to manually change it here so that rdm4 doesn’t consider the root node “Armature” to be a bone, but an actual bone - in our case we want it to be “SKN_root”.

Therefore, to achieve this, you need to do two things:

Effect after changes:

alt_text

Now we save and can use rdm4-bin to convert the .gltf file to .rdm:

alt_text

path>rdm4-bin.exe -g=P4h_N4b_G4b_B4b_T2h_I4b -i path/filename.gltf -sa –no_transform –force

and of course we replace the resulting files with their respective names

alt_text

A word of comment:

I don’t know if the above steps are 100% effective for all models. Some, however, do not require this procedure. But so far it has helped everyone I’ve worked with, each model has its own specific bone arrangement and sometimes you have to experiment with different configurations. # ver 1.0 contact to author: JimDiGriz77

https://discord.com/channels/578443209940926465

https://www.nexusmods.com/users/40898860