SP Tutorial Animation How to make animated map icons in OpenBRF

Currently Viewing (Users: 0, Guests: 1)

NPC99

Baron
M&BWBWF&SVC
Best answers
26
1. Making an infantry map icon

Open OpenBRF and from it's file menu, open ani_man_walk.brf, which you'll find in Warband's CommonRes folder. Highlight man_walk and watch a skeleton of diamonds walking. To use frames from this looping animation for your map icon, right click on it and select Add to reference animations (last option on the pop_up menu).

Now you have to clothe your skeleton.

From OpenBRF's file menu, open armours_e.brf, which you'll find in Warband's CommonRes folder, and highlight lamellar_vest_a. You'll see it has 1,326 faces/polys in OpenBRF's information window. That's too detailed/expensive for a map icon. So drop down and highlight lamellar_vest_a.lod2 instead - it only uses 132 faces and still retains sufficient detail, which is perfect for a map icon. Highlight it's mesh, click the Edit option in OpenBRF's menu bar and select copy.
Then, open the File option in OpenBRF's menu bar and select New. From the Edit menu select paste and then from the File menu select Save as... Give your working file a suitable name, I suggest icon_test, and save it in ...mountblade warband/modules/Native/Resource or ...mountblade warband/modules/Mymod/Resource rather than cluttering CommonRes.

Congratulations you now have a headless, handless, legless map icon.


Ok let's go to Warband's CommonRes meshes_face_gen.brf. Here you'll see half an untextured male head. Forget it - at 449 polys for half a head it's too expensive. Copy the ugly untextured blob called male_head.lod2, which only uses 24 polys for the whole head, and paste it into your icon_test.brf file.
Let's give our blob a face - change its material from default to manface_young and it starts to look human. Now if you highlight your head and armour at the same time, you'll see they want nothing to do with each other. In Warband and OpenBRF meshes are only combined if they have the same name. So, highlight both meshes in OpenBRF, right click, select Group Rename... and type x followed by a full stop. Now they are components of one mesh called x and when you highlight them both they come together. However, your head is where your feet should be because it's not rigged. So highlight only the head, right click and select Mount on one bone...
This brings up a pop-up menu, which needs the following options:
Reference skeleton: skel_human
bone: head
(optional) carry location: none
piece currently centred: at origin
Then press ok and then save your icon_test.brf.

Now, your map icon has a head.


Let's give him some hands. In Warband's CommonRes body_meshes.brf look at m_handL and m_handR - great up close in OpenBRF but too pricey at 996 polys. We can live with m_handL.lod1 and mhandR.lod1 (32 polys) - copy and paste them into your icon_test.brf and group rename them with a prefix of x followed by a full stop before mhand. Like your head they are unrigged and lying at your feet. So use Mount on one bone... to rig x.m_handL.lod1 onto bone: hand.L and then x.m_handR.lod1 onto bone: hand.R. Then save your icon_test.brf.

Now, you have hands!


Before we go any further, we also need to remember that map icons can only access one material. We can combine textures (I'll cover how later), but it's best to minimise the number we have to use. So highlight our two hands and change their material from costumes_lod to manface_young as we're already committed to using that one. As you can see, the hands still have a skin colour and no eyes or noses are showing, without an unnecessary third texture - good enough for a map icon, so save your icon_test.brf.

For boots, lets go to Warband's CommonRes boots_a.brf and copy and paste spl_greaves into your icon_test.brf. Right click its mesh and rename it with an x prefix from spl_greaves to x.spl_greaves. Fortunately boots like body armour are already rigged. However, our splinted greaves are expensive at 292 polys and there wasn't an available LOD in boots_a.brf. Never mind, we can make our own. Right click on x.spl_greaves in OpenBRF and select Compute LODs. This gives us four lods, but we only need x.spl_greaves.lod1 (145 polys) - highlight all the other x.spl_greaves meshes, right click and select Remove.

Save your icon_test.brf and you have a bald soldier.


Rather than giving him hair, lets go to helmets_f.brf in Warband's CommonRes folder and copy and paste tattered_steppe_cap_a_new.lod2 (82 polys) into your icon_test.brf. Rename it with an x prefix and rig it to the head bone using Mount on one bone... (just the same as you did for your head). This helmet uses Warband's helmets_new_f material. To save on textures, highlight our splinted greaves (x.spl_greaves.lod1) and change it's material from costumes5_skin to helmets_new_f (so two meshes share that texture). To use the chainmail part of this texture, right click on the greaves and select Transform texture coords and enter the following settings in its pop-up box:
scale% U: 200.00
scale% V: 200.00
Translate U: 0.0000
Translate V: 0.3500
and press ok, giving us mail boots and one less texture to combine later.

Save your icon_test.brf and you have a weaponless soldier for 415 polys.


For a sword, lets copy and paste sword_medieval_a.lod1 (50 polys) from weapon_meshes_c.brf in Warband's CommonRes folder. Rename it with an x prefix and rig it using Mount on one bone, but this time setting the bone required to item.R, which places your item/sword in your soldier's right hand.
Save your icon_test.brf and you have an armed soldier. Now click on OpenBRF's animation button and change it from no anim to man_walk, then click the > button to start your animation.

Now your soldier is armed an dangerous!


For a shield, copy and paste shield_round_e.lod1 (14 polys) from shields.brf. Rename it with an x prefix and rig it using Mount on one bone using the bone forearm.L This looks great, but we're over budget on our number of textures (we only want to use four different materials).
To save on textures change your sword's material from weapons2 to helmets_new_f (the same as your helmet), which gives us a messed up texture. To correct this, right click on the sword and select Transform texture coords and enter the following settings in the pop-up box to reposition its new texture:
scale% U: 25.00
scale% V: 25.00
Translate U: 0.0000
Translate V: 0.0500
and press ok.

Now your soldier is ready for battle and he only requires 479 polys.


Use your mouse wheel to shrink him in OpenBRF to check what he'll look like at a campaign map scale and make him walk - not bad.


Now we must leave OpenBRF for a bit to create a single combined texture as map icons can only have one material. In the image editor of your choice, create a blank image sized 1024 x 1024 pixels. Import lamellar_vest_a.dds from Warband's Textures folder and resize it from 1024x1024 pixels to 512x512 pixels. Copy its whole image (just the main surface ignoring mipmaps) and paste it into the upper left quadrant of your blank 1024x1024 image.


Import manface_young.dds from Warband's Textures folder. As this is already 512 x 512 pixels copy and paste it into the upper right quadrant of your 1024 x 1024 image.
Import helmets_new_f.dds from Warband's Textures folder. As it's already 512 x 512 pixels copy and paste it into the bottom left quadrant of your 1024 x 1024 image.
Now import our last texture shields.dds from Warband's Textures folder and resize it from 1024 x 1024 pixels to 512 x 512 pixels. Then, copy and paste it into the bottom right quadrant of your 1024 x 1024 pixel image.


Save it in a dds format (remembering to tick generate mipmaps) as map_icon_new_tex in ...mountblade warband/modules/Native/Textures or ...mountblade warband/modules/Mymod/Textures

Next, return to OpenBRF and open materials.brf in Warband's CommonRes folder. Copy the map_icons material and paste it into your icons_test.brf. As this is a material, it saves in a separate tab from your meshes. Looking at this material, you can see that map icons use different shaders and don't have DiffuseB, Bump/Normalmaps, Enviro or Speculars. To use this material's campaign map shader and settings, we just need to substitute its DiffuseA texture. So, click import in OpenBRF's menu bar, select New Texture..., click browse (with the also add new material(s) with the same name(s) box unticked) and import map_icon_new_tex. This creates a third texture tab in your icon_test.brf. Now select map_icons in your materials tab and change its DiffuseA texture from map_icons to map_icon_new_tex, rename this material map_icon_combined and save your brf file.

The tricky part is getting all of your meshes to use your new map_icon_combined material and its related texture.

In the meshes tab, select x.lamellar_vest_a.lod2 and change its material to map_icon_combined. Yes, it looks wierd with a manface on its back, but we're not finished.
Right click and select Transform texture coords and change the pop-up settings to:
scale% U: 50.00
scale% V: 50.00
Translate U: 0.0000
Translate V: 0.0000
and press ok - now it looks correct again, but uses our new texture.

Highlight all the meshes which use the manface_young material (your head and both hands) and substitute the map_icon_combined material. Again, right click while still highlighting all three flesh meshes, select Transform texture coords and change the pop-up settings to:
scale% U: 50.00
scale% V: 50.00
Translate U: -0.5000
Translate V: 0.0000
and hit OK.

Next hightlight your helmet and sword and substite their helmets_new_f material for map_icon_combined. Then transform their texture cordinates to:
scale% U: 50.00
scale% V: 50.00
Translate U: 0.0000
Translate V: -0.5000
and hit OK.

The boots are slightly different. Substitute their material for map_icon_combined and transform its texture cordinates to:
scale% U: 50.00
scale% V: 50.00
Translate U: 0.5000
Translate V: -0.5000
and hit OK.

Finally, substitute your shield's material for map_icon_combined and transform its texture cordinates to:
scale% U: 50.00
scale% V: 50.00
Translate U: -0.5000
Translate V: -0.5000
and hit OK.

All your meshes now use a single material! However, not all your meshes have the same number of frames. They all have one apart from your lamellar vest, which is still feminised with three frames. We can't combine these meshes until they each have the same number of frames. So, highlight x.lamellar_vest_a.lod2, right click and select separate all frames. Delete/remove all the lamellar meshes apart from frame0, which is a male frame. Now, you can highlight all your meshes, right click and select combine meshes.

You have a new composite mesh just called x. To differentiate it from our working components (so the Warband engine doesn't try to aggregate them) rename this new mesh from x to my_map_icon and save your icon_test.brf.

Now to make its vertex animation. With the man_walk animation selected in OpenBRF's animation button, right click my_map_icon and select Convert into a vertex animation. You now have a new mesh called my_map_icon_walk with no animation button and 33 frames. Press the > button to see it walking.

Unfortunately, Warband's engine uses simplified animations on the campaign map so we need to reduce the number of frames and use Native's timings. After saving your icon_test.brf, open map_icon_meshes.brf in Warband's CommonRes folder, copy the player mesh and paste it into your icon_test.brf. Now, you can see that the player mesh only has 11 frames. You can use the time of frame arrows to click through them individually. Frame 0 is Warband's default with arms in a T position, which is never used on the campaign map.

Highlight my_map_icon_man_walk and select separate all frames, giving 33 frames and no T position. We can use frame0 for our first two frames (edit copy, paste) as the first frame is never used. Now we need 9 others from the remaining 32, approximately one in every 3.5. Use alt and the up/down arrow to move individual arrows until you create a vertical list in this order:

my_map_icon_walk_frame0
my_map_icon_walk_frame0
my_map_icon_walk_frame4
my_map_icon_walk_frame8
my_map_icon_walk_frame12
my_map_icon_walk_frame15
my_map_icon_walk_frame19
my_map_icon_walk_frame22
my_map_icon_walk_frame25
my_map_icon_walk_frame28
my_map_icon_walk_frame32

The numbers are irrelevant, OpenBRF combines them based on their positions in a vertical list. Now highlight these 11 frames, right click and select merge as frames in a vertex ani.

You now have an 11 frame map icon with incorrect timings. So, highlight the player mesh, select edit from OpenBRF's menu bar and copy. Then, highlight your new 11 frame map icon and paste timings from OpenBRF's edit menu. Your map icon is now synced to the Warband engine. In reality, this is the only mesh you want to keep. To avoid confusion let's rename it my_final_map_icon and save your icon_test.brf.

If you look on OpenBRF's menu bar at the end of your brf's name it says [not in module.ini]. To be available as a resource in game, you need to edit module ini and add a new line:
load_mod_resource = icon_test

Order is less important as your icon's material and texture are contained in the same brf. Just insert it after load_resource = map_flags_d and save module.ini. To check it worked, click tools in OpenBRF's menu bar and select refresh all. If you've edited module.ini correctly, the [not in module.ini] warning will have disappeared.

Your brf is now an in game resource, but you still have to reference it in Warband's module system:

1. module_map_icons.py - copy the first line of code after map_icons = [
("player",0,"player", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0),
and paste it at the bottom of the file just before the closing ] bracket.
Then change the player icon name and mesh name to my_map_icon and my_final_map_icon respectively, giving:

("my_map_icon",0,"my_final_map_icon", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0),
save and compile.

2. module_simple_triggers.py - just to test our icon, search for icon_player and temporarily change:
(assign, ":new_icon", "icon_player")
to
(assign, ":new_icon", "icon_my_map_icon"),
save and compile.

Now load up Warband and start a new game as someone other than an squire (to avoid being allocated a banner). Once you're on the world map, open inventory and remove your horse from its riding slot for a map icon on foot and see your new icon used for the player in game.


To follow the second part of this guide - Making a mounted map icon - click here:
NPC99 said:
2. Making a mounted map icon
To follow part 3 - Making an animated map windmill - click here:
NPC99 said:
3. Making an windmill map icon
 
Last edited:

Khamukkamu

Master Knight
M&BWBWF&SVC
Best answers
0
This is great and very useful! I've always wanted to add more TLD map icons, especially for the different races, and this tutorial will help me do this :smile:

Again, thanks for the tutorial.
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
It’s a pointer for people who aren’t ready to model or animate in blender. Further issues to understand are:

1. Groups - if you want to make a group icon like those in Viking Conquest, make three copies of your individual map icon, offset two of them from the first so they don’t all occupy the same space and combine meshes. You can group any vertex animations if they have the same number of frames, the same frame timings and the same material. Clearly, easiest if they are all copies of the same icon.

2. Mounts - horses use a different skeleton and animations, but the principle remains the same. Unfortunately, the base horse animation contains a few hundred frames, which makes picking appropriate frames for your vertex animation a pain. Remember, if you want to combine them with a rider, both icons need to use the same material. So one quadrant of your shared texture must be devoted to a horse texture.

3. Riders - made the same way as walkers but using a riding animation. Then combine meshes with the horse icon. The tricky part is choosing the right frames to sync the motion of your horse and rider. Sometimes you also need to cheat and tweak the riders position before combining him/her with their horse.

4. Carts - the only moving parts are wheels. Just make each individual frame by rotating your wheel mesh. The rest of the cart is the same in every frame. Then vertex animations of two wheels, one cart body and a horse can be grouped using combine meshes as usual (make sure they all have the same number of frames, frame timings and materials).

5. Textures - the more bits you add the more textures you’ll require. Using the four quadrants illustrated can be limiting, but the same principles can be used to split any of your four quadrants into four 256 x 256 pixel subquadrants. The best way to do this is to partially texture an icon with a four quadrant material using the guide. Then resize this 1024 x 1024 pixel quartered texture to 512 x 512 pixels and paste it into a quadrant of a new blank texture. That normally keeps the subsequent transforming texture coordinates job the same as illustrated above, but not always - UV coordinates can be tricky.

@Khamukkamu good luck making more TLD map icons.

PS if your map isn’t flat, keep your group icons small as Warband doesn’t use Inverse Kinematics. The whole group moves as if on flat terrain (i.e. all icon parts on a level). So on a slope in a large group, the front or back icons can have their feet off the floor or dug into the ground. If you want to see a clear example of this, watch my three horse artillery trains in English Civil War moving up or down the slopes of welsh mountains.
 

imado552

Sergeant at Arms
Best answers
0
a great and useful tuto out here!

hats off!

just a question does one texture(combined) need to have only 4 textures? i mean can we have 6?

mine is a palanquin of a samurai noble escorted by retainers and servants so yeah...
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
imado552 said:
a great and useful tuto out here!

hats off!

just a question does one texture(combined) need to have only 4 textures? i mean can we have 6?

mine is a palanquin of a samurai noble escorted by retainers and servants so yeah...
Four was only used as a simple example. You could split one or more quadrants into four 256 x 256 pixel sub-quadrants, it just makes transforming the texture coordinates tricky. Alternatively:

1. Hair, for example, doesn't need a specific  texture at map scale - just give it a uniform black vertex colour, which darkens any texture from its material.
2. OpenBRF has a copy colours from texture command, which attempts to duplicate a texture in vertex colours but it's very crude (particularly at map icon scale because of the low vertex count).
3. You don't always need to keep quadrant textures intact. Sometimes one mesh is UV mapped to one side of a texture and another is mapped to the opposite side, allowing you to combine the halves of two textures in one shared quadrant.
4. The combined mesh or its components can always be re-UV mapped in blender.
 

imado552

Sergeant at Arms
Best answers
0
NPC99 said:
Four was only used as a simple example. You could split one or more quadrants into four 256 x 256 pixel sub-quadrants, it just makes transforming the texture coordinates tricky. Alternatively:

1. Hair, for example, doesn't need a specific  texture at map scale - just give it a uniform black vertex colour, which darkens any texture from its material.
2. OpenBRF has a copy colours from texture command, which attempts to duplicate a texture in vertex colours but it's very crude (particularly at map icon scale because of the low vertex count).
3. You don't always need to keep quadrant textures intact. Sometimes one mesh is UV mapped to one side of a texture and another is mapped to the opposite side, allowing you to combine the halves of two textures in one shared quadrant.
4. The combined mesh or its components can always be re-UV mapped in blender.
ah i see another question will it still work the same if i use blender to UV-map the object before importing them to openbrf again ? will it not mess up the animation this way?
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
imado552 said:
NPC99 said:
Four was only used as a simple example. You could split one or more quadrants into four 256 x 256 pixel sub-quadrants, it just makes transforming the texture coordinates tricky. Alternatively:

1. Hair, for example, doesn't need a specific  texture at map scale - just give it a uniform black vertex colour, which darkens any texture from its material.
2. OpenBRF has a copy colours from texture command, which attempts to duplicate a texture in vertex colours but it's very crude (particularly at map icon scale because of the low vertex count).
3. You don't always need to keep quadrant textures intact. Sometimes one mesh is UV mapped to one side of a texture and another is mapped to the opposite side, allowing you to combine the halves of two textures in one shared quadrant.
4. The combined mesh or its components can always be re-UV mapped in blender.
ah i see another question will it still work the same if i use blender to UV-map the object before importing them to openbrf again ? will it not mess up the animation this way?
Changing the UV maps won’t effect the animations. UV maps just govern which parts of the material/texture are applied to different parts of your mesh.
 

imado552

Sergeant at Arms
Best answers
0
NPC99 said:
Changing the UV maps won’t effect the animations. UV maps just govern which parts of the material/texture are applied to different parts of your mesh.
i see and for many people/group icon as long as i get the frames correct its all settled !
thank you dude !
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
imado552 said:
NPC99 said:
Changing the UV maps won’t effect the animations. UV maps just govern which parts of the material/texture are applied to different parts of your mesh.
i see and for many people/group icon as long as i get the frames correct its all settled !
thank you dude !
Just remember the rules. A group icon is still a single icon. So all parts of that group icon must share the same material - only one composite texture.

As a practical example of a group icon, here's the texture for my royalist artillery train, which combined ten different textures (one unused) in quadrants, sub-quadrants and sub-sub-quadrants:


At map icon scale the loss of resolution isn't a major issue as you can see in this OpenBRF screenshot:

 

HarryPham123

Knight
Best answers
0
when i make another icon like carrying something, when i add their new material it hard to scale them in the right place it like a mess
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
HarryPham123 said:
when i make another icon like carrying something, when i add their new material it hard to scale them in the right place it like a mess
Agreed, it can be very tricky. That’s why you should work systematically in quadrants as follows:

mtarini said:
You can but you have to suffer a bit and also prepare the textures themselves yourself.

The tool you are looking is "Transform texture coordinates"
For example, to assemble 4 sheets into one sheet like this:

A B
C D

then all the models should be scaled by 50% (both U and V).
meshes originally using A should not be translated.
meshes originally using B should be translated by 0.5 in U (horizontal)
meshes originally using C should be translated by 0.5 in V (vertical).
meshes originally using D should be translated by 0.5 both in U and in V.

Now, all these meshes must be using the material linked to the new assembled texture.
 

Leonion

Master Knight
Best answers
0
Wow. That's a great guide.
This part in particular:
Now to make its vertex animation. With the man_walk animation selected in OpenBRF's animation button, right click my_map_icon and select Convert into a vertex animation. You now have a new mesh called my_map_icon_walk with no animation button and 33 frames. Press the > button to see it walking.
I didn't know one could do this, so I'd probably waste hours trying to create the animation frames in Blender.  :facepalm:
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
Leonion said:
Wow. That's a great guide.
This part in particular:
Now to make its vertex animation. With the man_walk animation selected in OpenBRF's animation button, right click my_map_icon and select Convert into a vertex animation. You now have a new mesh called my_map_icon_walk with no animation button and 33 frames. Press the > button to see it walking.
I didn't know one could do this, so I'd probably waste hours trying to create the animation frames in Blender.  :facepalm:
OpenBRF is a greater tool than most of us appreciate when we start using it - mtarini did a wonderful job creating it. Where would modding be without OpenBRF?
 

Marko͘

Section Moderator
WBNWM&BWF&SVC
Best answers
1
I will gladly, but usually we try to give them some more exposure in this general Forge area. After a week or two I will move it, if you don't mind.
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
BNS Marko said:
I will gladly, but usually we try to give them some more exposure in this general Forge area. After a week or two I will move it, if you don't mind.
That’s fine. Thanks.  :grin:
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
2. Making a mounted map icon

Creating a mounted map icon in OpenBRF uses the same techniques as the infantry icon we built in the opening post. In fact, the start is exactly the same. You need to follow all the opening post instructions until you reach Now to make its vertex animation or if you still have it we can start with the unanimated my_map_icon you created in our first session.

As each map icon can only have one material, we need to create a new texture, which can accomodate a horse image. We already have map_icon_new_tex.dds from our previous session:


In your preferred image editor:

1. Create a new blank 1024 x 1024 pixel image,
2. Resize map_icon_new_tex.dds from 1024 x 1024 to 512 x 512 pixels,
3. Copy & paste the resized map_icon_new_text into the top left quadrant of your new blank image, &
4. Save as map_icon_mount_tex.dds in your textures folder.


Now in OpenBRF - load your icon_test.brf file, copy map_icon_combined in the materials tab, paste it and rename this new material map_icon_mount. This reuses all your map icon material flags, settings and shader. Import your new texture map_icon_mount_tex.dds into your icon_test.brf file and set that as the DiffuseA texture in your new material.

Next, copy your my_map_icon mesh, rename it my_map_icon_mount.1 and change its material to map_icon_mount, giving our mesh a messed up image with untextured white on all those parts UV mapped to empty quadrants.


As this can only be corrected at component level, right click my_map_icon_mount.1 and select split into connected sub-meshes. This breaks our mesh down into 12 parts numbered 0 to 11. Now right click your body armour my_map_icon_mount.1.11, select transform texture coords and set the Scale% U and V to 50.00 and 50.00 respectively. And, is if by magic, it's back to normal.
Hightlight your face and hands parts 8 to 10, select transform texture coords and set the Scale% U and V to 50.00 and 50.00 respectively and Translate U by 0.5000.
Hightlight both boots parts 6 & 7, select transform texture coords and set the Scale% U and V to 50.00 and 50.00 respectively and Translate U by 0.5000 and V by -0.5000.
Hightlight your helmet and sword parts 1 to 5, select transform texture coords and set the Scale% U and V to 50.00 and 50.00 respectively and Translate V by -0.5000.
Finally, right click your shield (part 0), select transform texture coords and set the Scale% U and V to 50.00 and 50.00 respectively and Translate U by 0.5000 and V by -0.5000.

Highlight mesh parts 0 to 11, right click and select combine meshes. You now have two versions of my_map_icon_mount.1 - delete the one with messed up textures and all the unnecssary components (0 to 11) and save your icon_test.brf.

We are now back where we started but our re-UV-mapped material has space for a horse texture. Zoom out and you'll also see that the reduced resolution of your down-sized texture isn't noticeable at map icon scale even though the original 1024 x 1024 pixel textures are now degraded to 256 x 256 pixels.

Now, for a horse, open horse_b.brf from Warband's CommonRes folder. The courser looks striking, but 1524 polys is too expensive. Copy courser.lod2 (346 polys) and paste it into your icon_test.brf. Load it's texture, courser.dds, into your image editor. As it's already 512 x 512 pixels, copy and paste it into the top right quadrant of your map_icon_mount_tex.dds and save, remembering to generate mip_maps. Refresh all, in OpenBRF's tools menu, will make the new combined image appear in your map_icon_mount material if you have edited the texture correctly.


As you can see we have two blank quadrants - enough room for this material to cover two different mounted map icons, but that optimisation is beyond this task in hand. To change our horse to the shared material, right click your courser.lod2 mesh in OpenBRF and change it's material from courser to map_icon_mount. Next, correct its messed up UV map by transforming its texture coordinates with the following settings: Scale % U 50.00, V 50.00% and Translate U 0.5000, V 0.0000 and save your icon_test.brf file.

Now for the our reference animation & skeleton. Open ani_horse_mounted.brf from Warband's CommonRes folder. Inside there is only one animation, anim_horse, which has 866 frames. Right click anim_horse and select Add to reference icons. Then open horse_skeleton.brf, right click skel_horse and select add to reference skeletons. Now return to your icon_test.brf, highlight courser.lod2, select anim_horse in OpenBRF's animation button with skeleton set as skel_horse and click the > button to watch this animation. Then, with the same animation and skeleton selections, right click courser.lod2 and select convert into a vertex animation. You should now have a new mesh called courser.lod2_anim_horse of 555 frames - I don't know why all the frames aren't transfered, but it doesn't matter for our purposes.

Next, save icon_test.brf because OpenBRF can sometimes object to opening up a 555 frame vertex animation. Then right click on courser.lod2_anim_hourse and select Separate all frames. If OpenBRF crashes, close some of your other applications, reload OpenBRF and try again.

Now you'll see the individual frames listed in reverse order from 554 (top) to 0 (bottom). Delete frames 82 to 553. Next go to the bottom of the list and highlight frame0, then just using the up arrow run up the list and watch the animation unfold as frame replaces frame. That gives a better idea of which frames you want to choose for your vertex animation. The choice depends on whether you want your map icon to walk (0-30), trot (31-49), canter (50-66) or gallop (67-81).

Save your icon_test.brf and open map_icon_meshes.brf in Warband's CommonRes folder. Copy the knight_a mesh and paste that map icon into your icon_test.brf file. As with the infantry icon it only has 11 frames. There is no T-shaped frame, but frames 0 and 1 show the icon's horse at rest (stationary). We know frame 0 isn't used on the campaign map, but frame 1 is used when time is paused, which is why we retained frame 554. That leaves us requiring 9 motion frames.

To go with a trot, make the following vertical list in OpenBRF running from top to bottom in this order (using alt and arrow):

courser.lod2_anim_horse_frame554
courser.lod2_anim_horse_frame554
courser.lod2_anim_horse_frame31
courser.lod2_anim_horse_frame33
courser.lod2_anim_horse_frame35
courser.lod2_anim_horse_frame38
courser.lod2_anim_horse_frame40
courser.lod2_anim_horse_frame43
courser.lod2_anim_horse_frame45
courser.lod2_anim_horse_frame47
courser.lod2_anim_horse_frame49

OpenBRF doesn't care about the numbers, just their order. To check your animation looks smooth, highlight courser.lod2_anim_horse_frame31 and use the down arrow to run through your selection, watching it play out frame by frame. Then highligh all the frames in your selection, right click and select Merge as frames in a vertex ani. You now have an 11 frame vertex animation called courser.lod2_anim_horse_frame554, which you should rename my_map_icon_mount.2. The rest of the courser meshes/frames can be deleted (unless you want to reuse them for different speed mounts), then save your icon_test.brf.

Copy knight_a, and from the edit menu, paste timings onto my_map_icon_mount.2 to sync your horse to Warband's engine. You can check your animation by clicking OpenBRF's > button.


Now, we need to sort out our rider. First we need a reference animation. Open ani_human_mounted.brf in Warband's CommonRes folder, highlight it's only animation, anim_human_02, right click and select Add to reference animations. Next, return to icon_test.brf, highlight your rider, my_map_icon_mount.1, set the animation button to anim_human_02 with the skeleton button set to skel_human and press the > button.
Your rider is elevated to a saddle position with his legs straddling an invisible horse that's bouncing him up and down. So, with anim_human_02 and skel_human still selected, right click on my_map_icon_mount.1 and select Convert into vertex animation and save your icon_test.brf. This gives you a new mesh called my_map_icon_mount.1_anim_human_02 with 248 frames.


As we only need 11 frames, right click on my_map_icon_mount.1_anim_human_02 and select Separate all frames. However, each frame must be matched to our mount. Accordingly, separate all the frames of my_map_icon_mount.2 as well. Then highlight my_map_icon_mount.2_frame0 and with the control key depressed also highlight my_map_icon_mount.1_anim_human_02_frame0 to see how those frames compliment each other. You'll see the rider is too far back, clipping the saddle's cantle.


You can try matching other frames, but you'll find they're all slightly mismatched. So to correct this, highlight my_map_icon_mount.2_frame0 first and with the control key depressed also highlight my_map_icon_mount.1_anim_human_02_frame0 (second), right click, select Roto_translate_rescale..., check the tick box Apply to last selected object only and translate the z axis by 0.07 to reposition your rider in his saddle.
To keep all the rider frames in sync, highlight frames 1 to 247, right click, select Roto_translate_rescale..., unchecking the tick box Apply to last selected object only and translate their z axes by 0.07.

Make the following vertical list in OpenBRF running from top to bottom in this order (using alt and arrow):

my_map_icon_mount.1_anim_human_02_frame0
my_map_icon_mount.1_anim_human_02_frame0
my_map_icon_mount.1_anim_human_02_frame13
my_map_icon_mount.1_anim_human_02_frame15
my_map_icon_mount.1_anim_human_02_frame17
my_map_icon_mount.1_anim_human_02_frame19
my_map_icon_mount.1_anim_human_02_frame21
my_map_icon_mount.1_anim_human_02_frame23
my_map_icon_mount.1_anim_human_02_frame25
my_map_icon_mount.1_anim_human_02_frame27
my_map_icon_mount.1_anim_human_02_frame29

You could spend longer selecting better matches, but these will do. Highlight all these frames, right click and select Merge as frames in a vertex ani. You now have an 11 frame vertex animation called my_map_icon_mount.1_anim_human_02_frame0. Copy and paste Warband's timings from knight_a to my_map_icon_mount.1_anim_human_02_frame0 and save icon_test.brf.

Next, highlight both my_map_icon_mount.1_anim_human_02_frame0 and my_map_icon_mount.2, right click and combine meshes, giving you a mesh called my_map_icon_mount, which you should rename my_final_map_icon_mount to avoid confusion with WIP meshes and save your icon_test.brf.


Far from perfect, but good enough for a map icon.