Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Theme Catchup2018 - posted on 1st May 2018 at 1:50 PM
Replies: 95 (Who?), Viewed: 46521 times.
Page 1 of 4
Alchemist
Original Poster
#1 Old 4th May 2011 at 6:40 AM
Default Making Additional Animation Rigs
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 *>
Download - please read all instructions before downloading any files!
File Type: rar afAnimRig-WH.rar (275.9 KB, 2323 downloads) - View custom content
Description: Adult whole-sim mesh and rig file for making poses/animations
File Type: rar msSkinWeightPlugins.rar (10.6 KB, 1205 downloads) - View custom content
Description: MilkShape plug-ins for saving and restoring skin weights, used to make the AnimRig.

If you like to say what you think, be sure you know which to do first.
Advertisement
Sockpuppet
#2 Old 4th May 2011 at 10:51 AM Last edited by BloomsBase : 4th May 2011 at 11:42 AM.
Quote:
Originally Posted by WesHowe
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?
Alchemist
Original Poster
#3 Old 4th May 2011 at 3:46 PM Last edited by WesHowe : 4th May 2011 at 4:19 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 *>

If you like to say what you think, be sure you know which to do first.
Sockpuppet
#4 Old 4th May 2011 at 6:08 PM Last edited by BloomsBase : 4th May 2011 at 6:20 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

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?
Test Subject
#5 Old 4th May 2011 at 7:45 PM Last edited by mesher : 4th May 2011 at 8:28 PM.
DAMNED !!! 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 !

Quote:
A beautiful solution that only a programmer would appreciate
Alchemist
#6 Old 4th May 2011 at 8:34 PM
Quote:
Originally Posted by BloomsBase
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
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.
Alchemist
Original Poster
#7 Old 4th May 2011 at 10:14 PM
Quote:
Originally Posted by mesher
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 *>

If you like to say what you think, be sure you know which to do first.
Test Subject
#8 Old 4th May 2011 at 11:42 PM
Quote:
Originally Posted by WesHowe
I sort of thought your old #5 file had been the victim of passing through MilkShape Ascii.



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.

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#9 Old 4th May 2011 at 11:49 PM
...I'd like to be able to duplicate the IK setup. :D

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
#10 Old 4th May 2011 at 11:58 PM
I'm not sure if this is what you're looking for mesher, but you've seen Atavera's wrappers right?
Alchemist
Original Poster
#11 Old 5th May 2011 at 1:11 AM
Quote:
Originally Posted by mesher
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 *>

If you like to say what you think, be sure you know which to do first.
Alchemist
Original Poster
#12 Old 5th May 2011 at 1:24 AM
Quote:
Originally Posted by cmomoney
...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 *>

If you like to say what you think, be sure you know which to do first.
Sockpuppet
#13 Old 5th May 2011 at 2:44 AM
Quote:
Originally Posted by orangemittens
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
Alchemist
#14 Old 5th May 2011 at 3: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.
Sockpuppet
#15 Old 5th May 2011 at 3:43 AM Last edited by BloomsBase : 5th May 2011 at 4:26 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:

Quote:
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) ----
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#16 Old 5th May 2011 at 4:27 AM
Quote:
Originally Posted by WesHowe
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.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
Original Poster
#17 Old 5th May 2011 at 5:37 AM
Quote:
Originally Posted by BloomsBase
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 *>

If you like to say what you think, be sure you know which to do first.
Alchemist
#18 Old 5th May 2011 at 6: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?
Sockpuppet
#19 Old 5th May 2011 at 6:54 AM Last edited by BloomsBase : 5th May 2011 at 7:21 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)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#20 Old 5th May 2011 at 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.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Test Subject
#21 Old 5th May 2011 at 3: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.
Test Subject
#22 Old 5th May 2011 at 3:53 PM
Quote:
Originally Posted by orangemittens
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].
Yes, MS is so gimmicky ...

Your Maya plugin is highly expected here.
Sockpuppet
#23 Old 5th May 2011 at 4:39 PM
Quote:
Originally Posted by cmomoney
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.....
Is it a seperate download?
Alchemist
#24 Old 5th May 2011 at 5:00 PM
Alchemist
Original Poster
#25 Old 5th May 2011 at 5:20 PM
Quote:
Originally Posted by mesher
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 *>

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