Sign in to follow this  
Skybox

MoCap data and game framerate synchronization?

Recommended Posts

Skybox    122
Greetings, triangle overlords of the GameDev community!

Please, forgive my ignorance in this matter, but I was wondering about something related to motion capture, as I understand most recording devices work at the rate of up to 30 frames per second, right? And the ideal, smooth framerate for a game is 60 frames per second, being synchronized with the vertical retrace of most today's displays. What I was wondering about is: how does that data get into the game, since that would mean that for 1 second in the game, we lose 2 seconds in the motion capture data effectively reducing the performance in half. I am aware of the fact that the number of frames per second could simply be called "temporal resolution" or precision/definition of some data capture as in various high-rate cameras which can capture an immense numbers of frames for additional detail. But here it's the other way around.

So, how does this actually get into the game that is running at 60 frames per second, is it automatically resolved or does a technical artist actually interpolate the keyframe distance manually, effectively synchronizing the captured data with the desired rendering framerate? Or do you let animated characters simply run at the halved framerate, asynchronously with the rest of the drawing?

Am I making any sense? Please help!

Share this post


Link to post
Share on other sites
Ashaman73    13715
Motion capture data are for animation and they will most likely be used in an animation tool like (max,maya,blender) where an artist needs to tweak them and prepare them for in-game use.

The animation data will then be exported from the animation tool, often with a fix timesteps (=fps) which are lower than 30fps. The exported steps are called key-frames. Eventually the game engine will interpolate(=calculation of intermediate frames) the animation between two keyframes, so even an animation speed of 10 fps will be interpolated without problems to a display speed of 60 fps.

Share this post


Link to post
Share on other sites
Hodgman    51326
[quote name='Skybox' timestamp='1305512991' post='4811302']
So, how does this actually get into the game that is running at 60 frames per second, is it automatically resolved or does a technical artist actually interpolate the keyframe distance manually[/quote]This is the whole point of key-frames. You know where something should be at the key-frames only. Any in-between time can be automatically interpolated. They key-frames themselves might also be at variable delays -- e.g. an animation could have 10 key-frames @ 20fps, then 12 @ 60fps, then another 10 @ 30fps. The game, knowing how many seconds into the animation it is, can find the nearest two key-frames and interpolate them.


A few other notes:
- 60fps for a game is the *target* -- the actual framerate is variable. The game could be running at 45fps and everything still works the same.
- Mocap data cannot (usually) be directly used by a game. It's usually very noisy and has to be used as a staring-point by an animator, who will use it to build the final game animations.
- Even if an animator authors an animation at 30fps, the game-engines compression routines might decide to throw out any superfluous key-frames.
E.g. if an object is moving at a constant speed in a straight line for half a second, only the key-frames at the beginning/end of the motion need to be kept (the in-between frames will be correct just by standard interpolation, so there's no need to store them).

Share this post


Link to post
Share on other sites
Emergent    982
Slightly off-topic, but... Older Vicon mocap systems capture at 100Hz, and newer ones at 200Hz -- not 60Hz. I've tried out some cheaper OptiTrack cameras too; I'm not sure but I think they also captured at 100Hz... (Not that this affects the heart of the matter, which is that keyframes are used, as others have written.)

Share this post


Link to post
Share on other sites
andy@vicon    100
Vicon just wished to add the following comments to this string as the key frames topic has been rationally explained.

1. Vicon systems are able to lock to and record to various frame rates; PAL, NTSC, film rates and multiples of these rates along with unique integer frames. Our systems are typically usued at 4 x NTSC (119.88fps) within the game industry
2. The quality of the data (e.g noise as referred in previous posting) is directly related to the quality of the motion capture system you have, without going into a full commercial sales pitch Vicon systems are used for various reasons one of them being the quality of the data and its usability within games - see www.youtube.com/users/vicon100

I hope this offers some help.

Andy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this