Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Strat Models - M2TW"

From TWC Wiki
Jump to navigationJump to search
(Strat Trees)
Line 1: Line 1:
 
For everything you always wanted to know about the campaign map models in [[M2TW]].
 
For everything you always wanted to know about the campaign map models in [[M2TW]].
 +
 +
The campaign map models in M2TW are based on .cas models for mesh and animations and .tga textures.  All of the strat elements seem to have problems with shadows if vertexes are placed too close together on the line of the light rays.
  
  
Line 20: Line 22:
 
==Strat Characters==
 
==Strat Characters==
 
The Strat Flag position follows '''roughly''' the path of the Bone_Lhand in the strat character skeleton.  It seems to follow a smoothed less exact path, so can appear out of sync with some movements.
 
The Strat Flag position follows '''roughly''' the path of the Bone_Lhand in the strat character skeleton.  It seems to follow a smoothed less exact path, so can appear out of sync with some movements.
 +
 +
Strat character models and anims can have up to '''24 bones''' in addition to the Scene Root.
 +
 +
The basepose in the strat animations is only used to name the bones, changing the x,y,z locations of bones in it will not affect the animations.  It overrides the naming of the bones in animation and mesh .cas's - so if the 5th bone in the basepose.cas is Bone_Lhand, it will be the 5th bone in the anim that the banner follows.
 +
 +
Strat characters use a separate '''shadow.cas''' this is a simplified figure with the same skeleton as the visible character, this figure is not textured and is used by the game solely to cast the shadow, thus avoiding the problems caused if you try and cast a shadow from a complex object. 
  
 
==Strat Trees==
 
==Strat Trees==
Line 25: Line 33:
  
 
Trees are not revolved on the campaign map, and 'back-faces' of the model aren't seen, so some detail at the rear of models can be omitted.
 
Trees are not revolved on the campaign map, and 'back-faces' of the model aren't seen, so some detail at the rear of models can be omitted.
 +
 +
==Bridges==
 +
The bridge .cas models are revolved by the game to 0, 90, 180 and 270 degrees to suit the river angle '''and direction'''.  Unfortunately, the shadow cast by the model only revolves between 0 and 90, you therefore need a model that is symmetrical about its x and y axis so the shadow cast at 0 angle looks correct for the model revolved to 180!
 +
  
 
==Resources==
 
==Resources==

Revision as of 07:25, 15 September 2020

For everything you always wanted to know about the campaign map models in M2TW.

The campaign map models in M2TW are based on .cas models for mesh and animations and .tga textures. All of the strat elements seem to have problems with shadows if vertexes are placed too close together on the line of the light rays.


Strat Flag

The strat flag carried by units consists of one .cas model to which each faction's symbol is applied. The size of the displayed symbol cannot be altered by changing the .cas model.

The model comprises three components:

  • banner
  • pole
  • symbol

The background the faction's symbol is displayed on is the 'banner' mesh in the model, this has to be one flat plane, it appears to have a texture uv mapped onto the plane, but the uv map used by the game is actually just the co-ordinates given for 'flag' in descr_standards.txt. The visible parts of the texture are also overlayed with the faction's colour with a darker section that expands from the bottom that shows the strength of the army. If you apply an alpha channel to the texture then the faction colour background also won't be shown in any alpha'd out area. The position of the faction's symbol in left/right and up/down plane is determined by a hard-coded relationship to the 'banner' mesh, so changing the size of the banner mesh can also move the symbol position.

In terms of depth the texture of the banner, and the faction/strength colouring is always shown as though the mesh were at zero on the front/back axis, but the faction symbol position moves to the front/back axis location of the 'banner' mesh. The banner mesh therefore needs to be slightly in front of 0 in the front/back axis so the faction symbol appears in front of it.

The 'pole' is a conventional piece of mesh with texture.

The 'symbol' mesh although required doesn't appear to do anything if changed.

Strat Characters

The Strat Flag position follows roughly the path of the Bone_Lhand in the strat character skeleton. It seems to follow a smoothed less exact path, so can appear out of sync with some movements.

Strat character models and anims can have up to 24 bones in addition to the Scene Root.

The basepose in the strat animations is only used to name the bones, changing the x,y,z locations of bones in it will not affect the animations. It overrides the naming of the bones in animation and mesh .cas's - so if the 5th bone in the basepose.cas is Bone_Lhand, it will be the 5th bone in the anim that the banner follows.

Strat characters use a separate shadow.cas this is a simplified figure with the same skeleton as the visible character, this figure is not textured and is used by the game solely to cast the shadow, thus avoiding the problems caused if you try and cast a shadow from a complex object.

Strat Trees

Trees appear to sway, but they don't have an animation in the .cas file. The sway seems to be a hard-coded movement around their 0,0,0 location.

Trees are not revolved on the campaign map, and 'back-faces' of the model aren't seen, so some detail at the rear of models can be omitted.

Bridges

The bridge .cas models are revolved by the game to 0, 90, 180 and 270 degrees to suit the river angle and direction. Unfortunately, the shadow cast by the model only revolves between 0 and 90, you therefore need a model that is symmetrical about its x and y axis so the shadow cast at 0 angle looks correct for the model revolved to 180!


Resources

Mountains

Cliffs