Problem with animations

Post » Tue May 11, 2010 4:45 am

I am still cutting my teeth on building my own models, and I've run into a strange animation problem.

The model works fine in nifskope, and the pump pistons move up and down appropriately. However, in-game, the pistons appear to stop at each key, pause, and then start again. It's supposed to be a fluid up and down motion. I have been messing the flags on the NiBSAnimationNode, and so far only 44 appears to do anything (nifskope doesn't know anything about the flags) All other values so far cause the animation to stop completely.

Although I manually calculated the key data, I used the flags off of a stock mesh, which I notice halts during every cycle (one of the dwemer steam machines) I wonder if that flag somehow affects that.

Any help appreciated!
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Tue May 11, 2010 4:27 am

If the flags are like the other animation controllers, 44 is active + clamp + 32. No idea what the 32 is, but try 40 (cycle) or 8 (cycle without that unknown flag). You may need to adjust the start time/stop time as well.
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

Post » Tue May 11, 2010 1:23 am

Do you have 8 (Active/Cycle) flag set for all NiKeyframeController nodes in your nifs? I assume you want a looped animation.
NiBSAnimationNode flag 42 usually works. I cannot recall details now but this NiBSAnimationNode flag determines how particles should follow or not (leave a trail) a moving source. I am not sure that NiBSAnimationNode node is required (it is usually used for animated textures and particles).
Check that all 0 time keys (translation, rotation, scale) have the same values as in the last time frame.
I guess you know this Max tutorial:
http://members.shaw.ca/DataDump/Downloads/AnimatingActivators.pdf

:)
User avatar
Felix Walde
 
Posts: 3333
Joined: Sat Jun 02, 2007 4:50 pm

Post » Mon May 10, 2010 4:57 pm

Do you have 8 (Active/Cycle) flag set for all NiKeyframeController nodes in your nifs? I assume you want a looped animation.
NiBSAnimationNode flag 42 usually works. I cannot recall details now but this NiBSAnimationNode flag determines how particles should follow or not (leave a trail) a moving source. I am not sure that NiBSAnimationNode node is required (it is usually used for animated textures and particles).
Check that all 0 time keys (translation, rotation, scale) have the same values as in the last time frame.
I guess you know this Max tutorial:
http://members.shaw.ca/DataDump/Downloads/AnimatingActivators.pdf

:)


Hmm, I haven't tried 42 - I should have known...

At any rate, yes - I did verify that the first and last keys had the same height, and that the final time in the controller equaled the time in the last key. I still haven't gotten it working perfectly, but I did find a compromise. I did away with the key that went through the zero point, and just had the keys oscillate through the two extent heights. This cleaned up the pauses in the middle. Unfortunately, the pauses at the end of each stroke are still there.

However, in a goofy sort of way, it actually looks more realistic - as if the cams in the machine are still turning, but haven't completely rotated. I may leave it as-is.
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Tue May 11, 2010 1:33 am

What are your Rotation Type and Translations Interpolation key types (NiKeyframeController/NiKeyframeData)? They should be linear (“LINEAR_KEY”).

From MaxImmerse docs:

“When rotating objects or systems, please use a Linear Rotation Controller for the best and most accurate results. TCB & Smooth Rotation are supported but not suggested and may provide wacky results in some cases. Ever have trouble in 3dMax or MaxImmerse getting something to simply rotate 360* without stuttering at the end of its rotation? Use a Linear Rotation Controller.”

:)
User avatar
Kevin Jay
 
Posts: 3431
Joined: Sun Apr 29, 2007 4:29 am

Post » Mon May 10, 2010 3:14 pm

What are your Rotation Type and Translations Interpolation key types (NiKeyframeController/NiKeyframeData)? They should be linear (“LINEAR_KEY”).

From MaxImmerse docs:

“When rotating objects or systems, please use a Linear Rotation Controller for the best and most accurate results. TCB & Smooth Rotation are supported but not suggested and may provide wacky results in some cases. Ever have trouble in 3dMax or MaxImmerse getting something to simply rotate 360* without stuttering at the end of its rotation? Use a Linear Rotation Controller.”

:)


Hmm, they were set to quadratic key. I've switched them to linear key, but I haven't noticed much of a difference. Of course, I stripped the animation down to the bare minimum. It's all of 3 keys at the moment.

I really want to tune it a bit more with additional transitions (specifically, I want the pistons to slow down, but not stop, towards the top and bottom) so perhaps this will correct the problem of the animations 'sticking' in places.
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Tue May 11, 2010 1:03 am

This “switching” should be done in 3D modeler. NifSope is not able to do the job. I have no clue how Blender deals with controller interpolations. Nif exporters are usually simply sampling controllers keys.
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am


Return to III - Morrowind