B Info Other MiniTailMod: a Case Study about Extra Bones in Skeletons V 4.0

Currently viewing this thread:


Sergeant Knight
Short story: I made a little test about adding bones to skeletons, and it works real nice.

I'm sharing it, so that any other modder can reproduce it.
No python source code is needed: this mod only modifies BRF files of Native (plus skeleton_bodies.xml).

So, introducing...


What it is:

MiniTailMod is a tiny, demonstrative toy-mod which just adds a long squirrel-like animated tail to every character (basically just a test). 

So basically MiniTailMod is a an experiment in moddability.

Download and install:

Download from M&B Repository: [link] (35MB) [UPDATED to 4.0, now tail animation are far better]
It's for warband!
Just unzip into WarBand module folder.

Details on how it was done:

1- added a two-boned tail to the human skeleton (emanating from the abdomen bone).
2- added the metadata for these two bones in skeleton_bodies.xml
3- completed every single human animations in native to make it move the two new tail-bones too (*)
4- edited all (or most) native boot models, to make it include a tail rigged to the two bones (**)
5- added and edited hitboxes for the tail, in OpenBRF

(*) Editing animations
All human animations from vanilla were moved into a single BRF file, for convenience. They were then augmented to include the "fixed" tail bones with the [reskeletonize animation] tool of OpenbRF. Then, I needed to make the two bone move in whichever way, during all animations. I did this with ad-hoc tools I coded in for the purpose.
As a 1st test, the tail was set to replicate the movements of one arm (before ver 3.0).
In ver 4.0, I constructed tail movements in a smarter way: basically they empathize whatever the spine is doing in the same animation. They look almost decent, to be constructed automatically. An skilled animator, manually editing tail movements in each animation, could sure do a far better job.

(**) Editing and adding rigged tail

The idea is to give every character a tail by embedding it in the boots (not the armor): this way any character will have one no matter the armor used.  Note that in M&B (and WB) boot models can include parts rigged to any bone, not just feet and calfs (a trick which I used in TLD as well). In another test (not shared), I tried adding the tail to body armors instead, or to naked bodies, and that works too.

I made an unrefined tail model (it's basically a reshaped tube, also lacking textures, fur, etc); remember this Mod is just a proof of concept.
However the tail is nicely rigged (entirely on the two tail bones). The rigging is very smooth: vertices go smoothly from being linked to the first to being linked to the second. That way the tail will bend smoothly without any sudden angle. This was achieved using the [smooth rigging] tool of OpenBRF, several times in succession. The tail was then Lodded (using the OpenBRF autoLodder) and pasted into all native boots models using the [edit]=>[Paste into mesh] tool of openBRF (to quickly add the tail lods to the corresponding boot lods).

Previews (OpenBRF), and in-game

You can preview the animated tails in OpenBRF. Just open the BRF files inside [resuorces] module folder. Make sure you use the latest version of OpenBRF (at least 0.0.74).

Details: in the Mini-Tail-Mod folder, there's a "reference.brf" file for OpenBRF, which includes a "skin" model complete with tail, and animations+skeleton also complete with tails: newest versions of OpenBRF know to automatically use the content of that file (instead of the default one in OpenBRF folder), in order to preview any item inside that module.

To see the animated tail in-game, just run the mod. Anyone with a pair of boot (barring a few ones) will have the tail.

Version history:

V 1.0: First version out: tails weren't animated. My mistake: I accidentally added tails with no rigging. Thanks to [cmpxch8b] for noticing where the problem was.

V 2.0: Fixed that: first version which did work.

V 3.0 Added hitboxes... at first sight, it seems that the game engine is considering tails (i.e. the hitboxes tied to the extra bones) as having damage-multiplier and an armor-rating just like any other normal part of the body. Blood works normally on tail too.
Rag-dolling too (but ragdolling parameters for tail-bones could be added for improved effect).

V 4.0 Update: much better, more natural tail animations (ad ad-hoc blend, extrapolation, exaggeration of the way various spine bones move).

A knife stuck into a tail -- ouch!





Grandmaster Knight
Aww man! Thanks a lot for trying this. I really wish it had worked out better. I guess I'll just be stuck with static tails...

I might download this and try some things out, but I'm not sure what I would do that you haven't. Are there any non-essential bones that the animations could survive without? I suppose that would be too much to hope for.


Sergeant Knight
Mandible said:
Aww man! Thanks a lot for trying this.

don't worry, it was rather quick.

Mandible said:
I guess I'll just be stuck with static tails...

One can hope in future official M&B/WB versions, or further [enanched] versions

Mandible said:
Are there any non-essential bones that the animations could survive without?

Feet, maybe? Especially if your humanized animals have legs like these of cats or dogs, i.e. without much of a foot (anatomically, what looks like a calf is their foot). Naturally that would take to swap the bone indices not only in all animations, but also in any rigged object of the game. And one would have to keep its finger crossed that the bone connections are read from the BRF skeletons, not hardwired.

PS: yes I've been an admirer of Lugaru and am an awaiter of Overgrowth too.

PS2: the trick of placing the tail to the "boots", even if it is a rigid tail (so that it can be detached from the rest of the outfit) can be used anyway. Too bad that naked pair of calfs are not "boots" -- they are not even rigged.


Grandmaster Knight
Rats, that closes a lot of options.

Anyhow, there may be a wee bit of  flex:  there are up to 4 bones that can probably be safely re-tasked for a lot of humanoids- the feet and the largely-superfluous shoulder bones. 

It might be interesting to find out if they can be moved around without too much trouble; in particular if the bone's roots can be altered for those four without causing trouble.
I haven't tried this or anything, but the shaders have a hardcoded limit of matrixed bones



When I first saw this line I thought:
"Wut?, why 32, there are only 20 bones in warband?"
But setting this value down to 20 or even 30 gave me very strange rigging errors.

Did you try to set this value highter and compile the shaders?
Changing that won't work, engine is hardcoded to SetMatrixTransposeArray for exactly 32 matrices.

mtarini, you say the tail should replicate the movement of the arms, so I assume you rigged it to the arm bones. But if I check rigging data in Warband, I can't find it. Even simpler, rigging color in OpenBRF doesn't show anything on the tail. Is that intended or did you just forget to rig the tail? :razz:


Sergeant Knight
Really? Is it possible that I mistakenly used the wrong model?

[checks quickly]

edit: OH MY!!!!

It was a bug in the newly added "Copy into mesh" command of OpenBRF, it got rid of rigging!!!

So when I copied the tail into all the boots, it cleared it rigging!
I have tons of things to do but I want to check if that works now!

edit: IT DOES!


Grandmaster Knight

32 bones is enough to... hmm... 12 bones is actually enough for a humanoid character, no problem.

Too bad that so many of the bones require explicit references for other things engine-side; that's almost a way around some major issues.  Almost.


Sergeant Knight
Updated first post, and added screenshots.




I plan to make a small tutorial here about how to do each step.

And this is just a funny image from the WIP: all the animations used in the game in one big shot:

(you should see that moving!)



Sergeant Knight
Updated the mini-mod at the M&B resource page (link on 1st page).

Edit: note that the tail is animated, in this test, by copying whatever the left arm did in the same animation, so will not behave very much like a tail. But it could in principle move in any way.


Sergeant Knight
Update: added hitboxes (using the OpenBRF hit-box editor) -- works seamlessly too (good job, TW).

Update file in repository (link 1st post)


At first sight, it seems that the tail (i.e. the hitboxes tied to the extra bones) has a damage multiplier just like any other normal of the body. Blood works normally too.


Vincenzo said:
haha, I see a furry mod coming  :grin:

There has been a furry mod in the works for quite some time




Grandmaster Knight
Is it possible to use shaders to make it look like fur?

"HHHMMM!!" *Bruumppp* "UUMMMM!!" *poot* "Ah... Pull it out! pull it out! pull it ooouuut!"


Sergeant Knight
I updated version 4.0 of the mini-tail-mod.

The link changed, because I accidentally deleted the entry and made a new one.

New link: http://www.mbrepository.com/file.php?id=3519

In the new version, all the tail animations look much better
(the prev version was just random, to test if the tail could be moved in any way).

Details: they are computed as an exaggeration, accumulation, interpolation of what other spine bones do in the same animations.

For all that's holy, I was looking for someone to do that.

How I managed to stay so long without seeing this thread?

I made a bone rigged cape animation some time ago, with 2 bones protruding from the torso for each side of the cape.

The results were not that good, but I imagine that 6 bones for the skirt and 6 for the cape would turn the rigging process for those parts less painstaking for the first and actually possible for the last.

I must read more careffuly the whole thread and understand better what has been made, then I'll be glad to help.

Bravo, mtarini, bravo.
Top Bottom