Part 2 – Animation Basics, tools and ModelDef.XML
Below is a stripped down extract from the ModelDef.Xml file we use. You will notice that some of the content is very similar to what you may have seen in MakeMdl.Parts.Xml but in a more formal XML form and we have added some goodies I will explain later…
1: <?xml version=”1.0″ encoding=”utf-8″ ?>
3: <Animation name=”Ambient” guid=”A6F1C5D0-BEF6-449e-BAF8-FB777F27808F” type=”Standard” typeParam=”AutoPlay,Random” />
4: <Animation name=”NonRandomAmbient” guid=”B03EC8F6-B8D3-4aaf-9F9A-C59FE26608D6″ type=”Standard” typeParam=”AutoPlay” />
5: <Animation name=”c_tire_blurred_key” guid=”4e1cc3e5-5933-445d-80e0-b0dd693125f0″ length=”100″ type=”Sim” typeParam2=”c_tire_blurred_key” typeParam=”AutoPlay” />
6: [… more animations go here …]
8: <AnimationGroup name=”GroupTests” guid=”0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B2″>
9: <AnimationRef guid=”40A98760-2FCB-4422-A469-7001DBAAB766″/>
10: <AnimationRef guid=”23FBBCC2-C861-41b4-90D2-051AC1BCA338″/>
20: <Variable>CENTER WHEEL RPM</Variable>
30: <Variable>CENTER WHEEL ROTATION ANGLE</Variable>
The file itself starts with a ModelInfo block, which is essentially the root container for all the animation and model related information within the XML file.
The following group of tags (the “Animation” tags) are essentially a decleration of the animations which will be contained in the XML file. These essentially tie actual animations to the apropriate “PartInfo” blocks which are found at the bottom of the sample file. I will go over the details of these and of the parameters for an “Animation” tag in a folloewing post.
The “AnimationGroup” tags are mostly for organization and allows animations to be categorized. This serves no purpose other than to allow some organization within the animation tool.
Speaking of animation tool, we now have a MaxScript based tool which allows for animations to be setup within 3DSMax. Since we are moving away from part name based associations and because we now allow multiple animations per part. We essentially need to know what animations are assigned to a model and where are the keyframes located. All the tool really does is add apropriate tags within Max (as NoteTrack entries) which gives information to our exporter as to which animations are attached to a model. I won’t go into too much details about the tool now, i’m sure one of our art bloggers will post more detailed information in regards to how animations are rigged with our new system.