Difference between revisions of "Documentation/Engine/Mover model group"

From SCS Modding Wiki
Jump to navigation Jump to search
Line 35: Line 35:
 
== Mover anim ==
 
== Mover anim ==
  
Unit <code>mover_anim</code> represent animation and its data. It is located in <code>/base/def/world/mover_anim.sii</code>.
+
Unit <code>mover_anim</code> represents animation and its data. It is located in <code>/base/def/world/mover_anim.sii</code>.
 
<pre>
 
<pre>
 
mover_anim : mover_anim.sweeper {
 
mover_anim : mover_anim.sweeper {
Line 51: Line 51:
 
* <code>group_tags</code> Group tags. More about it in '''mover_model_group''' section.
 
* <code>group_tags</code> Group tags. More about it in '''mover_model_group''' section.
 
* <code>props</code> Array of link pointers to animation props.
 
* <code>props</code> Array of link pointers to animation props.
 +
 +
== Mover anim props ==
 +
 +
Unit <code>mover_anim_props</code> represents animation props and its settings. It is located in <code>/base/def/world/mover_anim_props.sii</code>.
 +
<pre>
 +
mover_anim_props : mover_props.sweeper.broom {
 +
    model: "/model/mover/characters/new_generation/models/props/independent/broom.pmd"
 +
    bone_a: lefthand
 +
    bone_b: righthand
 +
    bone_offset_a: (0.03, 0.08, 0)
 +
    bone_offset_b: (-0.2, 0.16, -0.15)
 +
    model_offset: (0.0, 0.0, -0.67)
 +
    model_rotation: (0.0, 0.0, 0.0)
 +
}
 +
</pre>
 +
'''Properties:'''
 +
* <code>bone_a</code> First bone to "skin" prefix.
 +
* <code>bone_b</code> Second bone to "skin" prefix.
 +
* <code>bone_offset_a</code> Skin offset for the first bone.
 +
* <code>bone_offset_b</code> Skin offset for the second bone.
 +
* <code>model</code> Props model descriptor.
 +
* <code>model_animation</code> Props model animation.
 +
* <code>sync_animation</code> Force time synchronization o\between props animation and mover animation.
 +
* <code>model_offset</code> Props placement offset.
 +
* <code>model_rotation</code> Props placement rotation.

Revision as of 12:37, 2 May 2019

Mover model group is a new mover definition unit. Idea of this new unit is to have a system which can easily combine compabible models and animations. The main use is for characters to remove the need of definition for every combination of models and animations. Moreover these mover groups can use props in separate models and easily "skin" them to specific bones.

The whole system consists of four units:

Mover desc

Unit mover_desc represents model and it's data. It is located in /base/def/world/mover_desc.sii.

mover_desc : mover_desc.worker_3 {
    model_desc: "/model/mover/characters/new_generation/new/models/man/worker_vest/worker_vest_nemiro_lod0.pmd"

    lods[0]: "/model/mover/characters/new_generation/new/models/man/worker_vest/worker_vest_nemiro_lod1.pmd"
    lods[1]: "/model/mover/characters/new_generation/new/models/man/worker_vest/worker_vest_nemiro_lod2.pmd"
    lods[2]: "/model/mover/characters/new_generation/new/models/man/worker_vest/worker_vest_lod3.pmd"
	
    lod_distances[0]: 10
    lod_distances[1]: 30
    lod_distances[2]: 90

    group_tags[]: human
    group_tags[]: man
    group_tags[]: cauca
    group_tags[]: worker
}

Properties:

  • model_desc Model descriptor.
  • model_coll Model collision.
  • lods Model lod descriptors.
  • lod_distances Lod distances.
  • group_tags Group tags. More about it in mover_model_group section.

Mover anim

Unit mover_anim represents animation and its data. It is located in /base/def/world/mover_anim.sii.

mover_anim : mover_anim.sweeper {
    model_anim: "/model/mover/characters/new_generation/animations/universal/sweeping_anim.pma"

    group_tags[]: human
    group_tags[]: man
    group_tags[]: sweeper

    props[]: mover_props.sweeper.broom
}

Properties:

  • model_anim Animation descriptor.
  • group_tags Group tags. More about it in mover_model_group section.
  • props Array of link pointers to animation props.

Mover anim props

Unit mover_anim_props represents animation props and its settings. It is located in /base/def/world/mover_anim_props.sii.

mover_anim_props : mover_props.sweeper.broom {
    model: "/model/mover/characters/new_generation/models/props/independent/broom.pmd"
    bone_a: lefthand
    bone_b:	righthand
    bone_offset_a: (0.03, 0.08, 0)
    bone_offset_b: (-0.2, 0.16, -0.15)
    model_offset: (0.0, 0.0, -0.67)
    model_rotation: (0.0, 0.0, 0.0)
}

Properties:

  • bone_a First bone to "skin" prefix.
  • bone_b Second bone to "skin" prefix.
  • bone_offset_a Skin offset for the first bone.
  • bone_offset_b Skin offset for the second bone.
  • model Props model descriptor.
  • model_animation Props model animation.
  • sync_animation Force time synchronization o\between props animation and mover animation.
  • model_offset Props placement offset.
  • model_rotation Props placement rotation.