Tutorial: Retaining Object Animations in your new package
I did not find a tutorial specifically about preserving object animations using UniMesh. With the help of discussions and other tutorials, I cobbled together a method that worked for the few items I’ve done so far. Hope this helps others get started.
Retaining Object Animations
This tutorial shows one method of retaining the original object animations in your new object. It assumes that you are familiar with basic object creation and meshing.
Preplanning is very important with any mesh making – especially animated ones. It can be helpful to review how the object animates in game before starting. Start the game and put the object you intend to clone through its paces. Watch whether the sim actions are high or low. Things don’t have to line up exactly, but it looks really dumb if your sim is reaching high to open a door on the refrigerator and your door is low. This is about preserving the existing animations, not making new ones. Either adapt your vision for your new object, or find another object to clone if there is a major mismatch.
Clone your object in the normal way, assign new GUIDs.
Go to GMDC. Extract the GMDC with the mesh by right clicking on the entry in the resource tree. If there is more than one applicable GMDC (like for counters), then you will need to do these steps for each one.
Give it a name you can understand/remember.
Import the extracted GMDC into Milkshape. Use “Sims2 UniMesh Import V4.09A”.
If you get the message “Some skin weights do not equal 100%. Do you want these corrected?”, answer “Yes”.
If you get the message “WARN: Unhandled UV Delta Blocks Present. Model Name(s) were truncated. ….”, click “Okay”.
If this is your first time doing any animation in Milkshape, then you probably have a lot of random looking blue lines like this.
If so, the joint size symbol in Milkshape is too large. Go to File>Preferences>Misc and change the “Joint Size” to 0.01. (Thanks for the tip Wes!) The result should look more like this:
I clean the extracted GMDC up by deleting wall shadows and groundshadows. They are not included in joints and are not needed for this. So far, I have not encounted an object where any shadows were included in the joint. However, just to be certain, I do not delete any of the miscellaneous shadows (like the handles on counters) until I confirm that they are not part of the joints.
It is helpful to rename the groups at this stage. Just adding ‘old’ to the beginning of the group name works well. Export using “Sims2 UniMesh Import V4.09”.
More preplanning. Review the joint assignments. Select “Joint” tab on the right in Milkshape. Click first joint name, then “SelAssigned” (select assigned). Look at the points that become highlighted. Not all joints will have points associated with them. We can ignore those without points (but do NOT delete). Repeat for each joint name, paying attention to what part of the mesh is highlighted.
In the case of the refrigerator, there are 3 joints with points assigned to them, which I'll refer to as – frame, left door & right door. There were two joints that had no points assigned. When you make the new mesh, the elements that make up these three parts need to be in separate groups. You can have more than one group that makes up the parts – such as a glass panel and its solid frame – but you can not have a group that belongs to two joints. Every point (vertex) of your mesh should be associated with one, and only one part.
We are finished with the GMDC for a little while. Close it in Milkshape.
Make your new mesh in object format – keeping in mind the need for separate parts. Here is what my new refrigerator looks like.
Note 1: Before doing the joints, I make a preliminary .obj file with everything grouped as needed for the final object. I test this in game before I bother with the joints. If you are doing something very similar to the original Maxis mesh, this is probably not necessary. This one is a repository slave to a custom counter, hence the atypical group name ‘countertop’.
Note 2: The Maxis refrigerator has ‘content’ (food) showing in the doors like modern refrigerators. In their mesh, part of the contents moves with the joint. If you were doing a normal refrigerator, you would have 3 additional groups that together make up content -- FrameFood, LeftDoorFood, & RightDoorFood (example names).
Select File>New in Milkshape to get a blank canvas. Import the GMDC – Sims2 Unimesh V4.09A format. Import – Wavefront OBJ your new mesh.
Go to ‘joints’ tab in Milkshape. “SelAssigned” first joint. In this case there are no points, so we ignore it. Proceed thru the joints until you have one with points assigned. For this refrigerator, the second joint has points assigned, and they correspond to the parts that don’t move.
Click on the Group tab in Milkshape. Select the group(s) that correspond to this joint movement. In this case, “frame” and “countertop” should not move, so they are selected.
Go back to the joint tab. Click “Assign”. Do NOT click on anything else in between – because you will probably lose part of your selection.
Repeat for each joint. In this case, the 3rd joint, like the first joint, does not have any points associated with it. We ignore it. The 4th joint corresponds to the left door.
Continue thru the joint list, selecting and assigning joints, as above. After you have assigned all of the joints, check that there are no unassigned points. Joint tab > SelUnAssigned.
If no points are highlighted in your new mesh, then you are good to go. Delete the ‘old’ groups that correspond to the original mesh. Regroup the new mesh into the groups needed for SimPE.
Export using Sims2 Unimesh V4.09A. Close Milkshape. Open the package for your new object in SimPE.
Go to the GMDC where your new mesh needs to be. VERY IMPORTANT: Save the file name to your clipboard. Highlight (select), then press CTRL-c.
*** MaximilianPs has kindly saved this as a PDF for everyone's convience. Thanks Max!
Right click on the thumbnail of the attached picture, choose "copy link location" OR open the attached picture and copy the link that appears in the address bar. Then paste the link in between a [img] and a [/ img] (<- no space between "/" and "img") wherever you want in your post.