Difference between revisions of ".animinstances file - M2TW"
(trying to clarify - god I hate this stuff...) |
(clear as mud...) |
||
Line 1: | Line 1: | ||
− | The .animinstances file is one of the [[Battle Map Buildings - M2TW|M2TW battlemap building]] world files. | + | ---- |
+ | '''The .animinstances file is one of the [[Battle Map Buildings - M2TW|M2TW battlemap building]] world files. The .animinstances file used is specified inside the .world file.''' | ||
− | The function of the file is to provide some of the information for the animated transitions that occur when some objects switch from undamaged to damaged group, or in the case of gates, open or close. Not all multi-group objects have an animation. The objects that have the most obvious animation are the wall breach areas and gates. | + | The function of the file is to provide some of the information for the animated transitions that occur when some objects switch from undamaged to damaged group, or in the case of gates, open or close. Not all multi-group objects have an animation. The objects that have the most obvious animation are the wall breach areas and gates. |
+ | |||
+ | Walls typically pass through a number of animations as they switch between damaged states, the animation is not strictly required, it is possible to create a wall which changes state without using an animation. Gates do require an animation especially for the open/close situations - the 'open' position of the gate is actually part of the animation not one of the objects' groups - not having the open animation A. looks stupid as some troops will walk through the gate, B. messes up the battle as some troops will get stuck at the closed gate! | ||
+ | |||
+ | ==File Contents== | ||
+ | The .animinstances file contains a count of the total number of objects in the .world - if the .animinstances / .worldcollision and/or .world files have become mismatched and contain different numbers of objects that can cause a battle loading CTD. | ||
+ | |||
+ | The file then contains an entry for each object in order - that will either be a '0' for objects without an animation or will contain a binary segment for each transition for objects with an animation. The binary segments start with the name of the transition, followed by vertex coordinates for the starting position of the animation, and shading and effect illumination information for those vertexes at various stages of the animation. The binary segments are in compressed form, and need to be 'un-packed' to produce recognisable data. | ||
+ | |||
+ | The file does not contain rotation or bone assignment data, or texture or uv mapping data. | ||
==Related Files== | ==Related Files== | ||
+ | |||
+ | ===.anim Files=== | ||
+ | The .animfiles, located in data/blockset/culture/animations/etc contain the key frames for the animation, its rotations and movements. The .anim file used is specified inside the .world file. | ||
+ | |||
===.mesh Files=== | ===.mesh Files=== | ||
The .mesh files, located in data/blockset/culture/animations/etc contain the bone assignments for each vertex involved in the animated model, the texture name/path to be used, and the UV mapping used. | The .mesh files, located in data/blockset/culture/animations/etc contain the bone assignments for each vertex involved in the animated model, the texture name/path to be used, and the UV mapping used. | ||
− | + | The following two pictures show how the appearance of a typical wall object changes whilst in animation mode if a different texture is specified in the mesh, from that used in the .world for the structure: | |
− | The | + | |
+ | [[Image:Animtexture.jpg|frame|left|Normal wall texture used for the structure.]] [[Image:Worldtexture.jpg|frame|center|'Litter' texture specified in the .mesh, will show during the animated transitions]] | ||
− | ===Relationship to .worldcollision | + | ===Relationship to .worldcollision volume=== |
Experimentation shows that the animinstances file does not contain the co-ordinate data for the animation in relation to the settlement plan. Moving the objects collision volume in the[[.worldcollision]] file results in the animated version moving to the new position of the collision volume. | Experimentation shows that the animinstances file does not contain the co-ordinate data for the animation in relation to the settlement plan. Moving the objects collision volume in the[[.worldcollision]] file results in the animated version moving to the new position of the collision volume. | ||
Line 16: | Line 31: | ||
In this example the normally visible structural groups have been moved backwards in the ms3d file the pathfinding and docking information has been left as it was, and the collision volume has been moved forward and right: | In this example the normally visible structural groups have been moved backwards in the ms3d file the pathfinding and docking information has been left as it was, and the collision volume has been moved forward and right: | ||
− | [[Image:Objectmoved.jpg | + | [[Image:Objectmoved.jpg|frame|left|The unit that deployed the ladders to the old docking position then abandoned them - they wouldn't climb ladders because the deployment area where they would normally stand on top of the wall no-longer has a collision volume associated with it.]] |
− | + | [[Image:Collisionmoved.jpg|frame|center|When the wall gets to the damage level where the animated transition comes in the wall appears in the collision volume location.]] | |
− | |||
− | |||
− | When the wall gets to the damage level where the animated transition comes in the wall appears in the collision volume location. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <br> | |
+ | Animations appearing in the 'wrong' location will be because the collision volume doesn't align with the visible object. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Battle Map Modification - M2TW]] | [[Category:Battle Map Modification - M2TW]] | ||
+ | ---- |
Revision as of 07:58, 17 April 2017
The .animinstances file is one of the M2TW battlemap building world files. The .animinstances file used is specified inside the .world file.
The function of the file is to provide some of the information for the animated transitions that occur when some objects switch from undamaged to damaged group, or in the case of gates, open or close. Not all multi-group objects have an animation. The objects that have the most obvious animation are the wall breach areas and gates.
Walls typically pass through a number of animations as they switch between damaged states, the animation is not strictly required, it is possible to create a wall which changes state without using an animation. Gates do require an animation especially for the open/close situations - the 'open' position of the gate is actually part of the animation not one of the objects' groups - not having the open animation A. looks stupid as some troops will walk through the gate, B. messes up the battle as some troops will get stuck at the closed gate!
Contents
File Contents
The .animinstances file contains a count of the total number of objects in the .world - if the .animinstances / .worldcollision and/or .world files have become mismatched and contain different numbers of objects that can cause a battle loading CTD.
The file then contains an entry for each object in order - that will either be a '0' for objects without an animation or will contain a binary segment for each transition for objects with an animation. The binary segments start with the name of the transition, followed by vertex coordinates for the starting position of the animation, and shading and effect illumination information for those vertexes at various stages of the animation. The binary segments are in compressed form, and need to be 'un-packed' to produce recognisable data.
The file does not contain rotation or bone assignment data, or texture or uv mapping data.
Related Files
.anim Files
The .animfiles, located in data/blockset/culture/animations/etc contain the key frames for the animation, its rotations and movements. The .anim file used is specified inside the .world file.
.mesh Files
The .mesh files, located in data/blockset/culture/animations/etc contain the bone assignments for each vertex involved in the animated model, the texture name/path to be used, and the UV mapping used.
The following two pictures show how the appearance of a typical wall object changes whilst in animation mode if a different texture is specified in the mesh, from that used in the .world for the structure:
Relationship to .worldcollision volume
Experimentation shows that the animinstances file does not contain the co-ordinate data for the animation in relation to the settlement plan. Moving the objects collision volume in the.worldcollision file results in the animated version moving to the new position of the collision volume.
In this example the normally visible structural groups have been moved backwards in the ms3d file the pathfinding and docking information has been left as it was, and the collision volume has been moved forward and right:
Animations appearing in the 'wrong' location will be because the collision volume doesn't align with the visible object.