Replies: 20 (Who?), Viewed: 728 times.
Test Subject
Original Poster
#1 Old 29th Nov 2020 at 11:36 PM Last edited by Lori : 29th Nov 2020 at 11:55 PM.
Default How to resize the skeleton of an animated object?
Hello dear sim modders,

I am new to the whole mesh animation / bones & joints things and I would like to ask if someone can give me some advise. I am trying to make smaller pet birds like budgies by cloning the parrot from the pets EP and resizing it. The problem is: When I rescale the parrot mesh in milkshape, the skeleton is not rescaled. I tried many things to rescale the bones / joints but it did not work. However, if the bones are much larger than the mesh, the parrot animations do not work in game / it is stretched in a strange way and looks scary. Do you have any idea what I could do to get a smaller bird that uses the normal parrot animations?

I would be grateful for any help!
Mad Poster
#2 Old 30th Nov 2020 at 12:08 AM
You can't scale the skeleton that way and expect the animations to work. Most likely you'd need to build a new skeleton and make new animations (which is very difficult, especially for sims and pets - and it would be a massive job, if it's even possible. Not sure I've seen any edits like that for pets). The best way to deal with this issue is to find ways to work around the skeleton, making the mesh smaller where possible.
Test Subject
Original Poster
#3 Old 30th Nov 2020 at 1:47 PM
Thank you for your answer, simmer22!

It really surprises me that what I was trying to do seems to be impossible. I somehow thought that for the computer it should be no problem to run the existing animations on a modified skeleton that looks exactly the same as the original, just scaled down to a smaller size.

Can you please explain what in more detail what would be the problem? Rescaling a skeleton without breaking the animations in general? I mean, would it even be problematic to get the animations to run on a smaller skeleton in a 3D editor like Milkshape or Blender (without changing the animation itself)? Or would the problem be to get the smaller skeleton into the Sims 2 game without breaking anything?
Mad Poster
#4 Old 30th Nov 2020 at 6:35 PM Last edited by simmer22 : 30th Nov 2020 at 8:41 PM.
The closest you get to manipulate the skeleton of the "live" creatures ingame successfully is the stretchskeleton cheat, but it only works on human sims. If you've ever used the cheat, you might have noticed that the smaller or larger you make the sim, the weirder the animations get. That's what happens if you try to scale the skeleton. As for the animations, they come one by one, or are paired with sim animations (but still one by one). And there's quite a lot of animations.

You can't really modify the ANIM files in TS2, and you also don't have any access to the original full rigs, only the skeletons (so no targets or IK or any of that, meaning it could be very difficult to fix the interactions - Blender does allow for setting up IK rigs, but I'm not sure how well it would work for a project like this), and a lot of the animations that involve object-to-sim animations (sim interacting with bird, for instance) often cause errors ingame if they can't find the target object, so I imagine the testing stage would be quite fun...

TS2 doesn't have a way to scale animations, because it's not how the skeleton and the animation controls work in TS2. It has to do with how the rig is put together. TS2 sims and pets work with morphs, which are known for being extremely sensitive, and so is the CRES (which is the rig control center in the files), so whenever you start messing about, you can be unfortunate and run into a whole heap of issues. Birds have several morphs (mostly the wings) and a lot of animations (interacting with adults and kids, flying, in the cage, etc.). Making something simpler, like an animated deco object or something with a door to be opened, is possible (even that can be a challenge), but this could be on the level with "making a smaller baby".

If you do scale something in Milkshape, as I understand it, the skeleton usually needs to be fixed bone for bone in the CRES. And the original animations can't be scaled. You actually have to make new ones, for the bird and for the sims (maybe not all of them, and some may only need a few adjustments, but I do imagine some would need an overhaul, depending on how small the bird was in comparison).

The easiest is to retexture and not care about the size. If that's not acceptable, the best option is to worok around the skeleton and make it smaller where you can, but even that can be a challenge. I have seen a few slightly bigger birds (bigger is often easier because you can build over the skeleton easier than shrink it), but not a lot of smaller ones.
Lab Assistant
#5 Old 30th Nov 2020 at 11:56 PM Last edited by Azelanne : 1st Dec 2020 at 12:37 AM.
As simmer22 said, you can edit an object's skeleton by manually changing its bones' coordinates in the CRES. You'd need to reference the skeleton resized in Milkshape (or Blender, etc) to determine what their new positions should be. Obviously, quite time consuming and likely tricky.

(For example, the 'Breast' bone's data in the bird's CRES. Its position, the values under 'Translation', is relative to its parent bone, which is 'Spine'.)

Animations are somewhat editable, though the UI for it is crappy. They're not something you can really resize. Most of the joints in tS2 skeletons only do rotations, meaning they'll animate the same regardless of their position in space*. You might need to alter the anims of "*_trans" (translation) bones if they're moving too far, though. But I'd resize the skeleton beforehand.

(The animation editor. Here I am looking at what the 'head_trans' joint does during one of the bird's idle animations. At the selected keyframe, it moves '36' along the Y axis (forward/backwards), and '-19' along the Z axis (up/down).)

So all in all, resizing the bird is theoretically doable but a lot of work and trial and error. You'll definitely want to familiarise yourself with not only Echo's custom skeleton and animation tutorials, but how 3d animation works in general.

I'm on tumblr, admittedly not very active on MTS.
Mad Poster
#6 Old 1st Dec 2020 at 12:51 AM Last edited by simmer22 : 1st Dec 2020 at 1:16 AM.
There's something like 20 different animation cycles linked to the birds, some for the birds and some for the sims interacting with them. And the bird has a lot more joints/bones than I thought it would (plus morphs for feathers - probably for tucking in the wings VS flying or showing off in the cage). Those feather balls are complicated little tykes. No wonder people most often make clones of the hamsters when they make small pets...

In theory this could be possible (kind of, though I do have doubts), but if it is it likely would end up being an extreme amount of work and a lot of trial and failure, especially if you haven't worked with animations or skeletons before. Pretty much expect it to be very difficult and very far from a beginner level.

One option could be to try and make an animated deco bird, but with fewer joints (might be a bit more manageable, and a way to learn more about animated objects). You could borrow some animations from the aquarium or ant farm for the sims as interactions and view options (how to use ingame animations, and edit BHAVs and pie menu options). Could be a way to familiarize yourself with the various things you'll need, and maybe you'll learn the things you need to tackle the bigger project.
Test Subject
Original Poster
#7 Old 1st Dec 2020 at 2:42 AM
Okay, thank you a lot for your explanations! That helped me to understand better how animations in the Sims 2 work. I never thought that it would be that difficult to do this. Now I understand why nobody has done this before

I have seen that in the Sims 3 and 4 there are cheats or mods to rescale animated objects. That's why I thought it might also be unproblematic in the Sims 2. It's sad that the Sims 2 is much more difficult to mod than 3 and 4 (at least when it comes to animations).

Yeah, seems like it's best to try to rescale the bird mesh just a little bit around the skeleton and see how small it can get without making the animation look weird. It probably won't be much, as the animated wings look weird very quickly when rescaling the bird.

Out of curiosity I'd like to ask a question about the CRES in your first picture, Azelanne. Do the translation values of the joints in the CRES determine how long the bone is? So, if I just went through all of these values and divided them by two, I would have the smaller skeleton, because now each bone would be only half as long, right? But that would not solve my problem, because the translations in the animations don't match the smaller skeleton size, so it would still look bad, right? Just to make sure I that I understand you correctly

Thank you again for your helpful explanations!
Mad Poster
#8 Old 1st Dec 2020 at 5:45 PM
Let me introduce you to birdie.

Excuse its lack of "bones" or "joint connectors". The sim skeletons have been properly linked up with a joint/bone hierarchy so we can use them for clothes and animations (I think it's part of the Milkshape plugins), but anything else gets extracted as just "joints" and don't really connect, so making animations with any of this without first fixing the hierarchy would really be pointless. These joints don't properly rotate as if they are connected, at least not in Milkshape.

I don't know if you can extract non-sim meshes and get a perfectly built hierarchy in Blender, though (I know there are plugins for a couple Blender versions, but haven't tried them out much because there seem to have been a few issues with some of them).

(The first picture is back view, with the morphs removed).
Lab Assistant
#9 Old 1st Dec 2020 at 11:01 PM
Originally Posted by Lori
Out of curiosity I'd like to ask a question about the CRES in your first picture, Azelanne. Do the translation values of the joints in the CRES determine how long the bone is? So, if I just went through all of these values and divided them by two, I would have the smaller skeleton, because now each bone would be only half as long, right? But that would not solve my problem, because the translations in the animations don't match the smaller skeleton size, so it would still look bad, right? Just to make sure I that I understand you correctly

Pretty much, yep.
I did some testing and it turns out a resized bird with the original skeleton looks fine when it's not animating. It's the animations that need editing. It took a lot of trial and error, but I managed to fix the bird's head movements during its "idle-breathe" animation. In the end, I had to multiply the forward/backwards movements by 3, but leave the up/down values unchanged.
Additional discovery: in the CRES, Z values control the up/down axis; Y controls the forward/backwards axis with negative values moving the bone backwards. In the animations, it's the Y that is up/down; negative values in Z move the bone forward not using the same coordinate system, woo.

You can export the proper skeleton hierarchy by using the Milkshape 3D ASCII format, but it won't export the morphs. Echo's custom object anim tutorial uses another method , but I'm not familiar with it. The proper hierarchy of the sim skeleton is indeed built into the Unimesh plugins.
(Since the Blender plugin is open source and fairly straightforward, other meshes' skeleton hierarchy data could be coded in, though. Something to consider for my own work on it.)

I'm gonna second Simmer22: creating a simpler skeleton and new animations is the best alternative. I'm a sucker for a parakeet, but this isn't the most entertaining work haha.

I'm on tumblr, admittedly not very active on MTS.
Mad Poster
#10 Old 2nd Dec 2020 at 2:24 AM
Scaling animations is usually the problem, yeah... If you've ever seen the kids doing adult animations, or toddlers doing kid animation, or sims using Stretchskeleton with a much too low number, you kind of get a feel of how much fixing is needed.

You can probably cut the morphs to make the project "easier" (morphs tend to scale the difficulty level quite a bit, especially for objects), but it's probably still going to be quite difficult and tedious.

Echo's tutorial shows how to DIY a skeleton/hierarchy for custom animations.

Do you know if there is a tutorial somewhere on how to fix/import a hierarchy with the ASCII? Or basically how to fix hierarchies for sim meshes in Milkshape?
#11 Old 2nd Dec 2020 at 2:29 AM Last edited by omglo : 2nd Dec 2020 at 3:01 AM.
IIRC, when I was linking the joints for the infant Sim skeleton, I found that the hierarchy given by the milkshape ASCII was not the same one used for animation, so I had to reorder them. The ASCII exporter also doesn't give you the bone comments that you need for WesHowe's animation plug in, so you have to add them by hand once you start making animations. Echo's tutorial explains how to do it. I'd definitely recommend following Echo's tutorial if you want to build your bird skeleton from scratch.

I wish I knew enough about coding to create an animation exporter for blender. Milkshape is so limited.
Mad Poster
#12 Old 2nd Dec 2020 at 2:43 AM
Ah... Sounds like a big job, then.

Still haven't gotten around to test if the infant skeleton works fine for animation (not sure if you tested it) but thought I'd do a couple tests later this week. I have a few ideas... Would've been fun to have the bird and a couple other items with hierarchies, though.
#13 Old 2nd Dec 2020 at 2:43 AM
@simmer22 importing the hierarchy with the Milkshape ASCII is easy. You just open the GMDC, click export then choose Milkshape 3D ASCII exporter from the dropdown. When you import it into milkshape, the jointed skeleton will be there. There's no tutorial for reordering them, as far as I know. You have to open the CRES to get the animation bone order, open the ASCII file in notepad and edit it. There's a clear pattern to it that you'll see when you look at the file. Then you have to go through and fix the comments. I never figured out the math on how to do them correctly though, so I just put neutral numbers in.

There's a few details in this thread, which is all I've ever found on the subject.

ETA: yes, I did a few test animations with the infant skeleton, but I never put it through a rigorous process, so there could still be issues with it.
Mad Poster
#14 Old 2nd Dec 2020 at 3:05 AM
There looked to be a couple stray bones that moved a bit weird compared to the other rigs (either the ROOT bones or the auskel or something along those lines), but not sure if it's going to affect the animations in any way. I guess I'll figure it out.

I had a look at the seemingly endless ASCII list I got from the bird, and my brain went *nope* so maybe not today. Perhaps at a later point. :/
Test Subject
Original Poster
#15 Old 2nd Dec 2020 at 11:04 AM
Wow, that sounds complicated. So the wrong bone order is the reason why animations exported from SimPE don't work in milkshape (when I tried it, there was some movement but everything looked like a total mess), right? So if one fixes the bone order, would that mean that the original animations exported from SimPE would also work in milkshape? Or, if that's not the case, what's the motivation for changing the bone order in the ASCII file?

Also, very strange that the y and z axes are switched in the cres and in the animation... One would assume that at least during the sim packages it should be consistent!
#16 Old 2nd Dec 2020 at 5:18 PM Last edited by omglo : 2nd Dec 2020 at 5:33 PM.
Originally Posted by Lori
Wow, that sounds complicated. So the wrong bone order is the reason why animations exported from SimPE don't work in milkshape (when I tried it, there was some movement but everything looked like a total mess), right?

No, that's a different issue. The reason exported animations don't work in milkshape is because most animations are IK animations. Milkshape, a rather primitive program, doesn't support IK, so it discards the majority of the animation data, leaving you with something that's basically useless.

The reason for changing the bone order in the ASCII file is that the game uses bone order and not bone name to determine which bones to move in the animation. For example - you want to make a kick animation, so you import an ASCII skeleton and you look in the joint list, find the r_thigh bone and rotate it. It happens to be the sixth joint in the list. But then you test it in game, and the spine0 bone rotates instead. Because the game isn't looking for r_thigh when it moves the bone, it's looking for joint_05 (the joint count in the CRES starts with joint 0, so joint 5 would be the sixth one). And in the CRES, the sixth joint spine_0, not r_thigh. So, in animation, you have to start with a skeleton that matches the CRES.

Animation can be really complicated, and even when you spend a lot of time on it, the results can be imperfect because we're still using 2006 tools that are quite limited. I'd start by doing Echo's animation tutorial. It'll teach you a lot. I don't know how comfortable you are with 3D programs, but I'd recommend using Blender to animate, once you reach that point. You can then export your results as a Milkshape file, then use the AniMesh tool to get the anim to the game.
Mad Poster
#17 Old 2nd Dec 2020 at 6:25 PM
I've never bothered using Milkshape for animations. Poses, yes - animations, no. You don't really get anywhere without IK or tuning tools. The animations look clunky, go too slow or too fast, and keep passing through sims or objects.

Blender has pretty much everything you need for animation (it's basically everything you need to make a 3D animation movie wrapped up in one free program, though maybe not the easiest program to learn), but I'm not sure if anyone has made working rigs with IK for TS2 yet. I vaguely remember seeing some rigs, but can't remember where. Probably saved a link, and if those rigs were downloadable I probably have them too, but I'm really bad at remembering where I've put things...
#18 Old 2nd Dec 2020 at 6:52 PM
There are working IK rigs for TS2 to use in Blender, but as long as Milkshape is still a step in the TS2 animation process, we're still not going to be able to fully take advantage of inverse kinematics or get great results from editing game animations.
Lab Assistant
#19 Old 2nd Dec 2020 at 7:17 PM
Just gonna add the link to those templates. Their creator told me they used the .smd format to transfer their animation to Milkshape.

(Also: maybe I should make a new thread discussing the additions of skeleton data to the Blender plugin?)

I'm on tumblr, admittedly not very active on MTS.
#20 Old 2nd Dec 2020 at 9:49 PM
I'd be interested in that thread for sure.
Mad Poster
#21 Old 2nd Dec 2020 at 11:08 PM
I remember those, yes... Thanks for the link (I've probably mislaid the files somewhere - Pretty sure I downloaded them, put the files in an "important" folder somewhere, and forgot where I put that folder. My Project folders are a huge mess ).
Back to top