Saving Space - am I missing something?

Level 12
May 9, 2009
I want to use another ghoul model in my map for an extra skin but the file size is huge (277kb). I thought I'd be smart and trim the model down by removing the lumber geoset, material, and texture along with all of the lumber animations and the victory animations by deleting them in the sequence manager (since they are not needed for me) but after I was done I only saved 6 kb (271kb)... :ogre_rage:

Surely all that stuff should be worth more than 6 kb... Did I do something wrong or miss a crucial step I am unaware of?
Level 28
Jul 29, 2007
Let's do some math.

That model has a total of 1198 vertices, each vertex is made of (3 + 3 + 1 + 2) * 4 bytes.
That's 43KB.

There are 987 faces, each of which is 4*3 bytes.
That's 12KB.

There are 131 matrix groups, each one is most likely 4 or 8 bytes, so not a big deal.

There are 4423 keyframe tracks.
Now the size of keyframe tracks can vary quite a bit. The smallest track is 5 bytes, the biggest track is 52 bytes.
Most of the tracks tend to be either translations, or rotations.
Translations can be either 16 bytes (none, linear) or 40 bytes (bezier, hermite).
Rotations can be either 20 bytes (none, linear) or 52 bytes (bezier, hermite).

So, as you can see, most of the size in this model is in the keyframe tracks.
That is because this model has many nodes (70 bones and 37 helpers, which in fact by themselves take about 11KB).

Now, assuming you don't want to start removing nodes and remaking the model, and you just want to remove sequences that you don't need, you'd need to also step through all of the nodes and remove all tracks that existed in the sequence.
Since there is no automated tool that does this, it's going to be quite annoying for you.
If you are going down this road, I highly suggest you to do this in text format, and not in a GUI (such as Magos).
If you know your way around text editors and regular expressions, you can actually do the whole job in one replace command (if you don't, you are free to ask how to do this, or even better, learn how to use regular expressions).

Good luck.
Level 28
Jul 29, 2007
Don't be discouraged, you can remove whole ranges of keyframe tracks with a single replace command, it's just a matter of knowing how to write the replace query (and using a decent text editor that supports regular expressions).


For example, if you want to remove the Stand sequence, or in other words, every keyframe track between 3333 and 4333, something like this should work:
(3[3-9]\d\d|4[0-3]\d\d): .*(?:(\n.*(InTan|OutTan).*){2})?
This might seem like gibrish, but honestly, everyone should learn how to use regular expressions, they are a great tool.
Last edited: