X
 
  • Filtre
  • Heure
  • Afficher
Tout nettoyer
nouveaux messages

  • [Tutoriel] Fichiers VariantMeshDefinitions

    http://www.twcenter.net/forums/showt...initions-files

    Ps : je ne sais pas comment on traduit "bone" du langage 3D anglais (os, squelette ?). Pareil pour "imposters".

    Ces fichiers contrôle l'aspect visuel des unités et l'équipement qu'elles contrôlent. Ceci est modifié depuis Shogun 2 où les fichiers unit_variant qui contrôlaient les visuels et les équipement étaient spécifiés dans les db.

    Les fichiers VariantMeshDefinition se trouvent dans le dossier VariantMeshes, principalement dans VariantMeshDefinitions, et d'autres dans _VariantModels.


    Regardons comment sont organisés ces fichiers, ils peuvent être ouvert avec le bloc not (ou n'importe quel éditeur de texte, contrairement à Shogun 2). Ici sera utilisé l'exemple Gre_Hoplites.VariantMeshDefinition.


    Code:
    <VARIANT_MESH>
        <SLOT name="skin" >
            <VARIANT_MESH>
                <SLOT name="hair" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/skin/greek_game_skin.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="beards" />
                <SLOT name="helmets" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/helmets/hellenic_thracians_basic.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/helmets/hellenic_thracians_crests.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/helmets/hellenic_attic.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/helmets/hellenic_attic_crest.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/helmets/hellenic_phyrgians_basic.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="clothing" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/armour/linothorax.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="cloaks" />
                <SLOT name="greaves" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/greaves/greaves.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/greaves/graves_basic.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="shield" attach_point="weapon_03" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/shield/hellenic_hoplon_painted_hoplite.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/shield/hellenic_hoplon_painted_hoplite.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/shield/hellenic_hoplon_painted_hoplite.VariantMeshDefinition" />
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/shield/hellenic_hoplon_hoplite.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="weapon_1" attach_point="weapon_01" >
                    <VARIANT_MESH_REFERENCE definition="VariantMeshes/_VariantModels/man/weapons/short_spears.VariantMeshDefinition" />
                </SLOT>
                <SLOT name="weapon_2" />
                <SLOT name="weapon_3" />
                <SLOT name="weapon_4" />
            </VARIANT_MESH>
        </SLOT>
    </VARIANT_MESH>
    Comme vous pouvez le voir, ce fichier ne référence aucun fichier de modèle en lui-même. A la place il référence d'autres fichiers VariantMeshDefinition qui ont été créés comme des collections d'armures, d'armes, de casques, de boucliers et ainsi pour chaque type. C'est comme cela que la grande majorité des unités de Rome II ont été mises ensembles d'un point de vue visuel, et beaucoup font référence au même VariantMeshDefinitions. Ce système permet une construction bien plus rapide de ces définitions pour des mises à jours plus simples.

    Il est important de noter qu'alors que la plupart des noms sont là de manière "arbitraire", mais il y a certaines lignes qui sont requises pour la plupart des définitions, et principalement pour les boucliers et les armes.

    Chaque entrée est liée à un squelette d'arme, ce que vous pouvez voir pour l'entrée bouclier et weapon_1 des hoplites. La cartographie est la suivante :


    Code:
    "weapon_1": bone_1
    "weapon_2": bone_2
    "shield": bone_3
    "weapon_3": bone_4
    "weapon_4": bone_5
    Les armes sont alors assignés à ces squelettes de la sorte :
    Code:
    Sword              Weapon bone 2 
    Gladius            Weapon bone 2 
    Spear              Weapon bone 1
    Javelin             Weapon bone 5
    Shield              Weapon bone 3
    Pike                 Weapon bone 1
    Falx                 Weapon bone 1
    Standard         Weapon bone 1
    Bow                Weapon bone 4
    Arrow             Weapon bone 5
    Sling               Weapon bone 1
    Stones                 Weapon bone 5
    Rhomphaia        Weapon bone 1
    Club                Weapon bone 2 
    Dagger           Weapon bone 2 
    Sword              Weapon bone 2 
    Gladius            Weapon bone 2 
    Spear              Weapon bone 1
    Javelin             Weapon bone 1
    Shield              Weapon bone 3
    Pike                 Weapon bone 1
    Falx                 Weapon bone 1
    Standard         Weapon bone 1
    Bow                Weapon bone 4
    Arrow             Weapon bone 5
    Sling               Weapon bone 1
    Stones                 Weapon bone 5
    Rhomphaia        Weapon bone 1
    Club                Weapon bone 2 
    Dagger           Weapon bone 2

    Si vous ne suivez pas cela vous verrez des armes apparaître n'importe où, voire pas du tout.

    L'étape suivante est de regarder quelques fichiers référencés, en commençant par le fichier linothorax référencée dans l'entrée des vêtements :


    Code:
    <VARIANT_MESH>
        <SLOT name="tunics" >
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask0="1"  mask1="0" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/hellenic_tunic_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask0="2"  mask2="0" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask1="2"  mask2="1" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask1="2"  mask2="1" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask0="1"  mask1="0" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/tunics/italian_tunic1_cut.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/tunics/e3_tunic.rigid_model_v2"  mask0="2"  mask2="0" >
                <SLOT name="armour" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_01.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_02.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_03.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/linothorax_basic_04.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/armour/carthaginian_linothorax_a.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
        </SLOT>
    </VARIANT_MESH>
    Ici vous pouvez voir quelques modèles qui sont références avec d'autres modèles utilisés pour contruire les "imposteurs". Important: n'utilisez que les modèles existants qui sont spécifiés pour les "imposteurs", en ajoutant dans ceux déjà existants affectera la mémoire utilisé et donc leur qualité.

    Vous pouvez voir qu'il y a des copies de la même entrée dans ce fichier. Ceci est dans le but de paramétrer la variété de l'unité, généralement 60% pour référence la couleur primaire, 20 pour la couleur secondaire et 20 pour une couleur tertiaire. Les deux dernières entrées sont paramétrées avec le code :
    Code:
    mask1="2"  mask2="1"
    Contrairement à Shogun 2 où les masques de couleur utilisés était en partie paramétrés par les textures, maintenant c'est spécifié dans la définition. Ceci autorise plus de flexibilité et réduit l'importance des textures à charger.

    Un regard au maillage (mesh) du casque montre un peu plus comment les fichiers fonctionnent.


    Fichier roman_montefortinos.
    Code:
    <VARIANT_MESH>
        <SLOT name="helmets" >
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" probability ="0.8" attach_point="crest_centre" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_03.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_03.rigid_model_v2" />
                </SLOT>
                <SLOT name="side_crests" />
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino2.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" probability ="0.8" attach_point="crest_centre" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_03.rigid_model_v2" />
                </SLOT>
                <SLOT name="side_crests" />
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino3.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" probability ="0.8" attach_point="crest_centre" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_03.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_03.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_horsehair_split_01.rigid_model_v2" />
                </SLOT>
                <SLOT name="side_crests" />
            </VARIANT_MESH>
        </SLOT>
    </VARIANT_MESH>

    Notez que vous pouvez définir une probabilité aux entrées, dans le but d'indiquer une chance pour qu'il apparaisse sur une unité.


    hellenic_phyrgian_crests montre le fonctionnement des crêtes :
    Code:
    <VARIANT_MESH>
        <SLOT name="helmets" >
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/hellenic_phyrgian_2.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" probability ="0.4" attach_point="crest_centre" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_black.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_red.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_white.rigid_model_v2" />
                </SLOT>
                <SLOT name="side_crests" probability ="0.5" attach_point="crest_left,crest_right" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/red_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/white_feather_01_base.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/hellenic_phyrgian_cheekplates.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" attach_point="crest_centre" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_black.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_red.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/phyrgian_crest_1_white.rigid_model_v2" />
                </SLOT>
                <SLOT name="side_crests" attach_point="crest_left,crest_right" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/red_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/white_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_01_base.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/helmets/hellenic_phyrgian_simple.rigid_model_v2"  imposter_model="VariantMeshes/_VariantModels/man/helmets/roman_montefortino.rigid_model_v2" >
                <SLOT name="top_crests" attach_point="crest_centre" />
                <SLOT name="side_crests" attach_point="crest_left,crest_right" >
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/white_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/black_feather_01_base.rigid_model_v2" />
                    <VARIANT_MESH model="VariantMeshes/_VariantModels/man/crests/red_feather_01_base.rigid_model_v2" />
                </SLOT>
            </VARIANT_MESH>
        </SLOT>
    </VARIANT_MESH>
    Presque chaque casque a des points d'attache crest_centre et crest_left/right, bien qu'il y a quelques exceptions.

    L'autre grand changement par rapport à Rome 2 est le tableau des textures (texture_array) et les modèles de boucliers. Ils ne sont pas une part une part de la texture du bouclier mais sont à la place un décalque qui est appliqué au dessus.


    hellenic_hoplon_painted_hoplite montre comment ils sont liés aux boucliers :
    Code:
    <VARIANT_MESH>
        <SLOT name="shields" >
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask1="2"  mask2="1" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask1="2"  mask2="1" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask0="1"  mask1="0" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted2.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask0="2"  mask1="0"  mask2="1" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask1="2"  mask2="1" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask1="2"  mask2="1" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask0="1"  mask1="2"  mask2="0" />
            <VARIANT_MESH model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon_painted1.rigid_model_v2"  decal_diffuse="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_diffuse"  decal_normal="VariantMeshes/_VariantModels/man/patterns/hellenic/decal_normal"  imposter_model="VariantMeshes/_VariantModels/man/shield/hellenic_shield_hoplon.rigid_model_v2"  mask0="2"  mask2="0" />
        </SLOT>
    </VARIANT_MESH>

    Les texture_array ressemblent à cela :
    Code:
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_dolphin_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_elephant_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_goat_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_gorgon_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_horse_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_horse_head_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_lion_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_octopus_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_pegasus_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_poseidon_spear_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_scorpion_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_snake_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_zeus_lightning1_diffuse
    VariantMeshes/_VariantModels/man/patterns/hellenic/oval_shield_hellenic_zeus_lightning2_diffuse
    Avec les fichiers texture_array, vous aurez besoin de baire attention qu'il y a le même nombre d'entrée dans les fichiers diffuse et normal.

  • #2
    merci, ca m'aide beaucoup pour la modification des unités.
    ou se trouve ce dossierje l'ai pas vu dans le data

    édit:c'est bon j'ai trouver dans le dossier models_rome2_pack
    Dernière modification par fixa, 14-09-2013, 15h13.

    Commentaire


    • #3
      Dans le dossier models normalement.

      Commentaire

      Chargement...
      X