Quick Reply
Search this Thread
Lab Assistant
#26 Old 7th Feb 2025 at 6:45 PM
Yes, exactly. If you're only interested in the animated rig, then you can export it as an FBX, and it should work.

Keep in mind that, for some reason, the scale in the export ends up being negative (-1). You need to check this and reset the transformations.

There are some issues with certain animations (especially with the hands and thumbs). Also, for some objects, some bones don’t receive animations. I can't figure out why.

AlexCroft - Custom Content Creator
STAY TUNED!
YouTube
Patreon
Test Subject
#27 Old 9th Feb 2025 at 6:31 PM
Quote: Originally posted by AlexCroft
Thanks to @anmar2 's work we can now finally export ts2 animations to blender (using unity) ! I'm trying now to retarget the animation to a sims 4 rig in order to export animations in the sims 4 (like the car get in animation). But it's a difficult process. Maybe @omglo can help us in this project reversing the current 4to2 animation retargeting (https://modthesims.info/showthread.php?t=637212.



How you import sims 2 animation into unity ?
Test Subject
#28 Old 11th Feb 2025 at 5:21 AM
Quote: Originally posted by ammar2
Hey all, if you've ever tried to export animations from sims 2, you'll know that they do this weird thing where they don't quite look right. This is because the animations use inverse-kinematics, the animators say where the hands/feet/head/etc should go and then the 3d animation program figures out how to move the limbs to make it happen.



In most games these inverse kinematics get "baked" into the animation files so the movement of each individual bone and limb is recorded. But unlike most games, Sims 2 uses these inverse kinematics in the final animations shipped with the game and the game engine runs the inverse kinematics as you play.


With that background out of the way, I was looking at reverse-engineering the animation format for OpenTS2 and figured out how these inverse-kinematics are set up. I haven't documented my findings but you can find some more information on the cAnimResourceConst scenegraph blocks here. With the inverse-kinematics part of the animations decoded, we are now able to play some animations from the game successfully! (Note that some animations where the hands should be pinned to objects etc still don't work well)



Since this is all done in Unity, we can actually export these animations to a format that can be imported into blender. There isn't currently a way to directly export from blender back to a sims 2 animation file without milkshape (I might make a plugin for that if I'm feeling bored). But you try to customize these animations or try to port them to future games. I have exported 10 base game animations to a .glb file available here: https://blog.ammaraskar.com/assets/...es/bakedSim.glb

If you're just curious, there is also an online model viewer available here where you can view them straight from your web browser.


What's cool is this web editor can also display other game assets, such as the reclining chair here.



Unfortunately the process to export animations fully-baked yourself will be a bit involved and need some know-how on Unity but hopefully some of you can get through it and help others out.

1. Grab and setup the OpenTS2 bake_ik_animations branch code from here https://github.com/LazyDuchess/Open...ile#development
2. Open the SimAnimationTest scene and type in the name of the animation you want

3. Right click the bakedSim and select UnityGTLF and then Export Selected as GLB


Thank you to @AlexCroft for bringing this up on the OpenTS2 repo here! https://github.com/LazyDuchess/OpenTS2/issues/59


How you import sims 2 animation into unity, I need this for my mod
Lab Assistant
#29 Old 4th Mar 2025 at 8:21 PM
I’m working on a way to import animations from .5an files into Blender without relying on Unity, using Ammar’s decoding as a reference.

Right now, the animation data is extracted and stored in JSON format, which is then imported into Blender to drive the rig. I’ve managed to fix the IK chain for the legs, and everything seems to be working fine there. However, the upper body is giving me some trouble—specifically, the clavicle rotates sideways instead of bringing the arms down along the Sim’s body.

I suspect there’s some kind of coordinate inversion at play. For reference, I imported the rig using @SmugTomato ’s GMDC importer. I’ve already tried swapping Y and Z values, but that didn’t fix the issue.

I know that the upper body has additional IK controls, but before I can work on those, I need to get the axis orientation right.

Does anyone have any ideas on how to resolve this? Any insights would be greatly appreciated!


Screenshots

AlexCroft - Custom Content Creator
STAY TUNED!
YouTube
Patreon
Lab Assistant
#30 Old 10th Mar 2025 at 6:30 PM
Ohh, cool! I've been looking into it too. So far I've 'translated' the code that parses the resource into Python, but not yet touched anything Blender related.

I'm not super familiar with their workings, but GMDC files have a section called "inverse transforms". From my understanding, they relate to the orientation and placement of joints. Maybe the plugin is importing that in a different scheme or something? You could try importing the body with DJAlex's more recent plugin instead, and compare the results.

I'm http://crispsandkerosene.tumblr.com/ on tumblr, admittedly not very active on MTS.
Test Subject
#31 Old 5th Apr 2025 at 5:32 PM
Quote: Originally posted by ammar2
Hey all, if you've ever tried to export animations from sims 2, you'll know that they do this weird thing where they don't quite look right. This is because the animations use inverse-kinematics, the animators say where the hands/feet/head/etc should go and then the 3d animation program figures out how to move the limbs to make it happen.



In most games these inverse kinematics get "baked" into the animation files so the movement of each individual bone and limb is recorded. But unlike most games, Sims 2 uses these inverse kinematics in the final animations shipped with the game and the game engine runs the inverse kinematics as you play.


With that background out of the way, I was looking at reverse-engineering the animation format for OpenTS2 and figured out how these inverse-kinematics are set up. I haven't documented my findings but you can find some more information on the cAnimResourceConst scenegraph blocks here. With the inverse-kinematics part of the animations decoded, we are now able to play some animations from the game successfully! (Note that some animations where the hands should be pinned to objects etc still don't work well)



Since this is all done in Unity, we can actually export these animations to a format that can be imported into blender. There isn't currently a way to directly export from blender back to a sims 2 animation file without milkshape (I might make a plugin for that if I'm feeling bored). But you try to customize these animations or try to port them to future games. I have exported 10 base game animations to a .glb file available here: https://blog.ammaraskar.com/assets/...es/bakedSim.glb

If you're just curious, there is also an online model viewer available here where you can view them straight from your web browser.


What's cool is this web editor can also display other game assets, such as the reclining chair here.



Unfortunately the process to export animations fully-baked yourself will be a bit involved and need some know-how on Unity but hopefully some of you can get through it and help others out.

1. Grab and setup the OpenTS2 bake_ik_animations branch code from here https://github.com/LazyDuchess/Open...ile#development
2. Open the SimAnimationTest scene and type in the name of the animation you want

3. Right click the bakedSim and select UnityGTLF and then Export Selected as GLB


Thank you to @AlexCroft for bringing this up on the OpenTS2 repo here! https://github.com/LazyDuchess/OpenTS2/issues/59





I have noticed that that some animation has facial expressions included. Does that mean that you can make your own facial expressions with the animations?
Mad Poster
#32 Old 6th Apr 2025 at 1:01 AM
Quote: Originally posted by FairChild
I have noticed that that some animation has facial expressions included. Does that mean that you can make your own facial expressions with the animations?


If it's animation extracted from TS2, it works a bit differently, as it calls on already made animations existing in the game files which already have face animations (made with EAxis' rig systems), not player-made animations (which currently lack the face morphing options since we don't have access to the full EA rig system).

There are some face overlays and face animations available in the game files, which have been extracted and put into poseboxes, and can be used as overlays for other poses/animations.
Test Subject
Original Poster
#33 Old 6th Apr 2025 at 6:23 AM
I have no idea what the state of importing stuff into blender is, but at least through the models exported from OpenTS2/Unity, they do have facial morphs. You can play around with them online if you follow the link I posted to view the models in the browser above: https://playcanvas.com/viewer?load=...es/bakedSim.glb



The problem is probably exporting it out back into sims2 anim files. Sadly I have very little free time right now but theoretically if AlexCroft/Azelanne are able to build off this work it should be possible to do animations with fully custom facial expressions.
Test Subject
#34 Old 15th Apr 2025 at 11:02 AM
How you guys add sims 2 animation like "a2o-exercisemachine-benchpress-start_anim" to unity like this ?
Screenshots
Test Subject
#35 Old Today at 9:12 AM
Quote: Originally posted by AlexCroft
I’m working on a way to import animations from .5an files into Blender without relying on Unity, using Ammar’s decoding as a reference.

Right now, the animation data is extracted and stored in JSON format, which is then imported into Blender to drive the rig. I’ve managed to fix the IK chain for the legs, and everything seems to be working fine there. However, the upper body is giving me some trouble—specifically, the clavicle rotates sideways instead of bringing the arms down along the Sim’s body.

I suspect there’s some kind of coordinate inversion at play. For reference, I imported the rig using @SmugTomato ’s GMDC importer. I’ve already tried swapping Y and Z values, but that didn’t fix the issue.

I know that the upper body has additional IK controls, but before I can work on those, I need to get the axis orientation right.

Does anyone have any ideas on how to resolve this? Any insights would be greatly appreciated!





You’re incredible. Since I can’t make OpenTS2 work in my Unity, I rely on your blender solution. I’m not an expert but maybe I could take a look at what’s going on. Also, I know this sounds silly, but ChatGPT has helped me A LOT on blender with python, so this might be worth a try…

I’m eager to see the finality of this either way ! 😍🥰
Page 2 of 2
Back to top