Skip to content

Converter Config

Model Converter includes a special config file — config.json.

Group merging

The merging rules in config.json:

{
            "merge" : "strip",
            "compare" : "contains",
            "key" : "soldier_tabard",
            "tokens" : ["_bttm", "_top", "_back"]
        },
        {
            "merge" : "replace",
            "compare" : "contains",
            "key" : "hair_",
            "tokens" : ["soldier_helmet_02"]
        },
  • merge — merge mode of a group.
    • strip — truncates group name by the following tokens. soldier_tabard_bttm will be turned into soldier_tabard and then be used as a base for group name — soldier_tabard_grp.
    • replace — replaces the group name with the first token (other values are ignored). soldier_hair_01 will be turned into soldier_helmet_02.
  • compare — currently only compare is supported. The rule triggers if the group name contains key.
  • key — a keyword for the rule to trigger.
  • tokens — tokens that are used by merging operation.

Regions

For PvE constructors, additional affixes containing region information must be applied. This process occurs only if the model name contains constructor in it.

"modelNameContains": "constructor",
    "exceptionList": [ "_ammo", "_bag", "_vanity" ],
    "leftTokens": [ "_l" ],
    "leftRegion": "LEFT_",
    "rightTokens": [ "_r" ],
    "rightRegion": "RIGHT_",
    "regions": [
      {
        "centered": true,
        "tokens": [ "cuirasse", "plate", "chest", "neck", "belt" ],
        "region": "CHEST"
      },
      {
        "centered": true,
        "tokens": [ "tabard" ],
        "contains": "rend",
        "region": "CLOTH"
      },
      {
        "centered": false,
        "tokens": [ "shoulder" ],
        "region": "PAULDRON"
      }
    ]

Common settings of the region rules:

  • modelNameContains — regions will be applied only if the model name contains this value.
  • exceptionList — if the object name contains any of those tokens, regions will not be applied. Regions applied to wrong model parts might cause shader misses. Example: a leather bag will be assumed to be colourable if region is applied, but there is no such shader for leather material that is colourable.
  • leftTokens\rightTokens — if the object name contains any of those tokens, it is assumed to be left-sided or right-sided.
  • leftRegion\rightRegion — prefix to be added to the region name. Example: LEFT_PAULDRON and RIGHT_PAULDRON.

Region rule settings:

  • centered — if true, sideness prefix is applied to the name.
  • tokens — if object name contains any of those tokens, the rule triggers.
  • contains — optional parameter. Rule triggers if any of the tokens are present in object name AND object name contains the contains value. Example: apply the CLOTH region to anything that contains word tabard and rend, excluding tabard_sim, but including tabard_01_rend (case when token tabard_rend is not enough).
  • region — region name to be applied to the object.

Warhammer 40,000: Space Marine 2 © Games Workshop Limited 2024. Space Marine, the Space Marine logo, GW, Games Workshop, 40K, Warhammer, Warhammer 40,000, 40,000, the 'Aquila' Double-headed Eagle logo, and all associated logos, illustrations, images, names, creatures, races, vehicles, locations, weapons, characters, and the distinctive likeness thereof, are either ® or TM, and/or © Games Workshop Limited, variably registered around the world, and used under licence. Focus Entertainment and its logos are trademarks, registered or not, of Focus Entertainment. Saber Interactive and its logos are trademarks, registered or not, of Saber Interactive. Powered by Wwise © 2006 – 2024 Audiokinetic Inc. Havok software is © 2024 Microsoft. Uses Bink Video. Copyright © 1997-2024 by Epic Games Tools LLC. All rights reserved to their respective owners.