• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Problem with animation rescaling parts of my model

Started by Dianoga4, August 11, 2008, 04:24:34 PM

Previous topic - Next topic

Dianoga4

I built my own extractor that works right now with the top that spins no problem. So I wanted to create a upgraded version of it and so I did and parented it the same way as the first extractor and did the spinning animation for it. When I go to look at it in the editor, the bottom part is fine but the top part is really tiny compared to the bottom but it is spinning. If I go and not parent the parts, they look fine in game but don't animate. I can't figure out why this is happening especially since the first one worked.

A side question as well, the animation I wanted was to have the top just spin around continuously but fairly slow. In 3dmax it spins like it's suppose to but in the game, it rotates 90 degrees one way then stops and reverses the rotation 90 degrees. I must be doing something wrong.

Dia

Nielk1

Convert it into an editable mesh or poly in max. You applied a scale to the object instead of just editing the mesh. Converting it should work.

Click on the image...

bigbadbogie

1- Click on the part that is made really small, go to the heirarchy tab, click affect heirarchy only, then under reset click transform and scale.

2- If you have 20 frames (for example) then make it so that you have keyframes at 0,5,10,15,20 - instead of just at 0,10,20.
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

Nielk1

How does that help at all BBB? He has a scale issue. That is because he applied a scale to the mesh frame, but bz2 does not use those. I normally just ensure I edit the mesh directly.

Click on the image...

bigbadbogie

It fixes it. I used to have that problem pretty much all the time.

Try parenting an object to another one and rescale the child object, then export it.
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

Dianoga4

Both of what BBB said fixed both my problems so I thank you much sir!

Dia

Nielk1

I'm surprised that works.

I just avoid the issue altogether myself by not resizing mesh frames but the mesh itself.

Click on the image...

mrtwosheds

Rotation animations in bz2 are VERY picky about what KeyFrame values they use, try using the same keyframe values found in the ibpgen rotation, speed it up or slow it down by changing the keyframe numbers.(1 to 31)

This is the turbine animation from ibpgen.

AnimationSet {
   Animation anim-turbine {
      {frm-turbine}
      SI_AnimationKey {
         0;
         6;
         1; 4; 1.000000, 0.000000, 0.000000, 0.000000;;,
         8; 4; 0.758758, 0.000000, -0.651373, 0.000000;;,
         9; 4; 0.688967, -0.000000, -0.724793, -0.000000;;,
         24; 4; -0.688967, -0.000000, -0.724793, -0.000000;;,
         25; 4; 0.758758, 0.000000, 0.651373, 0.000000;;,
         31; 4; 0.994869, 0.000000, 0.101169, 0.000000;;;
      }
   }
Altering any of these KF values would probably cause an appearance of incomplete rotation such as you describe.

In order to create a rotation along a different axis, you would need to move entire column's of KF values to other column's.

Dianoga4

I was doing what BBB had mentioned, I was just using 1,10, and 20. I figured if it looked right in 3dmax it would be ok but apparently not heh. Anyways good to know these things as it will help in the future. Thanks everyone for your helpful input.

Dia

Avatar

For a good spin you need a minimum of four keyframes, one each at 0 degrees, 120 degrees, 240 degrees, and the final one which depends on the number of frames you have.  You can do more than that but you can't do less...

Also, if you make the first and last frames the exact same rotation amount you'll have a slight pause as the object completes the rotation.  You have to do a little math to get the rotation correct, as you always have one more frame than you think you do.

For example, a rotation using 30 frames to go 360 degrees is actually 31, as you go from 30 to 1 to restart the motion.

SO...  for example, set your animation to 29 frames, which would be 0 to 28 or 1 to 29 depending on what Frame your package starts the animation on (Max 3 starts at 0).  This gives you a total of 30 frames, counting the 'hidden' frame from 28 back to 0, which for 360 degrees means 12 degrees per frame.  If you use the minimum number of keyframes you'd have:

Frame 0: 0 degrees
Frame 9: 120 degrees
Frame 19: 240 degrees
Frame 28: 348 degrees.

After Frame 28 it would go back to frame 0 at 360/0 degrees and you've have a complete, smooth rotation.

Then again, nobody says something has to rotate at a constant angular velocity...

-Av-

Dianoga4

I do get the slight pause and thought about fixing it up but so far it's not really noticeable because the spin is pretty slow and who really sits there and watches the extractors spin anyways heh. Thanks for the info though, always like to find out all I can when I can.

Dia

Nielk1

I didn't read the first part of BBB's solution, but now I need it so, thx BBB :-p

Click on the image...