Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Alchemist
Original Poster
#176 Old 23rd Aug 2010 at 5:45 AM
Quote: Originally posted by rothn
Personally, I believe that it is a very thorough tutorial, and nobody should have any trouble following it.


Hey, you wanna but some land I have in Pakistan? Dry all year. Cheep

Before my PM box gets full, in msg #1 (this thread) is an animtool version that increases everything by an order of magnitude on memory. I don't use any dynamic buffer management, and all of the frame data has to be read in, parsed and reorganized, essentially swapping the tree structure because of the different visions used by the game code writers for TS3 and those that wrote the SMD format. More or less the same stuff but organized totally differently.

Frame count in V04L will be 12500 (at 8192/per). Three sets have this array, so be prepared to see a 0.3Gb usage figure, regardless of how small a file is being used.

Seriously, I tried using around 4,000 frames in MilkShape and it was seriously sluggish. But for those who enjoy the pain of birthing new discoveries, no challenge is too odd.

I'll try to get by here often and see if whuss happning, bros.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Advertisement
Field Researcher
#177 Old 23rd Aug 2010 at 8:52 AM
Default Thanks!!!
Thanks for the updated tool, Wes (I'll change the tutorial).

By the way, did you try the tutorial? Did it work for you?

Error: Keyboard not attached. Press F1 to continue. - Windows XP Setup
Hey! It compiles! Ship it! - Microsoft
Love is Hate. War is Peace. Windows is stable. - 1984 (sort of)
Alchemist
Original Poster
#178 Old 23rd Aug 2010 at 3:33 PM
Sorry, not yet. I never did any but some rudimentary S3 scripting stuff back at the beginning of S3 modding.

But I am interested in seeing how this progresses. It appears you have worked hard on this.

If you like to say what you think, be sure you know which to do first.
Field Researcher
#179 Old 23rd Aug 2010 at 6:13 PM
Default Discovered on Accident
Actually, I didn't work that hard. Let me explain how I discovered the animation process:

I had started an object, a restaurant podium, and realized that I would need my own state machine in order to have all of the animations that I wanted. I went into Smooth Jazz and created a state machine for my object that used pre-existing EA animations. This took about an hour, as I had to thoroughly read the Jazz section of the Sims 3 wiki. Next, I packaged that jazz state machine into my restaurant podium object. In order to use my new state machine, I opened up Reflector, and went to the class of an object I knew to be animated. I poked around for a little while (about 5 mins) and found the code for loading and using a state machine. This satisfied me for awhile, but later I had trouble with the game's CarrySystem; it wouldn't put down the restaurant menu where I wanted it to go (the Sim would throw a fit). So, though I knew it wouldn't work, I decided to make my sim route to the with a radius of 2.0 and then call a state that would have my custom extra-far-reaching put down animation. First, I did the animation by copying the default put down animation, and making the back bend more. I used AnimTool for this, and gave the source file a name that I referred to when initializing the jazz script (in Smooth Jazz), and the animation a name that I used for the "Play" command (in Smooth Jazz). This seemed like the logical way to do things, but for some reason, Smooth Jazz red-underlined my code after the new "Play" command. I figured that Smooth Jazz just didn't recognize the clip file, so I imported the newly made .animation file into my package file, gave the animation a new name and instance (the animation name and the FNV 64 hash of the animation name, respectively), closed the package file in S3PE (because S3PE keeps the file stream open), and added the package as a reference in Smooth Jazz. After that, Smooth Jazz recognized the animation, and I was able to export the new jazz file into my package file. I ran the .bat file that copies my package files to the mods directory, clears the cache, and runs TS3, and was disappointed to see that the Sims look funny when trying to reach over dining chairs to put down menus . Basically, I thought I had wasted two hours on a dead end. Then, I remembered how I used to be so interested in custom animations, and was curious as to how I implemented them so easily, when I had previously tried so hard for so much longer than two hours to implement custom animations with the same modding tools to no avail. I then checked to see if anybody here had figured it out yet, and, since they hadn't, I spent the rest of that day writing a step-by-step tutorial on implementing custom animations.

Note that I still am looking for a way to force a Sim to route to a place with the RoutingSystem for my restaurant system. If you or anybody that you know may be able to help, please PM me.

PS: In the tutorial, I give you the exact C# code you need to get the script to call the jazz file. All you need to do is copy the code from the tutorial, change the names, compile it, and import the DLL in S3PE. I mentioned that knowledge of that is assumed, because most people can't operate a C compiler. You should be just fine. All the code is just copy and paste; the only painful part is creating the animation in Milkshape; The skeleton is very strange and hard to animate.

Error: Keyboard not attached. Press F1 to continue. - Windows XP Setup
Hey! It compiles! Ship it! - Microsoft
Love is Hate. War is Peace. Windows is stable. - 1984 (sort of)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#180 Old 23rd Aug 2010 at 6:17 PM
Are your animations overwriting the original animations?

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Field Researcher
#181 Old 23rd Aug 2010 at 6:55 PM
Default No
Why would I overwrite the originals? My clip files have their own "identifiers." They are called instances, and are the FNV 64 hash of the animation name. Think of these FNV 64 hashes as a way of making any string "fit" in an int64 while keeping it unique. I also give the animations textual names, which go in their package's _KEY file. A program called Smooth Jazz can "look" at the animations in a package file and so it knows that when you say
Code:
"test.ms3d"."x" as "x"
or
Code:
Play "a_test_x"
in a jazz file, Smooth Jazz knows what you're talking about, and accepts this as a reference to the new clip file. This same program exports a Jazz file into your object's package file. Then, in a CLR dll coded in C# (or any other .NET language), I "load up" this jazz file, and tell it basically which animation to play. I never tried replacing animations, but I assume it would be easy enough.

Error: Keyboard not attached. Press F1 to continue. - Windows XP Setup
Hey! It compiles! Ship it! - Microsoft
Love is Hate. War is Peace. Windows is stable. - 1984 (sort of)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#182 Old 23rd Aug 2010 at 7:06 PM
I asked because up until now, all we have been doing is replacing animations. I'll have to compare what I've been doing to your tutorial and see what part I'm leaving out.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Field Researcher
#183 Old 23rd Aug 2010 at 9:31 PM
Default sorry
cmomoney, sorry for talking down to you in that previous post of mine.

Error: Keyboard not attached. Press F1 to continue. - Windows XP Setup
Hey! It compiles! Ship it! - Microsoft
Love is Hate. War is Peace. Windows is stable. - 1984 (sort of)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#184 Old 23rd Aug 2010 at 10:20 PM
Ah, it's no problem.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
Original Poster
#185 Old 24th Aug 2010 at 3:29 AM
I see a light. It is probably the headlight of a Harley about to run me over, though.

I can appreciate the research rothn did to get his stuff working. For me, the research would have included a lot of C# and CLR studying also, which is a skill set I have decided to bypass (old-dog syndrome). It is not because I think the topic is uninteresting, but I have just a few unfried (misspent youth), unused gray-cells left, and I am currently devoting them to my new-found passion for making 3D animated movies (from scratch, not as machinima).

Please feel free to carry on here. I may not be able to add anything to this particular branch of the study, but if you uncover some low-level improvements in the AnimTool that are needed, I can still help there.

If you like to say what you think, be sure you know which to do first.
Lab Assistant
#186 Old 24th Aug 2010 at 3:24 PM
Hmmm.... I really want to start making my own custom animations (I need those pose boxes back! XD) but I never tried any sort of coding before. Would reading this tutorial help me get through your tutorial?

Check out my blog ! You'll find items that I was too lazy to upload on the MTS XD.

Warning! This is not an English blog! However, the 'Sims3Downloads' section is written in English :D.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#187 Old 24th Aug 2010 at 5:10 PM
I would suggest this tutorial.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Lab Assistant
#188 Old 25th Aug 2010 at 1:16 PM
Thanks a ton! :D.

Check out my blog ! You'll find items that I was too lazy to upload on the MTS XD.

Warning! This is not an English blog! However, the 'Sims3Downloads' section is written in English :D.
Instructor
#189 Old 25th Aug 2010 at 4:38 PM
Oh my GOD! So this means *actual* non-replacement animations are possible... wow, I just got so excited. I've got a couple of ideas for magic objects in the works But first to finish learning how to code!

This space intentionally left blank...
Test Subject
#190 Old 25th Aug 2010 at 6:39 PM
Quote: Originally posted by Nukael
Oh my GOD! So this means *actual* non-replacement animations are possible... wow, I just got so excited. I've got a couple of ideas for magic objects in the works But first to finish learning how to code!


Adding new CLIP (non-replacement animation) is really easy. You just have to do like for any other resource. I have about 20 new animations in my mod. My new interactions use the new CLIPS through original or custom jazz scripts. But the problem is that they are all crappy.
Sometimes only half of the sim is animated, somethimes the sim is translated by an unknown offset, sometimes the sim is totally disfigured. That's the last problem I have to solve to release a first beta version of my mod.

Wes,
I've seen some CLIP referencing bones by FNV 32 hash instead of standard name. Do you handle those cases to retreive the correct bone from the rigfile.txt ?
Lab Assistant
#191 Old 25th Aug 2010 at 7:27 PM
@Gwenh: Many sim animations have extra IK targets. I am unsure exactly how they interact with the frame data, but perhaps if you removed those the game would be able to handle your animations without distortions. Which animations did you clone?
Alchemist
Original Poster
#192 Old 26th Aug 2010 at 5:54 AM
Quote: Originally posted by Gwenh
Wes,
I've seen some CLIP referencing bones by FNV 32 hash instead of standard name. Do you handle those cases to retreive the correct bone from the rigfile.txt ?


I am guessing you mean that the joint name is something like 0x1234ABCD?

Inside the CLIP file, the only "name" that exists is the 32-bit hash value of the name. Any names you see with the INFO button that are human-readable are there because the tool has a lookup table in it with four hundred names that I coded manually (which includes those used in the rigfile.txt).

On import (CLIP->SMD), if the hash matched one of the names, the text is used, otherwise the name is built from the hex character representation (of the 32-bit hash, the same as was used in Sims 2) with the characters "0x" on the front end. However, only names that are in your rigfile.txt will appear in the SMD file.

On export (SMD->CLIP) if the name starts with "0x", the following hex characters are converted to the 32-bit binary and form the hash that is actually used in the CLIP file. Everything else is converted from human-readable back to 32-bit hash value. Again, if it isn't in the rigfile.txt, it will not be placed in the CLIP file. That is by design, as is the fact that the tool looks for the rigfile.txt in the same directory the CLIP file is in. By using different directories for each animation, unique rigfiles can be managed without conflicting.

While many parts of the Sims 3 use the FNV-64 hashes, most of the animation system uses the old 32-bit hash, except the actial animation (CLIP) file names, which are a bit-masked variant of FNV-64 (documented on the wiki).

So any "0x" values you see are simply not one of the common joints I built into the process. It would be possible for you to look that hash up in the name table file, and actually substitute the real name for the "0x" value, and the exporter would generate the correct hash on export. A lot of trouble, but possible.

You will see "0x" values on every object animation, because I didn't code most object joint names. Aside from the root joint name ("transformBone"), they are almost always unique from object-to-object. At least the Sims themselves share a core of common joints.

I believe that your issues are related to joints that either are not included with the "standard" rigging file, or that are and should not be for that animation. I have previously chewed up lots of forum space discussing the rig file... there is just no ONE rigfile that will work with all animations.

So look again at the info button on the tool. That process executes the first half of the import (CLIP-<SMD conversion), but instead of making a SMD file, it spits out a list of all of the joints that are in the CLIP. To get a perfect reproduction of the game animation (with overlay animation correct) you would need to have a rig file that matched the joint list displayed by the Info function. And you would find that many animations use more or less just the "standard" joints, or a subset of them, and that about as many more use something "odd" as well as some or all of the "standard" joints.

This is, essentially, far more flexible a system than what was in TS2, and also far more complex to work with. Most of the disconnect happens because of the proprietary Granny animation system used. I can't read the actual rigging file directly from the AnimTool, so I had to make a copy of the data. And the uniqueness of the animations doesn't help.

A lot of the animations are split into overlays. Meaning that one animation is used on the body, a different one played on the face. To make yours export as overlays, you can pull the extra joints from the rig file for that animation. As long as you remove the children too, any joint can be removed by editing out that line from the rig file. By children, if you want to remove the arms from an animation, you need to take the upper and lower arms, hands and fingers all out. If you do that, the export operation will not write any data for those joints (even when the data appears in the SMD file). When the game plays such an animation, only the movements that were exported, which are confined to the joints in the rig file, will play. Other movements that are happening simultaneously in the game will thus not have any movements from your animation that will confuse the final display.

So much for a generic answer. For more discussion, pick one specific example and we can work on that... but be aware that I do not have any expansions installed here. World Adventures is still shrink-wrapped here at Rancho Como. Pretty much all of the things I have done in Sims 2 and 3 are all basic resource level mods (mesh and animation formats) that have stayed constant throughout the game life-cycle. Some expansions added tweaks, but for the most part the basic capability was built-in from the start, the new content that used it was not.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Test Subject
#193 Old 26th Aug 2010 at 8:33 PM
Quote: Originally posted by WesHowe
For more discussion, pick one specific example and we can work on that...
<* Wes *>


Thank you all for giving me a little of your time.

Until now, I mostly used "a_idle_neutral_loop_1" and "a2o_sitTemplate_sit_loopBreathe" as templates. I've builded new rig files using output of clip INFO and granny viewer to look into auRig.grannyrig and simSittingJig.grannyrig and so adding new bones like R_legExportPole, b__R_ThighUntwist__ (0x13a6779a). Now, I have one rig file for using with the "a_idle_neutral_loop_1" template and another one for using with "a2o_sitTemplate_sit_loopBreathe". Perhaps I made mistakes when adding the new bones (my math skill is not very good).
Alchemist
Original Poster
#194 Old 26th Aug 2010 at 9:22 PM
Well, believe it or not, I struggle with the math, too. I don't know any really good shortcuts that I haven't posted at one time or another... good old-fashioned elbow-grease is how I get there.

I have noted in my studies that many of the "odd" joints sit on top of, or close to, other joints, and many have zeroed rotations (a quaternion of 1, 0, 0, 0 is zeroed). That would make placing many easier, because you can copy from existing joints.

The conversion process itself supports IK, but MilkShape does not. IK (Inverse Kinematics) is a process whereby an additional "joint" assembly is added to the skeleton, with a "handle" at, for example, the foot. In that example usage, the leg bones down to the foot can be controlled by moving the IK handle, and the actual rotations of the leg bones are solved mathematically (it requires a 'solver'). The IK joints are some that usually sit on top of the feet and hands. Instead of rotations, they usually are translations (moves).

I didn't play with it much myself, but one of the posts 'way back claims that the game engine does have a solver for IK in it. Sims 2 did, although we never did much with that because, again, MilkShape does not have any solvers for IK. The lack of solvers is why I never release an animation importer for Sims 2. Programs like 3DS Max and Maya haev solvers, but the SMD conversions for Maya are buggy, at best (and both are in a price class that places them outside the modding mainstream).

So you can bring in the IK joints, if rigged, and they will move, following the keys. You can adjust and set new keys for them (using move, not rotate), however, you will not see the joint chain follow them in MilkShape. However, it was reported (with pictures) that the game will follow the changes in the IK joints when these changes are exported to the game. It would be great if someone was leading this, but that will not be me for the near future, I am busy with some different projects. I was probably too far ahead of the curve on this, it has been a year or so since I wrote the tool... I had it only partly done, and I was in the hospital overnight after some cardiac issues and that was one of the things I thought about that I regretted not finishing. Fortunately, the problem turned out not to be terminal, and I got it done soon afterward. Good convalescent therapy, if rather odd sounding to people not enthralled with pixel dollies.

Oh, and joint names with IK and exportPole are surely related to IK. The "pole" is a line (for the leg example) between the hip and the foot, and the handle is at the foot end. When you move the handle, the pole changes, and the solver (were there one in MilkShape) changes the leg joint rotations algorithmically to place the foot at the new handle position. IK greatly speeds the process of making animations, but you have to have tools that support it to use it. I believe you can use it, but the results will not appear in MilkShape, only from game testing.

If you like to say what you think, be sure you know which to do first.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#195 Old 26th Aug 2010 at 9:46 PM
Quote: Originally posted by Wes
Programs like 3DS Max and Maya haev solvers, but the SMD conversions for Maya are buggy, at best (and both are in a price class that places them outside the modding mainstream).


Blender 3d also has IK solving, though I haven't tried it outside of Blender itself.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
Original Poster
#196 Old 27th Aug 2010 at 1:57 AM
How good is the SMD support?

Or perhaps I should ask you if Blender is what you have been working on animations in (which would answer the question)?

I wrote the program as a converter instead of a plug-in, just so it could be more universal... but despite the popularity of half-life (the origin of the format) among game modders, there is less SMD support that works right than I had hoped. If it works well with Blender, that would validate some of my hopes for the design.

I don't use Blender mainly because I am just not smart enough to remember the details of how to work more than a few programs. I suspect it will become more popular when they finish reworking the interface to be more mainstream. I have a few programs that I do use (MotionBuilder, Composite) with similar proprietary dialogs that I use because I need them, but I grit my teeth the whole while. They show themselves as being bad examples of how to write cross-platform programs.

If you like to say what you think, be sure you know which to do first.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#197 Old 27th Aug 2010 at 2:15 AM
I've used Blender for some animations and the .smd worked fine (with a little editing, axis-wise). There is only one working SMD script that I know of, and it only exports, but it does work. I'm not sure it works for 2.5.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
Original Poster
#198 Old 27th Aug 2010 at 3:29 AM
Thanks for the answer.

So many opportunities, so little time.

If you like to say what you think, be sure you know which to do first.
Field Researcher
#199 Old 4th Sep 2010 at 10:14 PM
Default Downloads Section
Should your tool be moved to the downloads section?

Error: Keyboard not attached. Press F1 to continue. - Windows XP Setup
Hey! It compiles! Ship it! - Microsoft
Love is Hate. War is Peace. Windows is stable. - 1984 (sort of)
Alchemist
Original Poster
#200 Old 5th Sep 2010 at 12:42 AM
Even my UniMesh plug-ins (for TS2), which haven't had a major revision in years, are still in TESTERS WANTED status. Permanent beta, I guess.

I have been looking for another interested party who would like to take ownership of it. It is a C program compiled with a C++ compiler. No wimpy object-obfuscated code for me.

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