Changes

Jump to navigation Jump to search

Games/ATS/Modding guides/1.6

1,982 bytes added, 17:11, 2 March 2017
no edit summary
* A updated conversion tools generating this new format will be released soon.
* If necessary, existing PMG resources can be converted to the new format using the '''-conversion_dump_path''' command line option.
 
=== Low level format changes ===
 
==== Low level format changes ====
 
This is description of changes between the 0x506d6713 and 0x506d6714 version of the PMG format. It is intended to be used by people who are already familiar with the previous version of the format and need to access it directly.
 
* Changes to file header.
** A u32 field containing number of per vertex weights was added directly behind the field containing number of bones. The only allowed values are either 0 for rigid model or 4 for skinned model.
** Instead of tree separate blocks containing static, dynamic and skinning data respectively, there is only one block containing interleaved vertex data (see bellow). Offset and size fields for the separate blocks were removed and replaced by single offset and size for this combined block.
 
* Changes to piece header.
** A u32 field containing number of per vertex weights was removed.
** A u32 field containing size of a single interleaved vertex in bytes was added to the piece header between the AABB and positions offset.
** A u32 field containing offset of array with vertex influences was removed.
** A u32 field containing offset of array with indices was moved to the end of the piece header.
** The bone dependencies and weights offsets should be set to 0xffffffff if skinning data are not present (i.e. for rigid model)
 
* Interleaved vertex
** float3 position
** float3 normal
** (optional) float4 tangent
** u32 vertex color
** (optional) u32 secondary vertex color
** (optional) float2[texcoord_width] texture coordinate
** (bone_count > 0) u8[4] with 8bit bone indexes
** (bone_count > 0) u8[4] with 8bit bone weights
 
If the vertex is affected by less than four bones, those bones should be stored in the leading entries. The remaining entries should replicate bone index from the last valid entry and use a zero weight. There must be at least one bone affecting each vertex and sum of weights over all bones affecting a vertex should be 255.
== Prefab ==

Navigation menu