Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Alchemist
Original Poster
#1 Old 14th Oct 2009 at 2:40 PM
Default Clip -> SMD conversion
I have been working on animations for TS3. So far, I have succeeded at one thing in TS3 I did not get done in TS2, and that is importing a game animation into any external program.

I wrote a program that converts animations from the game from the native format (CLIP) to SMD files (this is the popular Valve/Half-Life format), which can then be loaded into MilkShape or fragmotion. It isn't ready for public testing yet, nor is there a converter yet to convert the SMD files back so they can be used in the game.

But one step at a time.

Picture:

If you like to say what you think, be sure you know which to do first.
Advertisement
Ms. Byte (Deceased)
#2 Old 14th Oct 2009 at 5:30 PM
Cool as a moose! I foresee big developments from this.
Scholar
#3 Old 15th Oct 2009 at 2:24 AM
Yay! This has made me very happy lol Really, my whole day is brightened now.

I can only anticipate when the tools are available to import custom animations into the game.
Test Subject
#4 Old 16th Oct 2009 at 5:38 AM
Woah! Awesome!
Retired Duck
retired moderator
#5 Old 16th Oct 2009 at 9:06 AM
*applauds loudly and enthusiastically* :D
Test Subject
#6 Old 18th Oct 2009 at 10:26 PM
wow! I like this maybe someday we can have livestock!!!(horses, cows etc...)
Scholar
#7 Old 19th Oct 2009 at 11:17 AM
I have a question regarding the exporter--do you plan on creating sims 3 anim exporter/importer for Maya or 3ds Studio Max? The Biped Studio in Max creates such fluid movement.
Alchemist
Original Poster
#8 Old 19th Oct 2009 at 2:24 PM
Right now I am working on an SMD format converter, the first half of which (Game->SMD) is working, and pretty well.

I don't use Max, but I believe that there is a set of plugins "Cannonfodder" that support SMD. There is a plugin set for Maya from Valve, although I had trouble making it work on a recent version. Fragmotion and MilkShape both support SMD well, and their files interchange well. That is good, because animations are quite difficult to just port around.

At this time, I don't think the Blender SMD plugin supports animations.

If you like to say what you think, be sure you know which to do first.
Scholar
#9 Old 19th Oct 2009 at 3:25 PM Last edited by Jasumi : 19th Oct 2009 at 3:40 PM.
I see. Thanks for the reply.

These plugins are actually a bit more up to date for newer versions of Max.
Lab Assistant
#10 Old 20th Oct 2009 at 6:22 AM
Wes, you are super awesome full of win and candy!

Has my painting been helping you with your investigations in any way?

Also, when you're finished with the code, maybe I can use it to start working on a combination clip/jazz editing program that replicates that sugar-coated graph UI we saw in the Behind-The-Scenes video.

Quote: Originally posted by dixie_blue012000
wow! I like this maybe someday we can have livestock!!!(horses, cows etc...)


If there really is going to be an alligator object in the first expansion pack like that one article said, that may come sooner than you think. That will certainly be a very interesting object to look at.

Unfortunately, this means making custom objects with custom animations, and currently only those with the money to afford 3DS max can edit an object's RIG.
Alchemist
Original Poster
#11 Old 20th Oct 2009 at 3:26 PM
Creating a new object and custom rigs are not on my current agenda. What is on the agenda is performing the file conversions that will allow existing animation tools to be able to edit animations and create new animations by copying and editing existing ones.

Using your painting to trigger an animation is a part of my testing plan. I am not there, yet.

If you like to say what you think, be sure you know which to do first.
Alchemist
Original Poster
#12 Old 21st Oct 2009 at 8:54 PM
I managed to get an animation into and SMD file and then back into the game. As you can see, it needs some work, although most of the issues are because the frames include joints that are not a part of this animation, like the thigh_compress joints.

But ugly or not, it's my latest baby


If you like to say what you think, be sure you know which to do first.
Lab Assistant
#13 Old 22nd Oct 2009 at 2:01 AM
Wow Wes, you're making such quick progress with animations. The machinima makers will certainly be pleased with this.

So, the clip files contain information about all bones in a sim's rig, or just random bones you wouldn't expect to be part of the animation?

If it's the former, this may explain why younger sims' bodies stretch when executing animations meant for older sims, instead of floating in the air like they did in TS2.

The animation is telling where to position ALL joints in a sim's body, even if those positions don't change from the initial key frame.

The child's joints are positioned where the adult's joints would be, and their bodies stretch along with those joints.

Either way, this is very good because it means that inverse kinetic animations are finally possible, and we can stretch our puddings like taffy.

Speaking of IK, what about data for IK joints in objects sims handle? Have you found anything along those lines yet?
Alchemist
Original Poster
#14 Old 22nd Oct 2009 at 4:47 AM
Some quick answers.
The game file format is much like SMD, at least at the higher logical level. All bones in the animation have at least one translation and one rotation, but do not have the heirarchy information like an SMD file does, and are split into separate instances. The first frame is the initial pose, and would be why the adult animations stretch the child bodies (and vice versa). Subsequent translations and rotations only occur for frames, per bone, that have some movement. As you would guess, bones are referenced by the hash value of their names.

Fairly standard parent-relative pos/rotation values are used, except the rotations are quaternions and not euler angles. We have Tiger to thank for researching the data compression formats.

The animations, while they contain the IK data for the arms and legs, appear to be "fully baked", meaning the arm and leg FK joint pos/rot values have been calculated and are in the animation.

The animations are overlays, but in the demo I still have some head bones and compress bones that have no movements in the animation, and they come out wrong. I am revising the rigging tonight... it is defined in an external text file so it can be adjusted. Besides the issues with the RIG files being hard to read, it is only necessary to rig the bones that need movements... because they are parent-relative, for example, when you move the arm all the hand bones automatically move with it, like your real arm. Once the hand is positioned like you want, the fingers need not be moved unless a gesture is being made.

I am gauging interest right now, but I have two fairly stable converter programs written, a CLIP->SMD and a SMD->CLIP one. With them, and the right rigging work, you should be able to make a round-trip edit of an animation. I have loaded the anims into MilkShape and fragomotion, but the Valve plugins for Maya have not performed well. I don't have 3DS Max to test with.

Oh, and I executed that animation by using your painting mod and packaging the CLIP as a replacement animation. I told you it would be useful for you to make that, it just took a while to get my object mesh tools stabilized so that I could pay more attention to the animation stuff.

If you like to say what you think, be sure you know which to do first.
Lab Assistant
#15 Old 26th Oct 2009 at 2:53 AM
Progress :D

You are amazing Mr Howe lol, keep us updated!

EDIT: If I could get you 3DS Max 9 Wes, would that be helpful? I don't know how to get it to you though because it's 800mb... unless we use a remote desktop which I don't particularly mind.
Alchemist
Original Poster
#16 Old 26th Oct 2009 at 4:25 AM
I would not use 3DS unless I had a license for it. I cannot be writing and distributing software for an unlicensed program, it would be wrong, as well as legally dangerous. I may one day become a legal owner of 3DS, but the fact that they do not have a "hacker" license and I have not been a student for a really long time, so I can't get the student discount. That would leave me having to pay the same price as the professionals.

However, having a commercial license would mean little, because I am not a professional artist... heck, I am not even a good hack artist. I just write software.

As for an update, I am testing here now... I have a program shell that looks a lot like the ObjTool written, and when I am satisfied that it is useful, I plan to do a public test, like I did with the Object meshing tools, starting with an "experimental" release.

No doubt that there will be bugs to expunge, but I won't release it until I am happy it performs at least some work as advertised. Given that I have already had some success, that may not be too long for you guys (and gals) to wait.

If you like to say what you think, be sure you know which to do first.
Lab Assistant
#17 Old 26th Oct 2009 at 4:56 AM
Fair enough, it's probably legally dangerous even if I own the license...

Looking forward to the tool!
Test Subject
#18 Old 26th Nov 2009 at 4:11 AM
she looks like she's melting and throwing her hands up in pain
hahaha
but good job
i can't wait to see what you create
Alchemist
Original Poster
#19 Old 26th Nov 2009 at 5:19 AM
The animation that is playing is named "chessTable_set_x" and is one of the sequences used when playing chess.

I did finish the tool, and upload it here:
http://modthesims.info/showthread.php?t=375945

I show how to make an avi fron an animation using a sim model in this thread:
http://modthesims.info/showthread.php?t=377440

If you like to say what you think, be sure you know which to do first.
Back to top