Reyhard/Sandbox/Character Gear Creation/Headgear/Asset Preparation – User

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with " = Mesh Preparation = == General == When it comes to character gear, you might notice that default rotation of character is different compared to other assets. This is caused...")
 
No edit summary
Line 1: Line 1:
 
{{TOC|side}}
= Mesh Preparation =
= Mesh Preparation =


== General ==
== General ==
When it comes to character gear, you might notice that default rotation of character is different compared to other assets. This is caused by the fact, that in game animations are created using motion capture & Motion Builder software, which expects different orientation that the game. Fortunately, it is no longer necessary to rotate equipment by 180 degrees.
When it comes to character gear, you might notice that default rotation of character is different compared to other assets. This is caused by the fact, that in game animations are created using motion capture & Motion Builder software, which expects different orientation that the game.{{Feature|important|It is '''no longer necessary to rotate equipment by 180 degrees''' - keep in mind though that Character_Template.FBX & Head_Template.FBX have orientation set in a way, which allows to use this model in creation of animations in Motion Builder or similar software.}}Positioning of helmet without any reference points is quite tricky and that's why it might be handy to load some reference model. To do so, perform following steps:
 
Positioning of helmet without any reference points is quite tricky and that's why it might be handy to load some reference model. To do so, perform following steps:


* Import '''HeadSize_Template.fbx''' into scene with your model
* Import '''HeadSize_Template.fbx''' into scene with your model
Line 20: Line 18:
After properly positioning model, it is time for getting skeleton in and then rigging the asset. Sample Helmet is an asset imported from A3, so it already has some skinning on it, which in case of helmets will be fully usable but if you have some fresh asset, you can consider two options, which are described below.  
After properly positioning model, it is time for getting skeleton in and then rigging the asset. Sample Helmet is an asset imported from A3, so it already has some skinning on it, which in case of helmets will be fully usable but if you have some fresh asset, you can consider two options, which are described below.  


In any case, first step on to do list will be  
In any case, first step on to do list will be importing of skeleton and empty bones from template file.


=== Importing skeleton ===
=== Importing skeleton ===
[[File:armareforger-new-headgear-skeleton.png|thumb|'''Armature''' and '''Empty Objects''' necessary for equipment to be animated in game]]
Importing skeleton into scene where you have your helmet can be done in few simple steps:
* Keep your '''Blender''' instance with helmet open
* Download & then open '''Character_Weights_Template.blend''' file in '''2nd instance of Blender'''
* Switch to '''Object Mode'''
* Unhide '''Memory Points''' collection and select '''all empty objects''' over there (there should be six of them in total)
** Tip: You can select multiple empty objects Left Shift modifier
* Copy all those objects with {{Controls|Ctrl|C}} combination
* Switch over to '''Blender''' instance containing your helmet and paste objects into Blender with {{Controls|Ctrl|V}} shortcut


* Make sure that you also imported empty objects (from Memory Points collections)  
After that, verify that in primary instance of the Blender (the one with helmet model) following things are true:
* Leave Armature object name as Armature
* Make sure that you also imported empty objects (from '''Memory Points''' collections)
* It is important that model contains only Armature and empty objects from the template!
* '''Armature object''' is called '''Armature''' - keep it this way!
** In total, 163 bones/objects should be present when model is imported into Workbench
* It is important that model contains only '''Armature''' and '''[https://docs.blender.org/manual/en/latest/modeling/empties.html empty objects] from the template'''!
** In total, '''163 bones/empty objects''' (''156 bones and 6 dummy objects'') should be present when model is imported into '''Workbench''' - see note in '''Importing model''' section
[[File:armareforger-new-headgear-skeleton-full.png|954x954px]]


=== Skinning asset ===
=== Skinning asset ===
Once skeleton is present in the scene, it is possible to start process of skinning mesh to the bones. This can be using one of tw


==== Transfer weights ====
Currently, only [https://enfusionengine.com/api/redirect?to=enfusion://ResourceManager/~ArmaReforger:Assets/Characters/Basebody/Basebody_Male_Head_01.xob Basebody_Male_Head_01.xob] has its face skinned and there are no facial animations yet it in-game, so it's rather tricky to verify if weights are working correctly. In any {{Feature|informative|In this article, [[Arma_Reforger:Resource_Manager:_Options#Register_.22enfusion:.2F.2F.22_protocol|'''Enfusion links''']] are used. With those links it is possible to open specific resource just by simply clicking on that link. Enfusion links '''has to be manually activated in Workbench options''' (Workbench -> Options -> Workbench -> Register "enfusion://" protocol) before it can be used]}}
* Future proofing - skinning of the helmet strap is not technically necessary right now but in future it will be necessary for correct movement of strap when facial animations are played
* Future proofing - skinning of the helmet strap is not technically necessary right now but in future it will be necessary for correct movement of strap when facial animations are played
** If you are using model from A3, you can also try to renaming Vertex Groups so they match Arma Reforger bones
**  
** Transfer weights <nowiki>https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/editing.html#transfer-weights</nowiki>
** Transfer weights <nowiki>https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/editing.html#transfer-weights</nowiki>
* In Modifiers tab, add new Armature modifier ( <nowiki>https://docs.blender.org/manual/en/latest/modeling/modifiers/deform/armature.html</nowiki> )
{{Messagebox|'''Tip''': You can also use '''Sample Helmet''' as source object for weight transfer.|✩|#88cc88}}
 
==== Manual skinning ====
If you don't want to use transfer weight tool or you quickly want to test if helmet is working in game, then you can skin the helmet manually. To do so, perform following actions:
 
* Select helmet model (''in this case Object_LOD0'') and switch to Object Mode
* Navigate to '''[https://docs.blender.org/manual/en/latest/editors/properties_editor.html#object-data Data]''' tab in '''Properties''' window and locate '''[https://docs.blender.org/manual/en/latest/modeling/meshes/properties/vertex_groups/introduction.html Vertex Group]''' section
* Add appropriate '''Vertex Groups''' for your helmet.
 
Now, depending whether you want to simply assign everything to one bone (for instance when you are doing a hat or you don't want to skin chin strap to chin yet), you can either chose one of the options:
 
===== Simple skinning =====
As title suggest, this skinning is very simple - whole mesh will be basically skinned to single bone - '''Head. To do'''
 
* Add just one '''Head''' vertex group via + button (1) located  at the right side
 
* Switch to '''Edit Mode''' while having Object_LOD0 selected and select all faces with i.e. {{Controls|Ctrl|A}} shortcut
* Click on Head vertex group and then click on '''Assign''' button
{{Messagebox|'''Tip''': Alternatively, if you are using model from A3, you can also try to renaming '''Vertex Groups''' so they match '''Arma Reforger''' bones|✩|#88cc88}}
 
===== Weight Painting =====
Using weight paint allows you to skin influences between maximum 4 bones. In order to achieve that, perform following actions:
 
* Switch to '''[https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/index.html Weight Paint] mode'''
* Create vertex groups for things you want to skin - in case of helmet with chin strap, '''FacialJaw''' & '''Head''' bone would be sufficient
* Select one of the vertex groups and starts painting weights with {{Controls|LMB}}
{{Feature|informative|Vanilla helmets are right now only using one bone - '''Head''' - for whole model (including chin strap) although that might change in the future.}}
 
==== Armature modifier ====
Once asset is skinned with one of the above methods, there is one more thing to do in order to link vertex groups with skeleton and thus achieve animated asset:
* In '''Modifiers''' tab, add new [https://docs.blender.org/manual/en/latest/modeling/modifiers/deform/armature.html '''Armature''' modifier] via '''Add Modifier (1)''' button
** In '''Object''' property, select '''Armature''' as object to deform with
** In '''Object''' property, select '''Armature''' as object to deform with
[[File:armareforger-new-headgear-aramture-modifier.png]]
After that, you could quickly verify if asset is skinned by selecting '''Armature''' and switching to '''Pose Mode.''' In this mode you can try to move bones and see if mesh is following them.


== Colliders ==
== Colliders ==
Line 45: Line 93:
* Should be fairly simple
* Should be fairly simple
** It is not recommended to use exact thickness of the helmet - instead it is enough to use material with predefined thickness
** It is not recommended to use exact thickness of the helmet - instead it is enough to use material with predefined thickness
* UTM (Trimeshes) colliders can be used
* [[Arma Reforger:FBX Import#Collider shape|UTM (Trimeshes) colliders]] can be used


==== Setting relations: Using Make Parent ====
==== Setting relations: Using Make Parent ====
Line 77: Line 125:
=== Materials & Layer Preset ===
=== Materials & Layer Preset ===


* Collider should FireGeo Layer Preset
* Collider should FireGeo [[Arma Reforger:Collision Layer|Layer Preset]]
* Use previously created material or one of the existing gamemats from game, which matches ballistic properties of your helmet
* Use previously created material or one of the existing gamemats from game, which matches ballistic properties of your helmet



Revision as of 14:55, 1 August 2023

Mesh Preparation

General

When it comes to character gear, you might notice that default rotation of character is different compared to other assets. This is caused by the fact, that in game animations are created using motion capture & Motion Builder software, which expects different orientation that the game.

It is no longer necessary to rotate equipment by 180 degrees - keep in mind though that Character_Template.FBX & Head_Template.FBX have orientation set in a way, which allows to use this model in creation of animations in Motion Builder or similar software.

Positioning of helmet without any reference points is quite tricky and that's why it might be handy to load some reference model. To do so, perform following steps:

  • Import HeadSize_Template.fbx into scene with your model
    • This special contains all vanilla heads available molded into one entity - with this you can ensure that there will be no clipping with any of the existing models
  • Adjust position of the helmet and straps so it fit that universal head

If everything went fine, you should end up with something like this:

armareforger-new-headgear-head-template.png

Once you verified that helmet model doesn't need more adjustments, delete HeadSize_Template mesh from the scene since it will be no longer necessary.

Rigging

After properly positioning model, it is time for getting skeleton in and then rigging the asset. Sample Helmet is an asset imported from A3, so it already has some skinning on it, which in case of helmets will be fully usable but if you have some fresh asset, you can consider two options, which are described below.

In any case, first step on to do list will be importing of skeleton and empty bones from template file.

Importing skeleton

Armature and Empty Objects necessary for equipment to be animated in game


Importing skeleton into scene where you have your helmet can be done in few simple steps:

  • Keep your Blender instance with helmet open
  • Download & then open Character_Weights_Template.blend file in 2nd instance of Blender
  • Switch to Object Mode
  • Unhide Memory Points collection and select all empty objects over there (there should be six of them in total)
    • Tip: You can select multiple empty objects Left Shift modifier
  • Copy all those objects with Ctrl + C combination
  • Switch over to Blender instance containing your helmet and paste objects into Blender with Ctrl + V shortcut

After that, verify that in primary instance of the Blender (the one with helmet model) following things are true:

  • Make sure that you also imported empty objects (from Memory Points collections)
  • Armature object is called Armature - keep it this way!
  • It is important that model contains only Armature and empty objects from the template!
    • In total, 163 bones/empty objects (156 bones and 6 dummy objects) should be present when model is imported into Workbench - see note in Importing model section

armareforger-new-headgear-skeleton-full.png

Skinning asset

Once skeleton is present in the scene, it is possible to start process of skinning mesh to the bones. This can be using one of tw

Transfer weights

Currently, only Basebody_Male_Head_01.xob has its face skinned and there are no facial animations yet it in-game, so it's rather tricky to verify if weights are working correctly. In any

In this article, Enfusion links are used. With those links it is possible to open specific resource just by simply clicking on that link. Enfusion links has to be manually activated in Workbench options (Workbench -> Options -> Workbench -> Register "enfusion://" protocol) before it can be used]
  • Future proofing - skinning of the helmet strap is not technically necessary right now but in future it will be necessary for correct movement of strap when facial animations are played
    • Transfer weights https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/editing.html#transfer-weights
Tip: You can also use Sample Helmet as source object for weight transfer.

Manual skinning

If you don't want to use transfer weight tool or you quickly want to test if helmet is working in game, then you can skin the helmet manually. To do so, perform following actions:

  • Select helmet model (in this case Object_LOD0) and switch to Object Mode
  • Navigate to Data tab in Properties window and locate Vertex Group section
  • Add appropriate Vertex Groups for your helmet.

Now, depending whether you want to simply assign everything to one bone (for instance when you are doing a hat or you don't want to skin chin strap to chin yet), you can either chose one of the options:

Simple skinning

As title suggest, this skinning is very simple - whole mesh will be basically skinned to single bone - Head. To do

  • Add just one Head vertex group via + button (1) located at the right side
  • Switch to Edit Mode while having Object_LOD0 selected and select all faces with i.e. Ctrl + A shortcut
  • Click on Head vertex group and then click on Assign button
Tip: Alternatively, if you are using model from A3, you can also try to renaming Vertex Groups so they match Arma Reforger bones
Weight Painting

Using weight paint allows you to skin influences between maximum 4 bones. In order to achieve that, perform following actions:

  • Switch to Weight Paint mode
  • Create vertex groups for things you want to skin - in case of helmet with chin strap, FacialJaw & Head bone would be sufficient
  • Select one of the vertex groups and starts painting weights with Left Mouse Button
Vanilla helmets are right now only using one bone - Head - for whole model (including chin strap) although that might change in the future.

Armature modifier

Once asset is skinned with one of the above methods, there is one more thing to do in order to link vertex groups with skeleton and thus achieve animated asset:

  • In Modifiers tab, add new Armature modifier via Add Modifier (1) button
    • In Object property, select Armature as object to deform with

armareforger-new-headgear-aramture-modifier.png

After that, you could quickly verify if asset is skinned by selecting Armature and switching to Pose Mode. In this mode you can try to move bones and see if mesh is following them.

Colliders

Helmets in Arma Reforger are using actual colliders for protection of the character so its quite important to set it correctly. First step

Creating colliders

  • Shape should fit the helmet
  • Should be fairly simple
    • It is not recommended to use exact thickness of the helmet - instead it is enough to use material with predefined thickness
  • UTM (Trimeshes) colliders can be used

Setting relations: Using Make Parent

  • https://docs.blender.org/manual/en/latest/scene_layout/object/editing/parent.html#bone-parent
    • Select collider object
    • Select as second object Armature with Shift-LMB
    • Switch to edit mode
    • Select head bone
    • Switch to pose mode
    • Select Head bone
      • Tip: you can turn on bone names for easier navigation!
    • Open Menu Search ( https://docs.blender.org/manual/en/latest/interface/controls/templates/operator_search.html#menu-search - https://docs.blender.org/manual/en/latest/interface/keymap/industry_compatible.html#general )
      • Search for Make Parent &  select it

Setting relations: Using Relations tab

  • Create a new object and in Relations tab set relation to Head
    • Reposition collider to correct location
  • If collider is suddenly very small, make sure that scale of the armature is correct

Creating material

  • Perform research - try to find thickness and density of material
  • Create new inherited material - usage of one of the existing materials is recommended
    • This way, you will inherit for instance correct particle effects, sounds and decals
    • In vanilla game those visual & sound effects are still being worked on (0.9.9)
  • Fill in those values to that new material and then adjust Kinetic Resistance so it matches desired protection level
    • You can use following spreadsheet for those calculations

Materials & Layer Preset

  • Collider should FireGeo Layer Preset
  • Use previously created material or one of the existing gamemats from game, which matches ballistic properties of your helmet

Creating Item variant

  • Copy fbx of your helmet
  • Remove skeleton and all empty objects
  • Modify model of helmet so it appears like lying on flat surface
    • For instance, straps can be deformed so they are resting on surface
  • No skeleton needed
  • Collider can be even simpler shape, but it is also possible to reuse previously created one
    • Layer Preset is changed from FireGeo to ItemFireView

Importing model

  • Make sure that Export skinning option is checked and reimport the model via Reimport resource button
  • Make sure that you have 163 bones in total
    • In Details tab, you can find current amount of bones and dummies in Bones section. First number represents amount of bones and second, number of dummies. By default, bones which are not affecting any mesh (there is no Vertex Group representing