View Full Version : Extra keyframes, jerkiness and initial positioning
11th Apr 2008, 04:35 AM
Got some questions as I play around with animations more that maybe some of you can help with.
1) Extra keyframes - I created an animation in MS3d and exported it using wes's tool. In Milkshape it had 18 key frames but when I import it into SimPE I end up with extra points and the animination in game has some extra movements after what I thought would be the end. I originally had more frames and changed the number of frames in Milkshape before exporting and making some additional changes. Would it have kept the extra frame info for some reason and the plug-in could still see it and therefore put it in game?
2) Jerkiness - Same animation as in question 1. When I made it the first time I only used keyframes in Milkshape on the odd number frames and let MS3d handle the in-betweens but I didn't actually set them as frames. Exported the anim and viewed it in game. Didn't look too bad although I needed to work on my timing some I think. Thought extra frames might help it out some so I went back into Milkshape and made the even frames keyframes as well and re-exported. Now the animation looks really jerky in game which seemed odd. Do I need to leave the room for in-between frames in MS3d to help keep it smooth or is there something I am missing in the concepts?
3) Initial position - What's the best method for getting the sim into the correct spot for the animation to start? I can make the sim walk go to the object and face it but it really needs to go forward a short step or too to align with the object. I didn't really want to have to animate that as well since I know it can be done in game but I've looked around at the threads about routing and slots and it didn't really make much sense at the moment. I think I saw something about XYZ offsets for an object but I can't find the thread now and not sure I really understood it all anyways. Some extra insight would be helpful at this point.
Sorry about the long post and all of the questions... I just figure that the more questions people ask out loud the more answers others can find when they have the same questions...
I know it helped me fix my limb doing the "long way round" problem... :)
My usual problem is that I know I read the answer somewhere but I can never seem to find it when I actually need the info... :lol:
Thanks for all the help everyone has provided though...
11th Apr 2008, 05:20 AM
1. Just reducing the number of frames in Milkshape doesn't actually remove any keyframes set after that point from its memory. I'm pretty sure that if you want to reduce the number of frames, you need to delete any trailing keyframes first.
2. Have you done much in the way of 3D animation before? The thing about keyframes is that you don't have to put them in at regular intervals, just at the points where movement is non-linear.
That is, if you want a sim to move his arm in a single smooth sweep across 10 frames, you should only put a keyframe at the start and at the end of those frames. The game (or Milkshape) will make a nice, smooth curve for the transitions between these points. If you put a keyframe at every frame, you'll get a jerky animation. There are a couple of reasons for this, and I can explain some of them if you're genuinely curious, but it's just as easy to call it a rule of thumb if you're not fussed. :) Basically, the fewer keyframes, the smoother your animation will come out!
3. You need to use routing slots. The "Move to relative location" is good for very general things, but when you need a sim to be in a very specific spot you need to specify that spot in the object. The spot is specified using a slot. There isn't much in the way of tutorials for doing this, but if you read the "adding new slots to a table" tutorial (by fisheeyes as I recall?) then read the Infocenter thread on slots you should have enough information to make one (or at least, move an existing one if your object already has one which you no longer need!).
11th Apr 2008, 05:38 AM
Thanks for the quick response.
To be honest I float around a lot on my projects since I have a hard time sticking to one thing sometimes... :)
1) I delved into what I had been working on and Milkshape did end up saving the old keyframes even if you close the file and reopen it they were still there. Just one more thing for me to keep in mind.
2) This one I will have to play around with I think. There have been times where it was a mixed blessing. The legs might move smoothly but the arms didn't go the way one would want because they needed an extra frame or two to make it travel in a realistic manner. I will try and experiment in those cases with making an extra frame and only move that part that needs the extra help and then finish the move in the next frame after that with all of the parts.
3) I had read some of that but like I said I can never seem to find the right info afterwards. I'm recovering from a shoulder injury at the moment (nothing major but still an inconvenience) so I have to take more breaks which make it hard to keep track of what I was doing last sometimes.
I can't really come up with a real project that I want to work on so I'm just throwing things together and seeing what happens and then learning from that. I've read most and done some of the tutorials as well as almost all of the other available stuff I could find. Unfortunately animation being the road less traveled seems to be less organized than some of the more established modding info is and makes it a little harder to pick up as smoothly right now...
I do appreciate all of the help though... helps with the insomnia... :lol:
11th Apr 2008, 05:39 AM
I was just about to be the first to reply, but when I came to the reply page, Echo's answer appeared from thin air! :D
As you can see animation is not easy, but if you play around with it often, you'll be an expert in no time! Here are some points I find useful while I animate:
1) Never set keyframes side-by-side one after another. It's always good to keep your keyframes a good way apart from from each other in MS3D, at least 4 frames between each frame in Milkshape. That way, you can still add in keyframes in between if you decide to do so later. Secondly, you can preview your animation in MS3D alone by the play button and see how smooth your animation runs without having to go in game.
2) If you want to prolong that particular timing between keyframes, just add more than 4 frames in-between, say 9 or 14 or even more for slower parts.
3) When you find than you are reaching the end of the animation timeline in MS3D, increase the Total Frame and Max Frame with the same but larger number. If you find that you have extra or decide to reduce the frames, remember to delete any keyframes that you have previously done within the portion you want to delete. Reducing frames will not wipe out keyframes, only Delete Keyframe does. If you did not delete them, then you will still find them present when you re-increase the Total Frames.
4) When you're done, play your animation and use the slider to adjust the speed until you get perfection. Then use a stopwatch or any timer or your wristwatch to time the total time for your animation with that speed. Set your total time to this when you export your animation.
EDIT: And then Wyzzard responded as well...! I wished we could do animations in programmes other than MS3D. MS3d's animator need improvement.
11th Apr 2008, 06:37 AM
I was just about to be the first to reply, but when I came to the reply page, Echo's answer appeared from thin air! :D
That's because I am very very sneaky. :)
11th Apr 2008, 01:24 PM
Thanks for the suggestions Kodiak... I did preview it in Milkshape and as usual it always seems to look smoother there than it does in game... part of the learning process... :-)
Anyone have a rule of thumb about how many frames one should use per sec of animation... I know most people want 30 fps to not see jerkiness and I know the game engine will do a lot of the in-betweens for us but how many does the game need provided to work with as a rule to make it work best?
11th Apr 2008, 04:39 PM
Anyone have a rule of thumb about how many frames one should use per sec of animation...
Not a rule of thumb, but I've found that 10 fps in Milkshape is easier to work with than the default 24, and it doesn't seem affect the smoothness, neither in game nor in Milkshape. For this to work though, you need to set the fps in Milkshape before creating a new ms3d file else the display speed will be weird, and keyframes will be missing from already existing animations.
I know it helped me fix my limb doing the "long way round" problem...
I adress this in the "body animations tips and tricks" file uploaded here (http://freya.modthesims2.com/showthread.php?t=241067), if an easier solution was found I missed it... and would love to learn about it!
12th Apr 2008, 12:21 AM
Thanks for the advice marvine... I actually had already downloaded that and read it as well... :-)
Unfortunately I have read so much in the past week or two that I think I have forgotten more than I remember at times... :lol:
I must confess that I hadn't been doing much simming of late... was trapped in the World of Warcraft until the aforementioned shoulder problem cropped up and I couldn't handle the extended time at the computer where I had to constantly manipulate the mouse in order to play well... I got bored with TV quickly enough and about the only game I have that doesn't require large amounts of actual interaction was the Sims... you can queue up a lot of actions and just sit back and watch for a bit... I had tinkered with modding in the original Sims so it didn't take long for me to get the bug again so I just started doing some heavy lurking... the pain in my shoulder made it hard to sleep so I stayed up into the wee hours of the morning downloading/reading the tutorials and pouring over the forums posts until I could fall asleep... :-)
So now I am playing around with things and have started getting questions that I either couldn't find the answer too or knew I had seen the answer somewhere but couldn't retrace my steps to where I had seen it...
My foray into animation was partly to step away from my lighting texture issue I am having in the hopes when I went back I would be able to look at it differently and perhaps see my solution or find an answer as I browse more...
As for the rotation thing... no magic bullet... I was lucky and it was just one limb so I went into SimPE and pulled it up in the animation resource and anytime it was a negative number in the degrees box I subtracted that from 360 and put that number in it's place... I got lucky and it worked out okay...
12th Apr 2008, 01:48 AM
The long-way-around issue is a generic animation problem. Specifying a rotation using 180 degrees or greater leaves the interpretation up to the rendering software, no two of which are the same. I read tips and tricks on animation using other software packages and other game platforms and the rule-of-thumb I see most is to break a complete rotation into three 120 degrees steps (plus a fourth frame for the end position).
There is a fundamental difference between the way MilkShape is built and the way the game engine works regarding the frame counter. In MilkShape, the FPS value is actually sort of generic, but none-the-less represents steps of equal size.
The game engine uses steps with specified start times (in milliseconds). In my exporter, I create these times by using the length specified in the dialog box and the number of frames used in the animation to obtain a time value for each frame.
So, it is possible to obtain very close time values by using a huge number of frames. Animations of thousands of keyframes will work in MilkShape, as long as you don't use them all. So (and of course depending on the computer horsepower available) a two second animation with two thousand frames would yield the maximum precision available in the game. In practice, a hundred frames per second would probably be plenty (again, only the needed frames are populated) for the most demanding timing needs.
And the issue of numbering -180 to +180 versus 0 to 360 for rotations is still open, and the answer seems to vary depending on which bone, which axis and which rotation direction is needed. That is where hand editing, as you taught yourself, is indispensible.
<* Wes *>
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.