User Tools

Site Tools


en:games:star_trek_armada_1:modding:sod_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:games:star_trek_armada_1:modding:sod_files [2025-03-23-14-54] – [Polygon Mesh Data] 7saturnen:games:star_trek_armada_1:modding:sod_files [2025-04-23-20-19] (current) – [File Header] 7saturn
Line 37: Line 37:
 Every SOD starts with the ASCII string ''Storm3D_SW'', followed by the version of the used format in form of one FLOAT value. So the header always has the length of 14 bytes. For //Star Trek: Armada// the version is 1.8, making the 4 version bytes always be 0x66 0x66 0xE6 0x3D. Every SOD starts with the ASCII string ''Storm3D_SW'', followed by the version of the used format in form of one FLOAT value. So the header always has the length of 14 bytes. For //Star Trek: Armada// the version is 1.8, making the 4 version bytes always be 0x66 0x66 0xE6 0x3D.
  
 +**Note**: There are two stock game files, //Favenger.SOD// and //Ksensor.SOD//, that have a different header. They start out with ''StarTrekDB''. It is likely that those two files are from an earlier stage of the Armada project, where the format was still different.
 ==== Lighting Materials ==== ==== Lighting Materials ====
 The second section of an SOD contains the characteristics of the vertex lighting materials. To understand this, we need some more definitions. The second section of an SOD contains the characteristics of the vertex lighting materials. To understand this, we need some more definitions.
Line 64: Line 65:
   - LIGHTING_MATERIAL ARRAY(//<number of materials>//).   - LIGHTING_MATERIAL ARRAY(//<number of materials>//).
  
 +Note: Lighting materials are usually not unique to a specific SOD but used by multiple SODs. As this is the case, loading can be expedited considerably by not loading lighting materials anew for each SOD, but looking for already loaded materials from previously loaded SODs. One implication of that is, that the materials are consistent across SODs. One special aspect about this is the file //Material.SOD//, which contains a number of materials being loaded prior to most SODs, defining the most common materials.
 +
 +**Note**: While the above definitions work just fine with colors, one thing that is not immediately obvious is how team colors are created. Any material whose name starts with //team_// will be colored with the team color. This means, there can be multiple, different materials, that will exhibit the team color. Applying such a material to a mesh will make it glow in the color of the team.
 ==== Nodes ==== ==== Nodes ====
-Nodes have various implications on the behavior of a unit or station, including things like firing direction, damage indicators or LODs used. They come in five different types.+The third section in an SOD are the nodes, which have various implications on the behavior of a unit or station, including things like firing direction, damage indicators, mesh referencing or LODs used. They come in five different types.
  
 NODE_TYPE: NODE_TYPE:
Line 129: Line 133:
 TYPE_SPECIFIC_DATA<MESH> TYPE_SPECIFIC_DATA<MESH>
 ^  Data Type  ^  Meaning  ^ ^  Data Type  ^  Meaning  ^
-| IDENTIFIER | Texture material name, can be an empty string for default. See also TEXTURE_MATERIAL in [[#animation_references|Animation References]]. |+| IDENTIFIER | Texture material name, can be an empty string for default. See also section [[#texture_materials|Texture Materials]]. |
 | IDENTIFIER | Texture (can be an empty string, of none is applied) | | IDENTIFIER | Texture (can be an empty string, of none is applied) |
 | UINT16 | Number of vertices | | UINT16 | Number of vertices |
Line 140: Line 144:
 | UINT16 | Always 0 | | UINT16 | Always 0 |
  
 +==== Animation Channels ====
 +The fourth section of an SOD contains the animation channels. An animation is basically the model altered in form and texture for each point in time, allowing for a series of meshes to be shown one after another, like in a movie, making up the animation/movement of said model. This gives a model the means of moving, for example a fan rotating instead of standing still.
 +
 +Animation channels are basically the animation of the mesh itself. If the textures on the faces are supposed to change as well, those would be the [[#animation_references|Animation References]].
 +
 +An animation channel consists of the following data:
 +
 +ANIMATION_CHANNEL
 +^  Data Type  ^  Meaning  ^
 +| IDENTIFIER | The node being referenced by the animation channel |
 +| UINT16 | Number of key frames used by the channel |
 +| FLOAT | Duration this channel lasts |
 +| UINT16 | Always zero (unused) |
 +| MATRIX34 ARRAY | Key frame data, the actual animation transformation, which will be distributed over time evenly during the duration this channel takes |
 +
 +The entirety of animations is stored like this:
 +^  Data Type  ^  Meaning  ^
 +| UINT16 | Number of animation channels following |
 +| ANIMATION_CHANNEL ARRAY | The actual animation channel data of each element. |
  
 ==== Animation References ==== ==== Animation References ====
 +The fifth and last section contains the animation references. In contrast to the [[#animation_channels|Animation Channels]], animation references are used to animate the textures themselves. The textures used for this are basically [[sprites]]. So each step of the animation from a sprite is used during the animation sequence, but as part of a model.
 +
 +The animation is made up as a list of animation references of this form:
 +
 +ANIMATION_REFERENCE
 +^  Data Type  ^  Meaning  ^
 +| UINT8 | Type of the reference, always 4 |
 +| IDENTIFIER | The node to which this animation belongs. |
 +| IDENTIFIER | Sprite animation used for this node. |
 +| FLOAT | Time offset (in seconds) used for this animation reference. |
 +
 +The animation references are then stored as a list:
 +
 +^  Data Type  ^  Meaning  ^
 +| UINT16 | Number of animation references to follow |
 +| ANIMATION_REFERENCE ARRAY | The list of all animation references. |
 +
 +==== Texture Materials ====
 +A texture material defines characteristics of a polygon rasterizer used to render the polygons of a given mesh. In case of //Star Trek: Armada//, there is a fixed set (hard coded) of allowed values:
 +^  Material  ^  Meaning  ^
 +| default | Standard material |
 +| additive | Utilize additive blending |
 +| translucent | Semi transparent |
 +| alphathreshold | Cut outs in objects can be realized with alpha channels. They have hard edges but are drawn faster. |
 +| alpha | Makes use of an alpha channel. In contrast to //alphathreshold// this requires sorting of layers, which has some performance drawbacks, but looks better. |
 +| wireframe | Uses only wireframe graphics |
 +
 ===== Web Links ===== ===== Web Links =====
   * [[http://armadafiles.com/files/armada-2/official-releases/other/storm3d-object-definition-sod-file-format-18/details|Storm3D Object Definition (SOD) File Format on Armada Files]]   * [[http://armadafiles.com/files/armada-2/official-releases/other/storm3d-object-definition-sod-file-format-18/details|Storm3D Object Definition (SOD) File Format on Armada Files]]
   * [[https://en.ds-servers.com/gf/armada-2/official-releases/other/storm3d-object-definition-sod-file-format.html|Storm3D Object Definition (SOD) File Format on DS-Servers]]   * [[https://en.ds-servers.com/gf/armada-2/official-releases/other/storm3d-object-definition-sod-file-format.html|Storm3D Object Definition (SOD) File Format on DS-Servers]]
   * [[https://www.gamefront.com/games/armada-2/file/storm3d-object-definition-sod-file-format|Storm3D Object Definition (SOD) File Format on GameFront]]   * [[https://www.gamefront.com/games/armada-2/file/storm3d-object-definition-sod-file-format|Storm3D Object Definition (SOD) File Format on GameFront]]
 +
 +===== See Also =====
 +  * [[en:games:star_trek_armada_1:modding:Model Hierarchy]]
  
 {{page>footer&nofooter}} {{page>footer&nofooter}}
en/games/star_trek_armada_1/modding/sod_files.1742741692.txt.gz · Last modified: 2025-03-23-14-54 by 7saturn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki