<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
		<id>http://mm2kiwi.apan.is-a-geek.com/index.php?action=history&amp;feed=atom&amp;title=Pedestrian_animations</id>
		<title>Pedestrian animations - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mm2kiwi.apan.is-a-geek.com/index.php?action=history&amp;feed=atom&amp;title=Pedestrian_animations"/>
		<link rel="alternate" type="text/html" href="http://mm2kiwi.apan.is-a-geek.com/index.php?title=Pedestrian_animations&amp;action=history"/>
		<updated>2026-04-22T10:03:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://mm2kiwi.apan.is-a-geek.com/index.php?title=Pedestrian_animations&amp;diff=1308&amp;oldid=prev</id>
		<title>Fre-Ber at 22:04, 12 August 2005</title>
		<link rel="alternate" type="text/html" href="http://mm2kiwi.apan.is-a-geek.com/index.php?title=Pedestrian_animations&amp;diff=1308&amp;oldid=prev"/>
				<updated>2005-08-12T22:04:08Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Each animation sequence, associated with a state, is made up by a number of key frames. Each key frame has several parameters that should be applied to each bone in the skeleton. By moving the skeleton, the entire model will move.&lt;br /&gt;
&lt;br /&gt;
==The format==&lt;br /&gt;
The files are binary files, they start with a header containing some parameters:&lt;br /&gt;
&lt;br /&gt;
* Number of channels&amp;lt;br&amp;gt;Unsigned long integer, defining the number of channels to animate. It might be possible to animate more than just the motion of the bones. I have only seen one channel used though.&lt;br /&gt;
* Number of frames&amp;lt;br&amp;gt;Unsigned long integer, defines the number of key frames in this sequence.&lt;br /&gt;
&lt;br /&gt;
After this header comes a list of all channels to animate, each channel has a header of it's own:&lt;br /&gt;
&lt;br /&gt;
* Number of floats per frame&amp;lt;br&amp;gt;Unsigned long integer defining how many floats make up each frame in this channel.&lt;br /&gt;
* Unknown&amp;lt;br&amp;gt;Float of unknown purpose.&lt;br /&gt;
* Channel type&amp;lt;br&amp;gt;The type of the channel, I have only seen 0x01 here, but other values might make other things animate, texture coordinates or colour values for example.&lt;br /&gt;
&lt;br /&gt;
After the channel header comes all key frames. For the channel of type 0x01 each key frame first contains three floats defining a translation of the root bone. Then follows a list of three floats for each bone in the skeleton. The floats represent roll, pitch and heading angles respectively.&lt;br /&gt;
&lt;br /&gt;
A C-style format definition looks like this:&lt;br /&gt;
&lt;br /&gt;
 struct Anim&lt;br /&gt;
 {&lt;br /&gt;
     ulong nChannels;&lt;br /&gt;
     ulong nFrames;&lt;br /&gt;
     Channel channels[nChannels];&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 struct Channel&lt;br /&gt;
 {&lt;br /&gt;
     ulong nFloatsPerFrame;&lt;br /&gt;
     float unknown;&lt;br /&gt;
     byte channelType;&lt;br /&gt;
     Frame frames[nFrames];&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 union Frame&lt;br /&gt;
 {&lt;br /&gt;
     RPHFrame rphFrame;                // If channelType = 0x01&lt;br /&gt;
     float floats[nFloatsPerFrame];    // Other channel types&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 struct RPHFrame&lt;br /&gt;
 {&lt;br /&gt;
     Vector translation; // Translation of the root bone for this frame&lt;br /&gt;
     RPH rph[nBones];    // Roll, Pitch and Heading angles&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 struct RPH&lt;br /&gt;
 {&lt;br /&gt;
     float roll;    // Angle in radians&lt;br /&gt;
     float pitch;   // Angle in radians&lt;br /&gt;
     float heading; // Angle in radians&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that for channel type 0x01, nFloatsPerFrame = (nBones + 1) * 3.&lt;/div&gt;</summary>
		<author><name>Fre-Ber</name></author>	</entry>

	</feed>