PDA

View Full Version : Making Additional Animation Rigs


WesHowe
4th May 2011, 06:40 AM
7 Steps to a New Look

Thanks to the MTS user mesher, there is a usable MilkShape rig for making poses and animations, those that have been making pose packages will undoubtedly already be familiar with it. Some have asked for an adult female rig, but that was not really what I started out to do today, it just ended that way. I am attaching two .rar archives to this post, a female mesh rigged for animation that uses the mesher skeleton (and rigfile), and a pair of MilkShape plug-ins (SkinWgt Export and SkinWgt Import) that I used to make it.

I will describe the process for you to do this yourself; not a real tutorial, but a set of steps. You need to be familiar with working with MilkShape and Sims 3 meshes to do this, but not really a whiz. What we are going to do is strip the old mesh off a skeleton and replace it with another, while keeping all of the skin weights intact by stripping them and restoring them separately.

You start by making a whole body mesh. That is not easy, you have to find all of the face parts, which include the eyeballs, the eyebrows and the teeth as well as the face. You load those plus a body or top/bottom combo, a hair mesh and some shoes or feet from the game files, so that you have a complete Sim. Once you extract those parts, you load them one after the other with the GEOM plug-in. Don't worry about comments and such, you can't export the mesh for use in the game this way, just the animations.

When you have that all looking good (you will need to tweak vertices at the edges of the face to make them fit) and then saved as a MilkShape file (.ms3d) you can do the rest of this pretty easily.

1. Load your nice new mesh. In the groups list, go one-by-one and select each group with your mouse and then click the select button. You want all of the meshes to be selected or stuff will fail later.

2. Go to Export, then Wavefront, and save all of this with a name (and in a location) you will remember. It will save with a .obj file type.

3. With my new plug-ins installed, you go to File, then export, and find the SkinWgt Export plug-in. Save it with a name and at a location you will remember. It will save with the extension .txt.

4. Now open a copy of either the mesher adult rig for animation, or the one I have attached here (based on his work). Ignore any save warnings, if you see them, we have what we need for the next steps saved as a .obj and a .txt file. We are after the skeleton in this step.

5. After you get the mesh loaded, go to the groups panel and one-by-one select each group and then click on delete. At the end of this step you should have just a skeleton showing (you may have to click on show skeleton in the groups panel to see it).

6. Now go to file, then import, then Wavefront and import the mesh you exported in step 2.

7. Then go to file, import and use the SkinWgt Import plug-in (that was attached to this post) to bring in the saved skin weights from step 3.

OK, that's it. Save your new animation rig mesh with a new name (assuming you got no errors during the process). You can test the rig by entering Anim mode in MilkShape, selecting some joints and then making sure the parts that rotate or move are what should rotate or move based on what you selected.

The reason this process is complicated is that the skin weights are associated with each vertex on the mesh, but they reference the joints by the order they appear on the list in the joints panel. The skeletons used by the GEOM plug-in and the mesher rig have a different count and order, but these SkinWgt transfer plug-ins get around that by matching the joints by name, and building a table that reorders the references as the weights are restored. A beautiful solution that only a programmer would appreciate.

I would like to thank mesher for making the proper rig file for animation that I failed to do; also I would like to thank orangemittens for the testing help, and Delphy for graciously providing all the panties needed.

<* Wes *>

BloomsBase
4th May 2011, 10:51 AM
When you have that all looking good (you will need to tweak vertices at the edges of the face to make them fit) and then saved as a MilkShape file (.ms3d) you can do the rest of this pretty easily.

You mean that the face needs a perfect fit to the scalp?(afscalplod0 will not fit and needs tweaking but afscalplod1 has a proper fit.)
Most hairmeshes are floating above the head(not attached), is that a problem?

This is all pretty new to me but is this the best skeleton to use when tweaking existing animations?

Thank you for these, fiddling with it right now. :)

Edit,
Works great, had no errors
Just a noob question, dont you need to also include the 83 slots when making new animations?

WesHowe
4th May 2011, 03:46 PM
If you don't fit the face, where needed, then that is OK, so long as you want to see a gap there. This is more about the artist that the game, because the animation export is all about the skeleton, and what moved where and when. But you need to be able to visualize the results, so to the extent a different model will help someone, then great. I chose the female I made this from carefully, as one suitable for general purpose use. But with the tool, someone could pick a different one and build that to their liking.

There are two different tutorials on animations. Both work, one uses the IK chains to generate animations on the lower limbs, the one deletes them to avoid errors and uses FK on the lower limbs. But follow just one or the other until you know the process full well. Individual slots are only used in specific game animations for special purposes, usually involving another Sim or an object. We aren't to that level in this process, at least not yet.

<* Wes *>

BloomsBase
4th May 2011, 06:08 PM
thank you, really fun to play with :),
I could not convert a clip file(a_female_Walk) to smd with your Animtool, using the female Rig file but it did work with the one from Mesher
This means i also have to use his Rig in Milkshape? I used yours in Milkshape but the clip was messed up when i wanted to import it back in s3PE.(prolly because i used 2 diffrent rigs in the process?)

Is it it even possible to make a small edit to a existing game animation and put it back in the game as replacement?
you know i want dancing boobies during normal walk and in Milkshape its looks awsome :D

the slots are also funny to work with, after adding all slots and joints to Delphy's Bonedelta editor you can scale and move them using a slider file
I can add these to your adult_Rig file myself?

mesher
4th May 2011, 07:45 PM
DAMNED !!! :rofl: I just wasted half of the morning trying to elaborate a way to extract the vertex weights from MS files !!!!

This plugin is really welcome, thanks a lot, i will play with it now !

A beautiful solution that only a programmer would appreciate :beer:

orangemittens
4th May 2011, 08:34 PM
thank you, really fun to play with :),
I could not convert a clip file(a_female_Walk) to smd with your Animtool, using the female Rig file but it did work with the one from Mesher
This means i also have to use his Rig in Milkshape? I used yours in Milkshape but the clip was messed up when i wanted to import it back in s3PE.(prolly because i used 2 diffrent rigs in the process?)

Is it it even possible to make a small edit to a existing game animation and put it back in the game as replacement?
you know i want dancing boobies during normal walk and in Milkshape its looks awsome :D Base I was able to successfully convert that clip with the new female rig by Wes and mesher's txt without difficulty and it's playing in MS with no problems on the girl rig. Is that what you tried? ...or do you mean with your own txt file?

It should be possible to make edits to existing game animations...select operate on selected joints only and only the joints you've selected will be changed. I haven't put one in-game like this yet but it's working in MS for me.

WesHowe
4th May 2011, 10:14 PM
I just wasted half of the morning trying to elaborate a way to extract the vertex weights from MS files !!!!


I sort of thought your old #5 file had been the victim of passing through MilkShape Ascii. That format was never updated past single-weighted assignments, but it does easily expose the joint data for editing.

Anyone is welcome to use those plug-ins for fixing any sort of mesh... they are not really Sims 3 specific. While I admit things like the face joints can be problematic, because it matches by name, some edits to the names in the intermediate file could help transfer meshes between different games.

<* Wes *>

mesher
4th May 2011, 11:42 PM
I sort of thought your old #5 file had been the victim of passing through MilkShape Ascii.

:up:
Wes,

Yes, i was studying the MilkShape SDK to try to adapt the asc exporter and get the Vertex Weights.
Your new plugin works like a charm, and i quickly rebuilt both MS files to express the vertex weights.

--------------------

Now, I want to talk about the grannyrig or gr2 file ...

There is a program named grannyViewer on radtools download page. One year ago i used it to extract the data to create the rig file. As far i remember, it was needed to strip some bytes from the beginning of the file ( a grannyrig file extracted with s3pe, renamed to .gr2). So grannyviewer opened the file and I copied the data.
BUT now i guess that the app was updated, and i can't open the files anymore, i receive a CRC check fail message.

You and rothn knows the way to extract the data from granny files. It would be great a tool that extracts infos about the rig from this files, exposing the hierarchy, position and rotation of all bones. With this data we could paste a correct mesh over almost any rig on the game, helping to animate it.

:beer:

cmomoney
4th May 2011, 11:49 PM
...I'd like to be able to duplicate the IK setup. :D

orangemittens
4th May 2011, 11:58 PM
I'm not sure if this is what you're looking for mesher, but you've seen Atavera's wrappers right?

WesHowe
5th May 2011, 01:11 AM
BUT now i guess that the app was updated, and i can't open the files anymore, i receive a CRC check fail message.


The auRig, cuRig and puRig all have an extra data block on the beginning of the .gr2 file. I forget the exact details, but there is some longword at the start, and a length, and some data. Skip ahead and you will see the magic bytes that identify the .gr2 file (all of the object mesh rig files are only .gr2 data, and should open in GrannyViewer).

So all I do is open them in HexEdit, select all of these extra, non-RAD game data bytes, and hit the delete key, then save with a .gr2 extension.

Rothn and Atavera have done much more work with the .gr2 files than I have. I used the GrannyViewer to determine the essential skeleton parts, rotations and positions long ago. But yes, if you extracted the joint position/rotation data and placed it in a rigfile, you should be able to convert object animations to/from CLIP files. Underneath the hood, they are just move/rotate keys on specific joints.

If you use meshes imported with my MilkShape plug-ins, the joint positions there are sometimes inaccurately positioned, somewhere I am doing a double-negation, and they are not in a hierarchy. I do not read the game RIG files (I gave up on trying to reverse-engineer them) but the joint absolute positions are in the MLOD file, which is where the data came from. But the up axis is different, and my code sometimes flips them when trying to correct that.

<* Wes *>

WesHowe
5th May 2011, 01:24 AM
...I'd like to be able to duplicate the IK setup. :D

Actually, I was working on that for Maya when I got hung up about the need for better skin weighting and wrote those other plug-ins. I have a mostly functional Maya<->MilkShape plug-in I made for Maya that imports all the mesh data and exports that plus basic animation data (joint position/rotation keys), and now I have a decent skinned mesh. Or maybe I could use the SMD format to export the animation, although that is not a format that ships with Maya, so I would have to find or write a script or plug-in.

What I plan to do to try to replicate that functionality is to make a good IK rig on the skeleton with Maya's FBIK, and constrain the game IK joints to those controllers, so that the position of the IK joint follows the controller, which will follow the Maya IK controller. At least, that is my plan. I would think Blender, too, has an IK system, and some sort of point or parent constraints that would do that.

<* Wes *>

BloomsBase
5th May 2011, 02:44 AM
Base I was able to successfully convert that clip with the new female rig by Wes and mesher's txt without difficulty and it's playing in MS with no problems on the girl rig. Is that what you tried? ...or do you mean with your own txt file?

It should be possible to make edits to existing game animations...select operate on selected joints only and only the joints you've selected will be changed. I haven't put one in-game like this yet but it's working in MS for me.

Yes, thats wat i tried
exported the clip from fullbuild with s3PE
Booted Animtool and choose clip to smd
Browsed to the clip and loaded it
Got message rig file was missing so browsed to the (original) female rig, loaded it and got the error.

Did the whole process again but this time i choose Meshers rig wich gave no errors.
Since this isn't really related to this thread can i ask other questions in your Tutorial thread?

Editing the animations themselves aren't a problem, did that with sims 2 already :)

orangemittens
5th May 2011, 03:02 AM
When you say orginal female rig do you mean the one from way back or the one Wes has posted now? I didn't try this particular clip back then but I can tell you it is working with his new rig.

You're more than welcome to ask questions in my tutorial thread Base...although I'm not sure how what you're asking is off topic here. You're talking anim & rigs and that's what this thread is about as far as I can tell. Wes knows more about that than I do.

BloomsBase
5th May 2011, 03:43 AM
No, i used the one from this thread(Unedited)
Ill give it another go, i do often have problems when a particular file is still open in s3PE(not be able to edit it with another program at the same time)
Maybe that causes the error

edit,
figured it out, placed the Animtool and all other related files in the same directory
Animtool was on a diffrent HD

On the the smd import question: Do you want to append the animation at the end of the current animation do i click yes or no?
And on the smd export: Reference or sequence? (on Roth tut i saw sequence)

I left the clip name as 3sPE exported it, same with the conversion to smd but this is wat i get when reimporting it back in the package:

Error reading resource 6B20C4F3:00000000:2B48A2573B70148B Front-end Distribution: 11-0402-0951 Library Distribution: 11-0402-0951 Source: mscorlib Assembly: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Het doel van een aanroep heeft een uitzondering veroorzaakt. ---- Stack trace: bij System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) bij System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) bij s3pi.WrapperDealer.WrapperDealer.WrapperForType(String type, Int32 APIversion, Stream s) bij S3PIDemoFE.MainForm.browserWidget1_SelectedResourceChanged(Object sender, ResourceChangedEventArgs e) ---- Source: s3piwrappers.AnimationResources Assembly: s3piwrappers.AnimationResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Event type: 478 not implemented ---- Stack trace: bij s3piwrappers.ClipResource.Event.CreateInstance(Int32 apiVersion, EventHandler handler, ClipEventType type, Stream s) bij s3piwrappers.ClipResource.EventList.Parse(Stream s) bij s3pi.Interfaces.DependentList`1..ctor(EventHandler handler, Stream s, Int64 size) bij s3piwrappers.ClipResource.EventList..ctor(EventHandler handler, Stream s) bij s3piwrappers.ClipResource.EventTable.Parse(Stream s) bij s3piwrappers.ClipResource.Parse(Stream s) ----

cmomoney
5th May 2011, 04:27 AM
What I plan to do to try to replicate that functionality is to make a good IK rig on the skeleton with Maya's FBIK, and constrain the game IK joints to those controllers, so that the position of the IK joint follows the controller, which will follow the Maya IK controller. At least, that is my plan. I would think Blender, too, has an IK system, and some sort of point or parent constraints that would do that.

<* Wes *>
Yea, that's exactly what I was trying to do.

WesHowe
5th May 2011, 05:37 AM
On the the smd import question: Do you want to append the animation at the end of the current animation do i click yes or no?
And on the smd export: Reference or sequence? (on Roth tut i saw sequence)


I can't help on the S3PE error. [old man mutters about that new-fangled dot-net stuff] :)

Normally you do not want to append the animation, although if you have no keys set it will yield the same result. Otherwise, what you are importing will come after what is already there... which is fine if you are adding animations together, but will spoil things if you are working with a single animation clip... and for a pose, well a pose is just frame 1, so that would be absolutely wrong.

Sequence is the right choice. Reference will spit out the mesh data instead of the animation only.

<* Wes *>

orangemittens
5th May 2011, 06:39 AM
Base did you use the export and rename option? It's unclear to me why you're getting error from the wrapper if all you're doing is exporting CLIP, converting to .smd, and then overwriting. Is that all you did?

BloomsBase
5th May 2011, 06:54 AM
Thank you
I did a simple test loading a basegame clip in a package with a small edit on the duration.(done with s3PE's grid)
It made it corrupt and didn't work ingame, guessing you can not change or edit the existing animations.

@Orange, yes, but i did not rename it since i want to edit the original file and make it a replacement
I am using s3PE 64bit version, that should not make a diffrence?(the 32bit version doesn't show the grid on clips)

cmomoney
5th May 2011, 12:23 PM
Changing/editing the existing animations is possible. I'm sure because at first that is all we could do. Though I'm not sure about editing the duration in grid, that is possibly what corrupted the clip. And the 32bit version does show the grid on clips. Maybe you don't have the CLIP wrapper installed on that version.

ssproductions
5th May 2011, 03:25 PM
This is so awesome. Thanks again Wes :)

Regarding the IK chains, it would be beyond awesome if they could be set up in the rig. Currently I use the Ik bones (foot offset controllers mainly) to animate the legs but because they aren't linked to the legs in Milkshape I have to guess what the leg animations will look like in game. It's not too difficult as I can figure out angles, distances and the natural range of motion without problems but it would be awesome to have this visual reprentation of the IK movements in something like Blender or Maya, or any 3d software that supports IK chains :) I wish I had the knowledge and experience to do this.

mesher
5th May 2011, 03:53 PM
I'm not sure if this is what you're looking for mesher, but you've seen Atavera's wrappers right?

OMG :!: This is new for me, and it does what i want, better than i want . Thanks a lot.
-----------------------------------
Wes,

I´m and old grumpy pigheaded guy ... so i tried do build the a MS plugin to extract the vertex weights, just for learning purpose. Ehehe, i almost went to crazy, up to figure out that the 1st bone index is stored on msVertex.nBoneIndex, not in msVertexEx.nBoneIndices[0]. :faceslap:
Yes, MS is so gimmicky ...

Your Maya plugin is highly expected here.

BloomsBase
5th May 2011, 04:39 PM
Changing/editing the existing animations is possible. I'm sure because at first that is all we could do. Though I'm not sure about editing the duration in grid, that is possibly what corrupted the clip. And the 32bit version does show the grid on clips. Maybe you don't have the CLIP wrapper installed on that version.

uh, i dont think i have a clip wrapper installed in either of the versions..... :rolleyes:
Is it a seperate download?

orangemittens
5th May 2011, 05:00 PM
Here Base:

http://code.google.com/p/s3pi-wrappers/downloads/list

WesHowe
5th May 2011, 05:20 PM
Your Maya plugin is highly expected here.

That would be interesting, thanks for the feedback. I need a lot more testing here, but I feel like this is a doable project. Last night I rigged up the skeleton with Maya's FBIK (which is easier to use than the HIK rigging) and point constrained the world offset to the hips and the foot offsets to the feet. Setting keys on those instead of the leg joints should replicate the types of motions "SS" (do you have a name?) shows in his video. The Maya FBIK rig includes IK on the arms, spine and head, that all comes with the package, but it appears that FK keys will need to be set on most of those joints. Fortunately, it's pretty easy in Maya to set up a custom shelf with buttons to key sets of joints.

But I haven't yet got to the game-testing point yet, as more work is needed on my plug-in.

As for MilkShape, it is the easiest package I know of to hack out a quick special plug-in, even though, or possibly because, it lacks many data types and support for many common 3D features (like IK). The extra weights are totally a hack, Mete added them that way so that old game plug-ins did not break, and Sims 2 was the first game to be able to use them... interestingly enough, the Torque game modders got there second, and used the Sims 2 UniMesh BoneTool to adjust their weights with. But because it is so much easier to work with, I can prototype things in it, and much of what I learned about the game file formats was done using MilkShape as a research tool, and those efforts were then polished a little and released as plug-ins.

<* Wes *>

BloomsBase
5th May 2011, 09:26 PM
Here Base:

http://code.google.com/p/s3pi-wrappers/downloads/list

Thank you!
There is so much modding stuff arround, i lose track :)

Edit,
Oh, I did install the update already with Atevera's plugin....

orangemittens
5th May 2011, 09:49 PM
Np. Are you saying you were already current on your wrappers and helpers and can't open CLIPs in Grid? I apologize but I can't be sure what you mean from your post above.

BloomsBase
6th May 2011, 12:03 AM
You can change some settings on a clip using s3PE's grid, i changed the duration with but it made the clip corrupt.
Would you be willing to take a look or try to import the clip in the original a_female_walk.
I used Wes his rigfile both in the Animtool and in Milkshape.
Its the ms3d file, need to delete the meshes

orangemittens
6th May 2011, 12:58 AM
Base I opened your mesh in MS, exported/renamed the walk Clip you specified, converted to smd and imported that to MS. It's playing there according to plan, I think, based on what you said above. I saved that and converted it back to a Clip which I packaged and put in-game and played with animation player.

I see why you're trying to change the duration...she's moving pretty quick. However, the detail you added is not showing up in game. When you tried to change the duration did you do it with a test of something you know will work or did you try it on an experimental type Clip?

I'm not sure loading your new animation into the mesh like that is the way to go if you're trying to create a default replacement. Have you tried just exporting that CLIP without renaming, changing that to an smd, animating the smd how you've animated this, converting that back to a CLIP, packaging and putting it in your mods folder? That might work a little better than what you're trying here although I can't be sure...the only default replacements I made were played using the CM painting so they weren't trying to override the Clip in Fullbuild0.

WesHowe
6th May 2011, 02:28 AM
I'm not sure changing the duration without changing the number of frames is a valid operation. You need to spread the action across more frames if you want to slow it down. There is a 'Scale Animation' plug-in in the tools menu that should do that for you.

<* Wes *>

ssproductions
6th May 2011, 05:07 PM
That would be interesting, thanks for the feedback. I need a lot more testing here, but I feel like this is a doable project. Last night I rigged up the skeleton with Maya's FBIK (which is easier to use than the HIK rigging) and point constrained the world offset to the hips and the foot offsets to the feet. Setting keys on those instead of the leg joints should replicate the types of motions "SS" (do you have a name?) shows in his video. The Maya FBIK rig includes IK on the arms, spine and head, that all comes with the package, but it appears that FK keys will need to be set on most of those joints. Fortunately, it's pretty easy in Maya to set up a custom shelf with buttons to key sets of joints.

But I haven't yet got to the game-testing point yet, as more work is needed on my plug-in.


<* Wes *>

That would be awesome, Wes. The name is actually Alex (yeah, I know :faceslap:) but most people refer to me as SSP or SS. If you need testers for Maya I can probably do this. I don't have Maya myself but have access to a computer that does. I won't be able to use it all the time but probably frequently enough. I've never used Maya though, but I'd never used Milkshape before either, I'm not afraid to research and experiment. I'll be making animations for my series so they will have a practical application.

WesHowe
7th May 2011, 01:29 AM
Well, I just asked for a name because it seems more personal than "hey you SS". I remember now that you used Alex on your video for the character.

I don't particularly want to 'pimp' particular programs. Blender is powerful, but I don't have a lot of experience with it. So is 3DS Max, but I don't have a recent version of it, and I am at the point where I know I cannot be the master of very many things, certainly not both.

Maya itself is pretty pricey for a full commercial license, but they have some very liberal terms for it for students, although I think you have to prove the student status. You can get a limited term license for free, or a permanent one for less than 1/10 the regular price. I suppose some of the choice you make would depend on what you plan to do in the future. 3DS Max, Maya and Softimage (XSI) are widely used by professionals and at game and movie studios, so if your long-term plans include working in those fields, well then you might want to master one or more of them as a step in that direction. Blender has a wide following, but is not used much at big studios, although I have seen some smaller ones using it.

Anyway, I don't work lightning fast, I just plod along a step at a time, so it could be more than days before you see anything. OTOH, I can be a bit of a bulldog when I choose to tackle something.

Oh, one more thing popped to mind. The errors you are getting from MilkShape are because you are using version 1.8.4 instead of the 1.8.5 beta. 1.8.5 added an extra data field in the skin weights extension, so you are probably not going to get the same smooth weights with 1.8.4 that were put into the newer base rigs that mesher and I uploaded, since that section of the file is what doesn't get loaded into 1.8.4. I know 1.8.5 says beta, and Mete is late on producing the final version, but I believe he is working on it actively at the moment. Oh, and he liked your video, too. While he isn't a 'Sims 3 modder' he is a game modder from 'way back' and thought it was cool (and was surprised that the Sims 3 game supported IK in the engine).

<* Wes *>

atavera
7th May 2011, 01:44 AM
Dunno if this helps with creating an IK-enabled rig, but my s3pe plugin for the rig shows the S3-specific IK data. It is pretty straight-forward, 5 chains total(arms,legs, and one for root), the bone names are looked up by their index in the gr2 part.

This is the text-dump it gives for auRig
Unknown01: 0x00000000
Unknown02:
00000000000000000000000000000000
Ik Chains:
==Ik Chain[0x00000000]==
Unknown01: 0x00000000
Unknown02:
0000000000000000000000000000000000000000000000000000000000000000
IkPole: L_armExportPole
IkPoleRoot: b__L_Clavicle__
SlotExport: L_slotInfo
SlotExportRoot: b__ROOT_export__
SlotExportOffset: L_slotOffset
SlotExportOffsetRoot: b__ROOT_export__
ExportJoint[0]: L_Info1
ExportJoint[1]: L_Info2
ExportJoint[2]: L_Info3
ExportJoint[3]: L_Info4
ExportJoint[4]: L_Info5
ExportJoint[5]: L_Info6
ExportJoint[6]: L_Info7
ExportJoint[7]: L_Info8
ExportJoint[8]: L_Info9
ExportJoint[9]: L_Info10
ExportRoot: rootWorld
Unknown04: 0x00000000
Ik Links:
==Link[0]==
Unknown01: 0x00000010
End: b__L_UpperArm__
Start: b__L_Clavicle__
==Link[1]==
Unknown01: 0x00000018
End: b__L_Forearm__
Start: b__L_UpperArm__
==Link[2]==
Unknown01: 0x00000020
End: b__L_Hand__
Start: b__L_Forearm__
==Ik Chain[0x00000001]==
Unknown01: 0x00000000
Unknown02:
0000000000000000000000000000000000000000000000000000000000000000
IkPole: R_armExportPole
IkPoleRoot: b__R_Clavicle__
SlotExport: R_slotInfo
SlotExportRoot: b__ROOT_export__
SlotExportOffset: R_slotOffset
SlotExportOffsetRoot: b__ROOT_export__
ExportJoint[0]: R_Info1
ExportJoint[1]: R_Info2
ExportJoint[2]: R_Info3
ExportJoint[3]: R_Info4
ExportJoint[4]: R_Info5
ExportJoint[5]: R_Info6
ExportJoint[6]: R_Info7
ExportJoint[7]: R_Info8
ExportJoint[8]: R_Info9
ExportJoint[9]: R_Info10
ExportRoot: rootWorld
Unknown04: 0x00000000
Ik Links:
==Link[0]==
Unknown01: 0x00000010
End: b__R_UpperArm__
Start: b__R_Clavicle__
==Link[1]==
Unknown01: 0x00000018
End: b__R_Forearm__
Start: b__R_UpperArm__
==Link[2]==
Unknown01: 0x00000020
End: b__R_Hand__
Start: b__R_Forearm__
==Ik Chain[0x00000002]==
Unknown01: 0x00000000
Unknown02:
0000000000000000000000000000000000000000000000000000000000000000
IkPole: L_legExportPole
IkPoleRoot: b__L_Thigh__
SlotExport: L_footInfo
SlotExportRoot: b__ROOT_export__
SlotExportOffset: L_footOffset
SlotExportOffsetRoot: b__ROOT_export__
ExportJoint[0]: L_footInfo1
ExportJoint[1]: L_footInfo2
ExportJoint[2]: L_footWorld
ExportRoot: L_footWorld
Unknown04: 0x00000000
Ik Links:
==Link[0]==
Unknown01: 0x00000010
End: b__L_Thigh__
Start: b__Pelvis__
==Link[1]==
Unknown01: 0x00000018
End: b__L_Calf__
Start: b__L_Thigh__
==Link[2]==
Unknown01: 0x00000020
End: b__L_Foot__
Start: b__L_Calf__
==Ik Chain[0x00000003]==
Unknown01: 0x00000000
Unknown02:
0000000000000000000000000000000000000000000000000000000000000000
IkPole: R_legExportPole
IkPoleRoot: b__R_Thigh__
SlotExport: R_footInfo
SlotExportRoot: b__ROOT_export__
SlotExportOffset: R_footOffset
SlotExportOffsetRoot: b__ROOT_export__
ExportJoint[0]: R_footInfo1
ExportJoint[1]: R_footInfo2
ExportJoint[2]: R_footWorld
ExportRoot: R_footWorld
Unknown04: 0x00000000
Ik Links:
==Link[0]==
Unknown01: 0x00000010
End: b__R_Thigh__
Start: b__Pelvis__
==Link[1]==
Unknown01: 0x00000018
End: b__R_Calf__
Start: b__R_Thigh__
==Link[2]==
Unknown01: 0x00000020
End: b__R_Foot__
Start: b__R_Calf__
==Ik Chain[0x00000004]==
Unknown01: 0x00000001
Unknown02:
0000000000000000000000000000000000000000000000000000000000000000
IkPole: NULL
IkPoleRoot: NULL
SlotExport: Root_info
SlotExportRoot: b__ROOT_export__
SlotExportOffset: rootOffset
SlotExportOffsetRoot: b__ROOT_export__
ExportJoint[0]: RootInfo1
ExportJoint[1]: RootInfo2
ExportJoint[2]: rootWorld
ExportRoot: rootWorld
Unknown04: 0x00000000
Ik Links:
==Link[0]==
Unknown01: 0x00000008
End: b__ROOT_bind__
Start: b__ROOT__

mesher
7th May 2011, 05:58 PM
{removed comments, due a hard fail on logical thinking}
-------------------------

Thanks to atavera foir bringing my attention to the the info about IKs in the Rig files.

WesHowe
8th May 2011, 02:45 AM
I am still digesting this. MilkShape is pretty much hard limited to 255 joints.. 0xFF (the 256th bone) is reserved to unassigned status. And all current and past version may have some auxiliary functions (like bone color) that may crash on rigs with more than 128 joints. The good news is that Mete (Mr. MilkShape) has gone through all his code and made sure that 255 joints will work, although some of the old plug-ins may not (many of those were not written by him, but were donated by other users).

All of my tools should work up to 255 joints, too. Updating the count would not be a big issue, but the limit it is where it is because of the MilkShape bottleneck.

'pole' joints are usually a part of the IK setup and are used to help prevent unwanted reverse bending and joints flipping. It does not surprise me that the foot offset is what you found controlling the feet. If there is not a similar hand offset then there is probably no support in the game IK for the arms. I would think slot offset is for the placement of objects, and that may well be the purpose of some of the other joints, like all the info joints. Hard to tell from the outside, surely someone at EA knows, but they aren't telling us detailed stuff like they did for Sims 2.

<* Wes *>

atavera
8th May 2011, 02:58 AM
The names I gave those fields may not be entirely clear/accurate, but the values are. Also worthy of note is the order of the IK chains in the rig, they match up to the Actor/Slot pairs of the CLIP.

Funny thing, when swapping the arm IK chains with the legs:

http://imageshack.us/clip/my-videos/88/v6v.mp4/
(note: the animation was not in any way altered, only the order of the IK chains in the rig)

mesher
8th May 2011, 05:33 AM
MilkShape is pretty much hard limited to 255 joints.. 0xFF

And you are correct again. I removed the case study above to avoid confusion, several bones on that animation was not working as expected.

I did a quick try on max, using IK Limbs solver.

http://imageshack.us/clip/my-videos/846/lak.mp4/

Only one bone is animated, R_footOffset.

After reading this publication (http://www.autodesk.com/techpubs/aliasstudio/2010/index.html?url=WS73099cc142f48755-3d114b7511841aefa9f-5552.htm,topicNumber=d0e125765) I started to understand the pole concept. This is new to me, it's not used on Max's IK Limbs solver, that is a "2 clicks solution", easy but limited.

WesHowe
8th May 2011, 06:45 AM
I'm not a professional animator, but I see a 'knee pop' which I think people fix by adjusting the pole vector. I am plodding along here at my usual glacial pace, so I have nothing worthwhile to show. But based on prior posts you have made, some from a year or so ago, as well as my observations of Alex's work, I am thinking that it may not be necessary to actually create a perfect replication of the Game IK in Maya or Max or Blender to be able to use the game IK and to be able to visualize the results outside the game.

I only have a very old version of Max, and I hardly ever use it except sometimes to convert .max files, so I am not good with it. But in Maya I have used a solution called FBIK, which is adapted to the female character I uploaded, which is your skeleton, my old mesh as modified with the skin weight transfer plug-ins. The matching is done by using joint labels, which allowed me to associate all of the relevant body joints with specific standard bipedal joint names, but leaves the actual joint names the same as they are in TS3. I know Max has a CAT setup and a Biped setup, that may be similar. Or maybe you just have to add IK with the IK Limbs solver.

In Maya I took the two foot offsets and the world offset and use what in Maya is called a 'point constraint' on them with the offset option enabled, and constrained the offset joints to the two feet and the hips. The point constraint, used with the offset enabled, causes what is constrained to follow the moves of the 'driver' exactly, but always the same distance away as it was when you set it up. So in the world offset case, the joint stays at 0,0,0 until the hips move. If the hips move down, the Y value decreases (Maya is either Y up or Z up, I use Y up always, same axes as MilkShape). Hips move left some amount, world offset moves left (-X) the same amount.

EDIT: Perhaps I need a parent constraint instead so that the rotations get copied to the joints, I'll have to test this.

With the IK setup in Maya, if I move the hips down, the feet stay on the floor, in that case the world offset has moved -Y, the foot offsets have remained at 0,0,0. This appears to replicate what I saw Alex do in his video. I have had to reinstall some stuff to get organized to test all this, as I had changed computers since I wrote a lot of this stuff and had not done any Sims 3 modding since the computer swap. And I still have the Maya<->MilkShape process under development. But I plan to set keys on the offset joints, which have been moved the appropriate amounts by the constraints. That should be the equivalent of what Alex did in his video, except done while being able to see the character pose, not just guessing as he was forced to do by MilkShape's functional limitations.

All the rest of the body has IK on it, and FBIK has these various IK setups integrated such that you could grab an arm effector and pull it down and forward, and you would get leg bending, spine bending and spine and hip twisting. Now while we probably cannot directly export those movements as IK to be interpreted by the game, that is not a problem because all you would do is key the appropriate FK joints and that should capture the motions. So user manipulates IK, IK manipulates the skeleton, and the keys are set on the skeletal movements.

I am not sure that using the game IK would really be necessary to make good animations easily, as you can essentially just make the poses and then bake all the IK to the joints, but it looks like it would be fun to explore (as you are doing).

<* Wes *>

cmomoney
8th May 2011, 03:01 PM
Now while we probably cannot directly export those movements as IK to be interpreted by the game, that is not a problem because all you would do is key the appropriate FK joints and that should capture the motions. So user manipulates IK, IK manipulates the skeleton, and the keys are set on the skeletal movements.

This is true. I've done this with the upper body, IK added to the arms, and it gave very smooth and fluid results.

ssproductions
8th May 2011, 04:28 PM
Well, I just asked for a name because it seems more personal than "hey you SS". I remember now that you used Alex on your video for the character.

I don't particularly want to 'pimp' particular programs. Blender is powerful, but I don't have a lot of experience with it. So is 3DS Max, but I don't have a recent version of it, and I am at the point where I know I cannot be the master of very many things, certainly not both.

Maya itself is pretty pricey for a full commercial license, but they have some very liberal terms for it for students, although I think you have to prove the student status. You can get a limited term license for free, or a permanent one for less than 1/10 the regular price. I suppose some of the choice you make would depend on what you plan to do in the future. 3DS Max, Maya and Softimage (XSI) are widely used by professionals and at game and movie studios, so if your long-term plans include working in those fields, well then you might want to master one or more of them as a step in that direction. Blender has a wide following, but is not used much at big studios, although I have seen some smaller ones using it.

Anyway, I don't work lightning fast, I just plod along a step at a time, so it could be more than days before you see anything. OTOH, I can be a bit of a bulldog when I choose to tackle something.

Oh, one more thing popped to mind. The errors you are getting from MilkShape are because you are using version 1.8.4 instead of the 1.8.5 beta. 1.8.5 added an extra data field in the skin weights extension, so you are probably not going to get the same smooth weights with 1.8.4 that were put into the newer base rigs that mesher and I uploaded, since that section of the file is what doesn't get loaded into 1.8.4. I know 1.8.5 says beta, and Mete is late on producing the final version, but I believe he is working on it actively at the moment. Oh, and he liked your video, too. While he isn't a 'Sims 3 modder' he is a game modder from 'way back' and thought it was cool (and was surprised that the Sims 3 game supported IK in the engine).

<* Wes *>

Thanks. It's definitely a possibility that I can hold of a student version of Maya. I'll look into that.

I also can take a while to do things, I don't get as much time as I'd like to work on the fun stuff like the series. Sometimes I don't get the chance to work on anything for days, so I'm in the same boat.

I plan to get a copy of 1.8.5 of Milkshape. It's really awesome that people like Mete are developing software that's accessible to most. It's cool that he's a game modder. That explains all the various import and export options. And it's really awesome he liked the video :) Another successful Sims 3 custom animation has been made because of all your mod tools. They followed my tutorial and it worked. I'm hoping to see many more custom animations developing over time.

It really helps with animating that Sims 3 supports Ik chains. It makes it so much faster to do and results in smoother more natural animations.

ssproductions
8th May 2011, 04:51 PM
This is a very interesting read. I wish I knew more about it though. It was a case of trial and error for me as my knowledge is limited at present. I also noticed the left and right slot offset bones/joints and tested them in Milkshape but nothing happened in the game. During my early testing I also got some weird and funny results like Atavera, usually because I accidentally used the opposite foot offsets.

I noticed something very interesting though when testing the Animation Player. I looped 4 animations, two from EA and two custom. The last custom animation involved the sim ending up sitting on the floor. When looping, the sim stood up naturally afterwards and continued with the looping sequence of animations. The game somehow interpolated this and animated the sim from a seated to standing position. My animation did not have the sim standing up again from the floor position. The final keyframe was with him still sitting on the floor. It's really cool that the game does this, as numerous interesting things can be done depending on the order of the animation sequence.

BloomsBase
8th May 2011, 05:05 PM
@OM, the clip is already in the file :)

orangemittens
8th May 2011, 09:03 PM
I think I misunderstood you Base...I thought you had said that CLIP was corrupt so I wasn't sure what you were wanting someone to test. I'm still thinking though that you should be able to create a default replacement for that walk CLIP by following the typical way of making one (but without renaming the CLIP) and then packaging that and putting it in your mods folder. Have you tried that?

WesHowe
8th May 2011, 09:35 PM
The game somehow interpolated this and animated the sim from a seated to standing position.

This is typical of game animation systems. 'tweening applies from frame to frame, per joint, regardless of whether the frames actually came from the same animation. So your last frame had the sim seated, and the first frame of the next animation had the sim standing. I don't know the timing details, but the game just applied interpolation between the last and first frames.

So a long sequence like one of the exercise routines would best be broken into a series of animation, standing-to-seated, then various seated limb movements, with grimaces, and a final seated-to-standing. With planning this could look very smooth.

The original design of the AnimTool used a rigfile.txt as a specifier (if the name rigfile.txt is present, that will be used without having to navigate to it with the file dialog). It was made that way to allow for the ability to add or remove joints as the conversion was performed.

If a joint is not keyed in an animation, the previous position will remain. I had hoped to have the ability for someone to make an animation that had just the arm animated in a wave, for example, so that the animation could be played on a sim seated or standing and the arm would be the only thing that moved.

However, revising rigfiles is certainly not a simple enough process. I am toying with some other ideas, maybe a checkbox config dialog built into the AnimTool, perhaps with saveable/loadable presets, to turn joints on and off (for conversion purposes). Because while I could write CLIP exporters/importers for MilkShape and/or Maya (but not easily for Max or Blender), I wrote the AnimTool instead as a converter because I wanted something available that was not wedded to any particular program. The fact that we have more MilkShape users (while somewhat limited, it is cheap and easy to learn) around than anything else is likely the main reason there is so much more anim work being done using MilkShape.

Enough chatter, Wes... back to work. :)

prr2freya
8th May 2011, 10:25 PM
Another successful Sims 3 custom animation has been made because of all your mod tools. They followed my tutorial and it worked. I'm hoping to see many more custom animations developing over time.

It really helps with animating that Sims 3 supports Ik chains. It makes it so much faster to do and results in smoother more natural animations.

Hello! I usually lurk but have been reading all the threads relating to animations. Alex's tutorial finally put fire under my butt yesterday and I made my first animation. The animation is a bit slow simply because i stretched it over a lot of keyframes to see if I can make long animations. Apparently we can. So it will be a lot of fun to make long complicated animations. I also wish there was a way to see the leg movements in Milkshape as I am not as good at knowing as Alex is... so I am still a bit lower limb shy as the trial and error and reloading the game each time frustrates me a little. (BUT I would love to keep the IKchains there so am unwilling to delete them as the movement is a lot more natural and just easier to use... I just want to SEE what I am doing as I am doing it)

Anyway, here is my first animation-
http://www.youtube.com/watch?v=HaH9-PDb9F4

I am about to go completely crazy soon because all I want to do now is create animations for my own machinima and contribute to the community in some way! All of you developers are amazing and you should know how appreciated your hard work is for machinima artists. :lovestruc :lovestruc :lovestruc :lovestruc :lovestruc


edit: I also plan on getting the newest version of Milkshape when finances allow so I can keep up with new developments! I cannot express how happy you have all made me with your hard work!

atavera
8th May 2011, 11:57 PM
I may be way off here, but the biggest problem I see with baking IK to FK is that different sliders and different outfits mean different IK targets. A fat sim and/or one wearing a puffy dress for example could have very different positions for their hips for example, which would introduce all kinds of clipping issues.

orangemittens
9th May 2011, 12:34 AM
Wouldn't you have the same problem if you were only using FK though?

atavera
9th May 2011, 12:37 AM
yes, the same problems would exist in pure FK, I only mean that baking IK->FK probably won't fix everything, and a better solution would be preferable

WesHowe
9th May 2011, 04:44 AM
edit: I also plan on getting the newest version of Milkshape when finances allow so I can keep up with new developments! I cannot express how happy you have all made me with your hard work!

Not to pimp things, but if you have a working copy of recent vintage, then the updates are free. You usually do not even have to put the activation code in, the installer finds it in the old version (which you do not need to uninstall until you are sure everything works right).

prr2freya
9th May 2011, 08:22 AM
Not to pimp things, but if you have a working copy of recent vintage, then the updates are free. You usually do not even have to put the activation code in, the installer finds it in the old version (which you do not need to uninstall until you are sure everything works right).

Oh deary me! I thought you had to buy the newer version (I used to mess a bit with half life, but half life bores me so that was short lived). I have updated and all is well. Thanks! Brain phhaaarrrt on my part.

orangemittens
9th May 2011, 11:23 AM
P2F, you can use either of the two rigged meshes Mesher has posted in this thread:

http://www.modthesims.info/showthread.php?t=390523&c=1&ht=&page=2&pp=25#startcomment

male mesh in post 5, female mesh in post 42. Or you can use the mesh Wes posted in this thread. Any of them are going to be fine for you. You really are best off updating your Milkshape to 1.8.5 though. If you do, the same holds true, you can use any of the rigged meshes posted by Mesher or Wes.

prr2freya
9th May 2011, 06:55 PM
P2F, you can use either of the two rigged meshes Mesher has posted in this thread:

http://www.modthesims.info/showthread.php?t=390523&c=1&ht=&page=2&pp=25#startcomment

male mesh in post 5, female mesh in post 42. Or you can use the mesh Wes posted in this thread. Any of them are going to be fine for you. You really are best off updating your Milkshape to 1.8.5 though. If you do, the same holds true, you can use any of the rigged meshes posted by Mesher or Wes.

Thank you! I updated to 1.85 and got the newer ver in post 5 (I was using the older one) and got both female versions:) I was having an issue in my own head with the rig txt file, but realized they were the same size after all just 2 diff ways of reading them showed slight diff in size which confused me. All sorted now. Thanks!

ssproductions
11th May 2011, 10:08 PM
This is typical of game animation systems. 'tweening applies from frame to frame, per joint, regardless of whether the frames actually came from the same animation. So your last frame had the sim seated, and the first frame of the next animation had the sim standing. I don't know the timing details, but the game just applied interpolation between the last and first frames.

So a long sequence like one of the exercise routines would best be broken into a series of animation, standing-to-seated, then various seated limb movements, with grimaces, and a final seated-to-standing. With planning this could look very smooth.

The original design of the AnimTool used a rigfile.txt as a specifier (if the name rigfile.txt is present, that will be used without having to navigate to it with the file dialog). It was made that way to allow for the ability to add or remove joints as the conversion was performed.

If a joint is not keyed in an animation, the previous position will remain. I had hoped to have the ability for someone to make an animation that had just the arm animated in a wave, for example, so that the animation could be played on a sim seated or standing and the arm would be the only thing that moved.

However, revising rigfiles is certainly not a simple enough process. I am toying with some other ideas, maybe a checkbox config dialog built into the AnimTool, perhaps with saveable/loadable presets, to turn joints on and off (for conversion purposes). Because while I could write CLIP exporters/importers for MilkShape and/or Maya (but not easily for Max or Blender), I wrote the AnimTool instead as a converter because I wanted something available that was not wedded to any particular program. The fact that we have more MilkShape users (while somewhat limited, it is cheap and easy to learn) around than anything else is likely the main reason there is so much more anim work being done using MilkShape.

Enough chatter, Wes... back to work. :)

Thanks for the info. I was surprised how well the game interpolated the transitions. Instead of doing long animations I was toying with the idea of doing them like in game with animations broken down into sections. So for example if I wanted to have a sim doing a forward roll, I'd have the start, the roll, and the end. Then I'd use the animation player to play them in the correct order. This gives more flexibility to recycle the start and end animations if done correctly, or even use pre existing ones from EA.

I managed to quickly edit an existing animation, a seated animation and did an arm wave type motion. When I tried to trigger it in the animation player the sim stood up first. I suspect to trigger this type of animation a cloned object and jazz script will need to be done. Unless I did something wrong. Also, for some reason editing an animation in MS didn't work in game, I tried with both 'operate on selected joints' ticked then unticked. I suspect I did something wrong, although I got it to work with 3d studio max (not my copy I hasten to add, unfortunately). I also noticed the left and right slot offset bones would move in sync with the EA animation. In Max they could not be moved out of a certain range. In MS there was no limit.

I really like how Animtool works and that it is flexible :)

ssproductions
11th May 2011, 10:20 PM
Freya, glad you finally got a more recent copy of Milkshape and the new meshes. Have fun :) With the legs, you can always set the animation up in MS using them, then at each keyframe set the foot offsets to where each foot is (foot world bones instead if you move the world offset bone. Incidentally, the foot world bones may have same effect as foot offset bones, not sure though if they work the same without moving the world offset, don't have my notes here atm). Don't do what I did though and inadvertently swap them around. Some very strange animations resulted from that simple mistake :lol:

WesHowe
11th May 2011, 11:47 PM
I managed to quickly edit an existing animation, a seated animation and did an arm wave type motion. When I tried to trigger it in the animation player the sim stood up first.

This is one of the things I would like to fix. If you have a full set of joints in the rigfile, then they all get written to the CLIP file regardless of whether they have any actual frames, and this makes the animation cycle through the bind pose. I feel there must be a better and easier way to manage the configurations, it does not seem to be issues with how the data is converted, but rather what skeleton parts are or aren't included in the actual CLIP file that is created.

<* Wes *>

ssproductions
13th May 2011, 07:24 PM
This is one of the things I would like to fix. If you have a full set of joints in the rigfile, then they all get written to the CLIP file regardless of whether they have any actual frames, and this makes the animation cycle through the bind pose. I feel there must be a better and easier way to manage the configurations, it does not seem to be issues with how the data is converted, but rather what skeleton parts are or aren't included in the actual CLIP file that is created.

<* Wes *>

This would be so awesome :)

I'll be creating some more custom animations within the next couple of weeks (need them for the next ep of my series) so this will result in quite a bit of practical testing. I'll be using the latest version of Animtool for this :)

lenglel
13th May 2011, 09:54 PM
Has anyone else noticed this:
When I import from a clip with the latest animtool, the animation is on the floor,
but if I import using RothN's TS3animator it's correctly oriented.

cmomoney
13th May 2011, 10:04 PM
Has anyone else noticed this:
When I import from a clip with the latest animtool, the animation is on the floor,
but if I import using RothN's TS3animator it's correctly oriented.

What rig are you using?

lenglel
14th May 2011, 03:56 AM
Good question. I'm opening S3_8EAF13DE_00000000_D057FCC534C1BCBB_auRig%%+_RIG.grannyrig
(auRig) in ts3animator. I'm not sure exactly what I've got in rigfile.txt, but it doesn't have nearly as many
bones in the smd as the ones generated from ts3animator. What version of rigfile.txt should I be using?

cmomoney
14th May 2011, 04:41 AM
I asked because when I used the ts3animator, my animations would end up on/in the floor as you said. The rigfile.txt used should be the one that comes with the Wes's or mesher's rig.

WesHowe
14th May 2011, 06:07 AM
I think you are mixing file versions somewhere, using something extracted with nick's tool with mine. I don't think we use the same methodology to get to the same place.

The AnimTool does a +90 rotation on the X axis for all unparented joints (there is only one of these in the Sim skeleton, not true for some objects), as well as adjusting their Y and Z coordinates to correct the Z-up versus Y-up differences between the game and almost all 3D modeling/animation tools except 3DS Max. This process is reversed on export (SMD->CLIP). The rigfiles and default model skeletons we are using were designed for this method.

Not rotating X +90 will leave the sim laying on its back, feet toward you, wiggling at whatever it was doing there, except in 3DS Max, in which case it will look fine. I expect that is what you are seeing.

<* Wes *>

lenglel
14th May 2011, 03:06 PM
Well, I looked at 3 different smd files, and came up with 3 different bone counts.
I think I've propogated an early version of rigfile.txt to my folder hierarchy. :faceslap:

Although I use smd files from both your and Nick's tools, I never try to convert his
smd to a clip with your tool, or vice versa. It's easy to tell them apart, because the
ones from your tool have the s3 and tgi stuff at the beginning of the name, but I
just use the animation name when I convert a clip with his tool. And am I glad smd
is in text format, sooo much easier on the eyes than hex. :blink:

FTR, I like your UI better than his, but I like being able to pick an s3pe exported rig with his.
It's good to have peanut butter *and* chocolate! Now if I could get either as a library dll,
that would be whipped cream, since the first thing I'd do with it is convert clips en masse.

So, without further ado, I shall proceed to make my sim lick her eyebrows. That ought
to impress her girlfriends.

WesHowe
15th May 2011, 03:15 AM
Text format was a part of why I chose SMD. I forget the reason I passed on BVH, but I think it was due to that format always needing an "end" bone added to the rig. I gave some thought to just inventing some format, as I know well how to code MilkShape plug-ins, but using a converter and a standard format has started to pay off, as people are able to work with tools other than MilkShape, as we are seeing.

As far as the exported rigs, in any case we are limping along with a fraction of the data that would have been in the rigs the artists used when making the original Sims 3 animations. I have a fairly deluxe setup now for Maya, with full body IK control. I haven't added any joint limits to it yet, and I am still working on testing the output, but if I get a useful pipeline working I will share it.

<* Wes *>

cmomoney
21st May 2011, 08:24 PM
I have yet to get a good IK setup on the lower body, but here is a test of my upper body setup used in a sim-to-object animation: http://www.youtube.com/watch?v=Idv_x72_bnY

WesHowe
21st May 2011, 08:54 PM
Are these a series of animations being played by the Animation Player, or are they driven by interactions between the Sim and window?

Tell me more how you organized all this to happen... I mean that is a pretty involved sequence, if you can structure that much action then it means it is possible for much to be crammed into a single scene for machinima... lots fewer transitions to edit later.

<* Wes *>

cmomoney
21st May 2011, 09:26 PM
It's interactions between the Sim and the window. The 'open' interaction consists of three animations: one for the sim, one for the window going up, and one for the window open pose. The close interaction is two animation: one for the sim and one for the window going down. The sim animations were made with a idle pose as the base(for better blending).

WesHowe
22nd May 2011, 01:02 AM
Are the interactions new, or replacements?

I am not questioning your results, just very curious about the method used. Obviously, the animation created with IK was a success, but it piqued my curiosity about the mechanics used to make the scene.

And I am impressed, by the way.

<* Wes *>

cmomoney
22nd May 2011, 01:29 AM
They are new interactions, in a new script class, and a new JAZZ script. So, basically I just put in all the windows and filled the queue with the 'Open' interaction, then the 'Close' interaction(this is what you hear in the video). The open interaction's flow is like this: 1. Route sim to window; 2. Play sim's and window's "open window" animation simultaneously; 3. Play window's "open window" pose and loop as needed. The 'close' interaction is the same but without step 3.

WesHowe
22nd May 2011, 02:28 AM
In an offline conversation I had with someone else, it became apparent that there are animation overlays, at least for facial expressions. I saw some animations that had nothing but facial bones moved in the frames, and not even starting at frame 1, but later. Not to change the subject entirely, but is there a special way to play those from the interactions script at the same time as the basic interaction?

Like perhaps an interaction of a Sim opening a present, and showing either pleasure, scorn or puzzlement during the process, by playing a different expression with the same body/hands animation.

<* Wes *>

cmomoney
22nd May 2011, 04:14 PM
Yes, you can play overlays as 'reactions'. I've seen it in the code, but I don't understand it enough to implement it yet.

ssproductions
24th May 2011, 09:40 AM
This is so awesome. The animation is so smooth and natural. I'd like to make object based animations, I'm not a stranger to scripting so may try 1 or 2 when things are less hectic, although I need more animating experience to get them up to a decent level.

traelia
25th May 2011, 08:54 PM
Hi Wes, I followed all of your directions in order to make a toddler rig for animating.. the only problem I'm getting is when following step 7, the skeleton after using your plugin is still an adult skeleton. I'm wondering how I would go about getting the toddler skeleton or the rig.txt file?

WesHowe
26th May 2011, 07:27 AM
I never made a child or toddler rig, but I think Orangemitten's tutorial has a child rig linked from it that Mesher did.

<* Wes *>

WesHowe
3rd Jun 2011, 07:31 PM
Not #42 in this thread... look in the thread Orangemittens linked to in her post.

orangemittens
4th Jun 2011, 06:04 AM
I had clicked onto orangemitten's link reference from her animation and pose tutorial, it linked me to the last page here. I know it is not the right place, but I couldn't find it - where exactly is the download for a female rig? Said in which post?http://www.modthesims.info/showthread.php?t=390523&c=0&ht=&page=2&pp=25#startcomment

orangemittens
4th Jun 2011, 06:14 AM
Hmmm..that's odd. Go to Sims 3 Creation forum and the Meshing subforum. From there pick the "TSE Animation base" thread. Then go to post 42.

orangemittens
4th Jun 2011, 06:43 AM
Do you have the direct link for the forum you are saying? Or maybe could you link the direct download for female rig here, so I don't have to bother..?PG I'm not sure what your issue is. The link I've given you and the directions I've given you both will work. I am not going to post Mesher's work...follow the link or the directions. No one is here so that you don't have to bother.

lenglel
4th Jun 2011, 09:30 AM
PG, the link for the female rig+mesh is on message #47...
oh, the hell with this links to links...

go here:
http://www.modthesims.info/showthread.php?t=441722

this file is the one you're looking for, at the end of the first post of the linked thread.
You'll have to scroll down a bit to find it, because it's a looong message.
afAnimRig-WH.rar

you are looking for the female mesh+rig, right? :Pint:

overlordorochi
1st Jul 2011, 06:58 PM
I'm a little bit confused about the tutorial :rolleyes:
What's an "animation rig" ?

I'm trying to make a rigfile for teens, only to end up with errors :/
There are two files in my folder currently :
tm_body_4_anim.ms3d - It's the file I got after following the 7 steps
tm_rigfile.txt - It's the file I got from step 3

When I try to convert a clip file to smd with your animtool and it asked to find the rigfile, I choose the tm_rigfile.txt I got from the steps, but ending up with "ERR: bad parse on rig input line: 121"

So, my real question is : Is the "tm_rigfile.txt" actually an animation rig ? If yes, then why's the error ? :/
Also, do I need different bones for the teen mesh ? Or are they just the same with adult's bones ?

mesher
2nd Jul 2011, 03:09 AM
overlordorochi,

there is no specific rig for teens, it are just a scaled adult rig, so you can use the adult rigs to develop your animations.

Orangemittens recently condensed all rigs downloads on his tutorial : http://www.modthesims.info/showthread.php?t=438716 - post #1 item 3

Just remember to always use the rigfile provided with the rig that you are using.

overlordorochi
2nd Jul 2011, 11:18 AM
overlordorochi,

there is no specific rig for teens, it are just a scaled adult rig, so you can use the adult rigs to develop your animations.

Orangemittens recently condensed all rigs downloads on his tutorial : http://www.modthesims.info/showthread.php?t=438716 - post #1 item 3

Just remember to always use the rigfile provided with the rig that you are using.

So there should be no problem if I use the adult mesh and rigfile to animate teens, right ?

Also, I made a pose I wanted to use on teens using the adult mesh, it worked fine on adults, but not on teens. :rolleyes:
I attached a picture to show you what I mean.

JillianWong
3rd Jul 2011, 03:55 PM
Hiya!
I'm interested in making poses using 3ds, is there any way I can convert the rig for making poses in 3ds max?

MarkJS
16th Jul 2011, 04:28 PM
I ported mesher rig into an 3DS Max scene and I wanted to make IK Chain on the bones as 3DS can do that, and it would be easier to animate in there as well.
Does anyone have experience with rigging? I could use some help from that knowledge, as I am nowhere a professional on that and have absolutely no experience with rigging a skeleton properly.
I saw some tutorials but if anyone could help me that would be great.

I got IKLimb done already on the legs, but there was some distortion which was mainly caused by my skinning.
However I based my skinning while painting the vertex weights just like EA's original vertex weight for each vertex ID.
I want to get some programming done today, once I do I will see if I can make video or pictures showing it.

Also, some question, if I may ask, what is the purpose of the b__ROOT_export__ and the bones connected bones to it in relation to the animation?
Should I being making the same to those bones as well?

And on perhaps a different subject, what does Valve SMD carries?
I know it is the skeleton movements, but how are they identified?
I mean, in BOND resources it is controlled with the skeleton name being a FVN32 hash from the bone name string itself.
Are the same with the SMD?
In the SMD documentation the ID is an integer so would them be calculated by alphabetical order, and children bones and such?
- Just as posted I looked at it, its the bone name as string then.

Thanks in advance!

WesHowe
17th Jul 2011, 03:22 AM
The Valve SMD file has two flavors, one with mesh data (reference) and one called a sequence that contains only a skeleton and animation frames. That one is what you concentrate on for animation. When building one, the SMD exporter will look at the skeletal hierarchy and build a bone list from it. Each bone will have an index and another integer that follows it which will designate the index of the parent joint, and the value -1 is used for a root (unparented) joint.

So that integer is used in the rest of the file to designate the joint. The rest are frames of skeletal data, denoted as 'time' and an integer. 'time 0' is a complete skeleton and should be the bind pose, each succeeding frame will have a line for the animation data, each line will have the integer for the joint (from the first section) and six floats, which are three postion and three rotation data values, in XYZ order, with Z-up (like in 3DS).

I have not tested 3DS generated SMD files with the AnimTool converter, in theory they should work, however the rig you are animating from needs to be set up with the joints parented and positioned just the way the game has them, or the resulting animation data will be improperly applied in the game. While it (at least usually) won;t make the game crash, I have seen some very funny looking sims during my development work caused by sending bad data to the game. It requires a number of steps to be executed properly, or the chain will break.

SMD files can be opened in any text editor, that might give you a better idea of how they are structured.

<* Wes *>

MarkJS
22nd Jul 2011, 07:43 PM
The Valve SMD file has two flavors, one with mesh data (reference) and one called a sequence that contains only a skeleton and animation frames. That one is what you concentrate on for animation. When building one, the SMD exporter will look at the skeletal hierarchy and build a bone list from it. Each bone will have an index and another integer that follows it which will designate the index of the parent joint, and the value -1 is used for a root (unparented) joint.

So that integer is used in the rest of the file to designate the joint. The rest are frames of skeletal data, denoted as 'time' and an integer. 'time 0' is a complete skeleton and should be the bind pose, each succeeding frame will have a line for the animation data, each line will have the integer for the joint (from the first section) and six floats, which are three postion and three rotation data values, in XYZ order, with Z-up (like in 3DS).

I have not tested 3DS generated SMD files with the AnimTool converter, in theory they should work, however the rig you are animating from needs to be set up with the joints parented and positioned just the way the game has them, or the resulting animation data will be improperly applied in the game. While it (at least usually) won;t make the game crash, I have seen some very funny looking sims during my development work caused by sending bad data to the game. It requires a number of steps to be executed properly, or the chain will break.

SMD files can be opened in any text editor, that might give you a better idea of how they are structured.

<* Wes *>

Thank you for this information, it is very useful.
I have just one question regarding it, it is related to the vertex weights.

On SMD format they are set in the triangles block according to the documentation, set along like:

<int|Parent bone> <float|PosX PosY PosZ> <normal|NormX NormY NormZ> <normal|U V> <int|links> <int|Bone ID> <normal|Weight>


What exactly identifies each vertex? In this case would it be the position, set to match along with the skeleton?

The idea is to try to make a bridge between MAXScript and the SMD format, while I can get my skinning to export to SMD, some vertex weight get crunch and not smooth like the ones present on my original.
Since this would lead to another discussion I will open a different thread, maybe you can look at it, perhaps we could finally go through these tools skinning.

Regarding the CLIP, the one I made on 3DS worked fine in game. No explosions, no crash, nothing.
However I am yet to test a full animation, I tested it quickly but it had only two frames, so it was hard to take a look, but when I paused I could see the joints I changed were actually moved along.
Somehow before exporting I have to remove every IK Chain I add to 3DS scene, is that the standard for converting to .animation?

Thank you once again.

WesHowe
22nd Jul 2011, 09:33 PM
I haven't spent much time examining the weights part of SMD. But here is an example from a SMD reference file exported by MilkShape:
0 0.375987 0.059613 1.327270 0.463646 0.781392 0.417682 0.899705 0.777983 2 39 0.870000 65 0.130000
Looking at the last five numbers on that line. '2' indicates there are two joint/weight pairs, the first is joint 39, weights 0.87 and the second is joint 65, weight 0.13.
Note they total 1.00. The joints would be the same as the index from the start of the file. I am not a 3DS programmer, but I believe the weights would be fractional components, as they are in almost all other 3D programs.

Note that you only want to export a 'sequence' SMD file (no triangles section like a reference SMD file) to send to the AnimTool. I assume you are needing the triangles section to transfer a smoothed mesh with multiple weights into or out of 3DS for your own use, but I believe the presence of a triangles section will choke the AnimTool.

Getting the animation into the game depends on a few things being done exactly the same way the game does them. Your bind pose (initial joint positions and rotations) should be the same as the game uses (or the animations will be off). The same joint names with the same parent joints is important, and the parents must be defined before the children. If you export the IK joints without animating them, they will override the animation you are trying to export on the legs and hips, meaning you either have to base your animations on using the IK chains, or delete them to avoid conflicts.

<* Wes *>

MarkJS
23rd Jul 2011, 01:01 AM
I haven't spent much time examining the weights part of SMD. But here is an example from a SMD reference file exported by MilkShape:
0 0.375987 0.059613 1.327270 0.463646 0.781392 0.417682 0.899705 0.777983 2 39 0.870000 65 0.130000
Looking at the last five numbers on that line. '2' indicates there are two joint/weight pairs, the first is joint 39, weights 0.87 and the second is joint 65, weight 0.13.
Note they total 1.00. The joints would be the same as the index from the start of the file. I am not a 3DS programmer, but I believe the weights would be fractional components, as they are in almost all other 3D programs.

Note that you only want to export a 'sequence' SMD file (no triangles section like a reference SMD file) to send to the AnimTool. I assume you are needing the triangles section to transfer a smoothed mesh with multiple weights into or out of 3DS for your own use, but I believe the presence of a triangles section will choke the AnimTool.

Getting the animation into the game depends on a few things being done exactly the same way the game does them. Your bind pose (initial joint positions and rotations) should be the same as the game uses (or the animations will be off). The same joint names with the same parent joints is important, and the parents must be defined before the children. If you export the IK joints without animating them, they will override the animation you are trying to export on the legs and hips, meaning you either have to base your animations on using the IK chains, or delete them to avoid conflicts.

<* Wes *>

I see! In 3DS they are set as float as well. I just wonder though if the vertices are the same indexing using MAXScript from the SMD file.

I wrote a little about a script on development here: http://www.modthesims.info/showthread.php?t=449404
In case you want to see.

However in order to continue I would need to see how I calculate the bones as their specific integer before I could go any further.

As for the parent bones, they are all connected so moving a root joint moves its children and so on;
Here's a schematic view of the pelvis for example, being the parent bones and their children;
https://lh4.googleusercontent.com/-w1Pk4qOD0-M/TioBqA1lVmI/AAAAAAAADDs/kqhz8ZqbmTA/s688/3ds-schematic-pelvis.JPG

I will try to make a custom animation with more movements and see if this current scene works well with a high amount of frames using your tool.
The good thing in Max is that animations are quite easy to make, specially with the IK, since I can move the leg in an "realistic" way using IK Limber.
In seconds the IK helps to spare the work I would be doing in minutes in Milkshape for example.

https://lh5.googleusercontent.com/-BQe-OCpIJAc/TiH0YfziCbI/AAAAAAAADAM/rxgB-_q1Msk/3ds-ik-rigmalepic.jpg

If you look at the right leg, there is one vertex that is not getting along with the mesh, because of my skinning, which is something I will be fixing, that just needs perfecting, because it is not present in the game.
The only thing is to provide something to base of and help to make poses and animations, in 3DS being an professional modelling/animation software that just make it easier.
Hope that I get around skinning everything as I want to make the female mesh as well.

I am interested on a different thing on this as well.
Which would be a way to make "couple poses" easier, by duplicating the skeleton;
Of course that would make their instances different, but due to SMD format being actually very simple, can make a tool that will reread the SMD and parse the default values (bone IDs) for that different skeleton by matching the ID with the name string on the nodes block;

As I experienced they export different bone IDs when the bones in the scene got modified by either cloning/instantiating;

Unless your tool doesn't look to the IDs, but the name of the bone itself?
Well, it is an interesting concept to test though.

WesHowe
23rd Jul 2011, 05:10 AM
It uses the joint names. The order needs to be consistent within the file, obviously, and that is used internally, but matching is done by name. The joint name is hashed using the FNV-32 algorithm the game uses and the hash value is passed to the CLIP file as the identifier. All of that works so long as your SMD file spits out the same name as used in the game.

Because SMD uses an indexing scheme, the name of a parent joint would come before any of its children, but how many lines before is irrelevant. The AnimTool converter watches for this condition, and would issue an error message... this restriction exists mainly because the file is parsed a line at a time, so unless a parent has been defined already, the child joint will be unable to be linked to it.

As for second skeletons, that would in theory work if the names were unique except the AnimTool does not accept more than 255 joints. I would suggest that if you want to design a tool that will work with multiple skeletons that you think about making your exporter work just by exporting selected joints and their animation keys. SMD is not an ideal animation format (and is a poor mesh format) but it is sufficient for what we are trying to do here.

<* Wes *>

p.s. Please be sure to post some pictures when you get this working, too.

MarkJS
11th Aug 2011, 03:06 AM
I had very little time to work on this due to life, but I exported an animation with the IKs baked and it kind-of worked fine: http://www.youtube.com/watch?v=q1Vz8YqrJzE
The sim feet goes inside the ground, however the issue is that I constrained the position of the foot world joints to the respective foot joints, so they moved together.
I have no idea why I did this, but anyway, at least that means the animation was exported successfully done with the IK.

I still need to finish the IK setup though, this is current one:
http://thumbs.modthesims.info/getimage.php?file=1223164

On the left foot it has one to control the leg within the pelvis, I still need to make one to the pelvis so can lower it to the root;
Once I finish the IK, I can just import the female body and start skinning, the problems is to match EA skin, so can visualize it on the 3DS before exporting;
It is a lot of work, but I guess it would be worth it.
I am not that interested on machinima or making animations whatsoever, but the development of this is what puts me through this.

The idea on the "couple" anim, would be to clone the skeleton, having two skeletons to work with in the same scene.
While exporting, due to the names being different, they would have different indexes (perhaps not if to export one skeleton each time, or write a simple MAXScript to rename the bones back to their original names).

Once I get more consistent work on this I will let you know, perhaps upload a animation for people who would be willing to test it as well.
However I still need mesher approval for me, whenever I am able to upload some "beta" version, as it is originally his rig setup, I contacted him via PM just waiting for his reply.
Thanks for the invaluable help! :beer:

Nukael
12th Aug 2011, 10:56 PM
We're developing the same things at the same time. =D I didn't want to post until I had more stuff to show (I'm also experimenting with other stuff regarding animations), but since we're both developing, I wanted to share my experiences.
I'm using Motion Builder, since that has a very robust automated Inverse Kinematics system. I've succesfully transferred FBIK animations from Motion Builder into the game. Feets lock onto the ground, I can lift the pelvis and transform the full position of the Sim (for instance make a Sim float in the air). At least in early tests everything seems to be transferring fine. You can't use the existing IK chains in the CLIP files though, you need to delete them, as Motion Builder bakes the animation down to the bones level. Which is good actually, because that allows for some very complex animations to transfer through the SMD format to the CLIP files.

Here's an example of the setup:
http://www.youtube.com/watch?v=4u88T40xp8w

And here's a really really rough example in the game. You'll notice his elbow bending incorrectly on the right arm, that's just me that messed up the actual IK animation by assigning bones incorrectly in Motion Builder. I have since fixed that issue. Also, the feet do pop in the floor at the beginning of the clip, I think this is actually due to the interpolation of the game engine itself. The whole body going down and up is animated using FBIK in Motion Builder, then bringing that over to 3Ds Max and exporting to SMD from there.

Here's the video:
http://www.youtube.com/watch?v=pEpaI-Oz44I
The animation is crap because I did it in like 30 seconds just to test the movement. Motion Builder is a very strong animation package. So I think it should be possible now to use Motion Builder and its great animation tools to make the animation process easier. It's a complex professional package though, so it's not really for beginners.