Difference between revisions of "My first: Character"

From Divinity Engine Wiki
Jump to: navigation, search
 
(22 intermediate revisions by 2 users not shown)
Line 44: Line 44:
 
* Ragdoll mesh   
 
* Ragdoll mesh   
 
* Animation files (won't be covered in this guide)
 
* Animation files (won't be covered in this guide)
Special editor files (more on them later):<br />
+
Special editor files (more on them below):<br />
 
* Visual Set  
 
* Visual Set  
 
* Root Template  
 
* Root Template  
Line 69: Line 69:
 
whilst the red mesh is missing the shapes and cannot be bend in the same way.<br />
 
whilst the red mesh is missing the shapes and cannot be bend in the same way.<br />
 
[[File:Joints3.jpeg|none]]
 
[[File:Joints3.jpeg|none]]
When creating the shapes there must be enhough space to straigten the leg
+
When creating the shapes there must be enough space to straiten the leg.
the red mesh has a shape to small to straighten the leg without it collapsing on itself<br />
+
The red mesh on the image is too small to straighten the leg without it collapsing on itself<br />
 
[[File:Joints4.jpeg|none]]
 
[[File:Joints4.jpeg|none]]
In this example the shapes do not match the location of the kneejoint
+
In this example the shapes do not match the location of the knee-joint.
and there for are not used in the skinning.<br />
+
There for are not used in the skinning.<br />
 
Make sure when creating the mesh to look at the '''size''' of the shape and '''location''' of the joints.<br />
 
Make sure when creating the mesh to look at the '''size''' of the shape and '''location''' of the joints.<br />
  
Line 79: Line 79:
 
When making the Fingers make sure they all rotate the same way in their base position<br />
 
When making the Fingers make sure they all rotate the same way in their base position<br />
 
* Bottom of feet should be as flat as possible.
 
* Bottom of feet should be as flat as possible.
* Use smoothing groups sparingly AND intelligently: don’t use 32 smoothing groups when 4 is enough.
+
* Use smoothing groups sparingly: don’t use 32 smoothing groups when 4 is enough.
 
* Make sure the armor/clothing pieces are not clipping through one another.
 
* Make sure the armor/clothing pieces are not clipping through one another.
 
* The vertices along the center world line (symmetry line) should be obviously aligned correctly in the center.
 
* The vertices along the center world line (symmetry line) should be obviously aligned correctly in the center.
* Close your armor pieces: the player starts with a naked model then can individually dress up his character with any armor piece you’re going to make. It is therefore important there are no holes. Also, make sure your Lowerbody and Upperbody pieces hide the cut at the waistline level.
+
* Close your armor pieces: the player starts with a naked model and can dress up his character with any armor piece you’re going to make. It is therefore important there are no holes. Also, make sure your Lowerbody and Upperbody pieces hide the cut at the waistline level.
 
* About objects that can bend (e.g. tails), don't put concave (=bending inwards) curves in it. They should be as straight as possible in neutral pose.
 
* About objects that can bend (e.g. tails), don't put concave (=bending inwards) curves in it. They should be as straight as possible in neutral pose.
* Final character should be centered on origin (x0,y0,z0) and fit the naked model provided.
+
* Final character should be centered on origin (x0,y0,z0).
 
<br />
 
<br />
Don't forget to make a physics mesh for your character, it needs it to collide with environment and so the player can click and select your character on the screen.  
+
Don't forget to make a physics mesh for your character, it needs it to collide with the environment, so the player can click and select your character on the screen.
  
 
== Textures ==
 
== Textures ==
 
<br />
 
<br />
In DOS2 we use f Physically-Based Rendering (PBR). <br />
+
In DOS2 we use Physically-Based Rendering (PBR). <br />
 
To learn more about PBR you can read [https://www.allegorithmic.com/pbr-guide PBR Guide by Allegorithmic here]. <br />
 
To learn more about PBR you can read [https://www.allegorithmic.com/pbr-guide PBR Guide by Allegorithmic here]. <br />
 
<br />
 
<br />
 
A creature, like troll, usually needs basemap (BM), normal map(NM) and physical map(PM) textures.<br />
 
A creature, like troll, usually needs basemap (BM), normal map(NM) and physical map(PM) textures.<br />
Larian editor uses .dds textures. <br />
 
 
Texture examples:<br />
 
Texture examples:<br />
 
[[File:TextureExamplesTroll.jpeg|none]]<br />
 
[[File:TextureExamplesTroll.jpeg|none]]<br />
Line 100: Line 99:
 
''Why our NM and PM textures look different from the ones used in other game engines ?'' <br />
 
''Why our NM and PM textures look different from the ones used in other game engines ?'' <br />
 
-In image files (including dds) the red channel gets the least bytes assigned to it this causes some detail loss which you don't want.<br />
 
-In image files (including dds) the red channel gets the least bytes assigned to it this causes some detail loss which you don't want.<br />
To circumvent it/improve quality, we swivel our red channel into the alpha channel to instead of outputting RGB with output xGBR maps.<br />
+
To improve quality of our in-game normal maps, we swap our red channel into the alpha channel. Instead of outputting RGB, we output xGBR maps.<br />
 
Larian primarily uses Substance Painter for texturing our characters and assets. [https://www.allegorithmic.com/buy You can get/try it here].<br />
 
Larian primarily uses Substance Painter for texturing our characters and assets. [https://www.allegorithmic.com/buy You can get/try it here].<br />
 
<br />
 
<br />
 
== Materials ==
 
== Materials ==
 
<br />
 
<br />
After you imported your mesh and textures in the editor you need to create a material. <br />
+
After you import your mesh and textures in the editor you need to create a material. <br />
 
We have a couple of Larian materials(shaders) you can use:<br />
 
We have a couple of Larian materials(shaders) you can use:<br />
 
[[File:Materials.jpeg|none]] character folder: [[File:CharacterMaterials.jpeg|none]] <br />
 
[[File:Materials.jpeg|none]] character folder: [[File:CharacterMaterials.jpeg|none]] <br />
Character materials have fresnel effect on them so you can see your character in various environment and it also has MSK system, that helps you change colors on certan things like skin and cloths (more on MSK later).  <br />
+
Character materials have fresnel effect on them so you can see your character better in different environment and it also has an MSK system, which helps you change colors on certain things like skin and cloths (more on MSK below).  <br />
 
If you don't need this functionality you can use any material from the "Base_PBR" folder.<br />
 
If you don't need this functionality you can use any material from the "Base_PBR" folder.<br />
 
After you created your material assign your textures in it and assign material to your mesh. (double click on material in content browser; double click on the mesh in content browser)<br />
 
After you created your material assign your textures in it and assign material to your mesh. (double click on material in content browser; double click on the mesh in content browser)<br />
Line 119: Line 118:
 
[[File:MaterialSourceFile.jpeg|none]]<br />
 
[[File:MaterialSourceFile.jpeg|none]]<br />
 
If you change the sourcefile of the material you need to reassign textures. <br />
 
If you change the sourcefile of the material you need to reassign textures. <br />
You can also see a "Material Type" parameter in the side bar of the material. the parameter will trigger different sound effects in the game depending in the type of your material, so don't leave it unassigned. <br />
+
You can also see a "Material Type" parameter in the side bar of the material. The parameter will trigger different sound effects in the game depending on the type of your material, so don't leave it unassigned. <br />
 +
 
 
== Visual Sets ==
 
== Visual Sets ==
Visual sets are special editor files, which help us organizing characters, their armor, body parts and colors. <br />
+
Visual sets are special editor files, which help us organize characters, their armor, body parts and colors. <br />
It also possible to a create without the visual set, in case you don't need any functionality mentioned above. <br />
+
It is also possible to create a character without the visual set, in case you don't need any functionality mentioned above. <br />
 
Visual Set consists of 9 visual lists, where you can put meshes and 3 color lists where you can store colors. <br />
 
Visual Set consists of 9 visual lists, where you can put meshes and 3 color lists where you can store colors. <br />
 
Visual set example:<br />
 
Visual set example:<br />
Line 131: Line 131:
 
[[File:TrollVisualSetExample2.jpeg|none]]<br />
 
[[File:TrollVisualSetExample2.jpeg|none]]<br />
 
Troll creature doesn't need to equip armor so it has some unique meshes in visual 3 (torso) list. <br />
 
Troll creature doesn't need to equip armor so it has some unique meshes in visual 3 (torso) list. <br />
!Important! You can also leave the meshes unassigned meshes by pressing "X" button.  <br />
+
!Important! You can also leave the meshes unassigned, by pressing "X" button.  <br />
Space in the visual set is very limited, cause each visual set is stored in unit64. So you might have to create multiple visual sets for different armors.<br />
+
Space in the visual set is very limited, because each visual set is stored in unit64. So you might have to create multiple visual sets for different armors.<br />
 
<br />
 
<br />
  
Line 159: Line 159:
 
* RagdollResourseID
 
* RagdollResourseID
 
* Stats
 
* Stats
Do not scale creatures unless you really need to. If scale a creature some animations, like climbing will not work properly.<br />
+
Do not scale creatures unless you really need to. If you scale a creature, some animations -like climbing- will not work properly..<br />
 
Small scale like 1.1 -1.3 is generally ok. <br />
 
Small scale like 1.1 -1.3 is generally ok. <br />
 
Only use "IsPlayer" property for testing.<br />
 
Only use "IsPlayer" property for testing.<br />
Line 166: Line 166:
 
'''Root templates and Visual sets.'''  
 
'''Root templates and Visual sets.'''  
 
There are 3 ways of using visual sets for creatures in root templates:<br />
 
There are 3 ways of using visual sets for creatures in root templates:<br />
# Not using visual set for creatures - you put character mesh with all boned in VisualResourseID
+
# Not using visual set for creatures - you put character mesh with all bones in VisualResourseID
# Using visual set only for armor/equipment for your character - character mesh with all boned in VisualResourseID + visual set with armor meshes, skinned to the character.
+
# Using visual set only for armor/equipment for your character - character mesh with all bones in VisualResourseID + visual set with armor meshes, skinned to the character.
 
# Using visual set for both body parts and armor - just the rig with all bones in VisualResourseID +visual set with naked body parts and armor.
 
# Using visual set for both body parts and armor - just the rig with all bones in VisualResourseID +visual set with naked body parts and armor.
 
Most of the animals use #1, most of the creatures with equipment use #2 and ALL of NPC of our playable races use #3 approach. <br />
 
Most of the animals use #1, most of the creatures with equipment use #2 and ALL of NPC of our playable races use #3 approach. <br />
Line 184: Line 184:
 
Example of the value of the color: <br />
 
Example of the value of the color: <br />
 
[[File:ExampleColorValue.jpeg|none]]<br />
 
[[File:ExampleColorValue.jpeg|none]]<br />
Color value is "0xff" + it's Hex Color Code. So completely while color will be 0xffffffff; completely black - 0xff000000<br />
+
Color value is "0xff" + it's Hex Color Code. So white color will be 0xffffffff; black will be - 0xff000000<br />
  
 
<br />
 
<br />
To change armor equipment and colors you will need to modify "ItemProgression", "Equipmet" and "Item Colors" stat files. Those will require more advanced knowledge. Guide on stats is still WIP here.  
+
To change armor equipment and colors you will need to modify "ItemProgression", "Equipment" and "ItemColors" stat files. Those will require more advanced knowledge. Guide on stats is still WIP here.  
  
  
 
== Armor and Equipment ==
 
== Armor and Equipment ==
There is a difference in code between playable and NPC characters. NPC characters, as mentioned above, use visual sets for armor, while player characters use equipment. NPC visuals is just a rig in it's root template with all the armor and body parts stored in visual sets, while player characters have their naked body parts in them, which can't be unequiped, and are hidden when player equips armor from eq root templates. <br />
+
There is a difference in code between playable and NPC characters. NPC characters, as mentioned above, use visual sets for armor, while player characters use equipment. NPC visuals is just a rig in it's root template with all the armor and body parts stored in visual sets, while player characters have their naked body parts in them, which can't be unequipped, and are hidden when player equips armor from equipment root templates. <br />
 
So when you make armor you need to ask yourself a question: <br /><br />
 
So when you make armor you need to ask yourself a question: <br /><br />
  
 
''Do you want players to be able to equip your armor piece or is it going to be just a unique npc/creature armor?<br />''
 
''Do you want players to be able to equip your armor piece or is it going to be just a unique npc/creature armor?<br />''
 
'''If not:''' <br />
 
'''If not:''' <br />
You just need to create a mesh, import it to editor and add it it your NPC visual set. <br />
+
You just need to create a mesh, import it to editor and add it your NPC visual set. <br />
 
'''If yes''' you will also need:
 
'''If yes''' you will also need:
 
* Create meshes for each race and gender. So you need to have 8 meshes + 8 skeleton version variation.   
 
* Create meshes for each race and gender. So you need to have 8 meshes + 8 skeleton version variation.   
* Your armor pieces needs to be made and cut the same way as already existing equipment, so they could fit with each other.   
+
* Your armor pieces needs to be made and cut the same way as pre-existing equipment, so they could fit with each other.   
 
* Meshes need to be textured and masked the same way (read about MSK system below)  
 
* Meshes need to be textured and masked the same way (read about MSK system below)  
* Create separate eq root template and add your meshes to eq data.   
+
* Create separate equipment root template and add your meshes to equipment data.   
* Create foldable mesh of your armor piece (Mesh that you see when you drop an armor piece on the ground)   
+
* Create "foldable" mesh of your armor piece (Mesh that you see when you drop an armor piece on the ground)   
* Crete an icon for your eq root template
+
* Create an icon for your equipment root template
 
* Give stats to your new equipment and make sure it can be generated for loot.  
 
* Give stats to your new equipment and make sure it can be generated for loot.  
  
 
<br />
 
<br />
 
As an example you can check how Lizards female platemail armor is set up :<br />  
 
As an example you can check how Lizards female platemail armor is set up :<br />  
[[:File:LizardFemalePlatemailExample.zip|Lizard Female files]]<br />
+
[[:File:Lizards_Female_ABC.zip|Lizard Female files]]<br />
 
You will need to work in Lizards_Female_Armor_ABC, use other files as references. <br />
 
You will need to work in Lizards_Female_Armor_ABC, use other files as references. <br />
 
Note: if you export armor only include bones that you need, don't include entire skeleton.<br />  
 
Note: if you export armor only include bones that you need, don't include entire skeleton.<br />  
 
But! The character root should be always included.<br />  
 
But! The character root should be always included.<br />  
If you're making a helmet or any other piece of armor that only skinned to 1 bone, make it rigid. <br />  
+
If you're making a helmet or any other piece of armor that is only skinned to 1 bone, make it rigid. <br />  
Go to "Extra Attributes" tab in maya and put "Rigid = true", otherwise it won't work in the editor.<br />  
+
Go to "Extra Attributes" tab in Maya and put "Rigid = true", otherwise it won't work in the editor.<br />  
 
<br />
 
<br />
  
Line 223: Line 223:
 
[[File:ExampleFileCloth.jpeg|none]]<br />
 
[[File:ExampleFileCloth.jpeg|none]]<br />
 
In Maya, select your mesh -> go to Polygons tab -> Color -> Paint Vertex Color <br />  
 
In Maya, select your mesh -> go to Polygons tab -> Color -> Paint Vertex Color <br />  
Make sure there are no elements with only red vertices. With no black vertices to fix the cloth in place it will fall apart to pieces. These pieces will fall through the level without being connected to anything.<br />
+
Make sure there are no elements with only red vertices. Black vertices are needed to keep the cloth in place. If the cloth is not connected to the rest of your mesh by black vertices, it will fall through the level.<br />
 
Make sure your cloth simulated mesh has only 1 smoothing group. To be sure in Maya, select your mesh -> go to Polygons tab -> Normals -> Soften Edge <br />
 
Make sure your cloth simulated mesh has only 1 smoothing group. To be sure in Maya, select your mesh -> go to Polygons tab -> Normals -> Soften Edge <br />
 
Try not to go too high poly with your cloth simulated meshes, as it will affect performance. Keep it <400 vertices per cloth mesh. <br />
 
Try not to go too high poly with your cloth simulated meshes, as it will affect performance. Keep it <400 vertices per cloth mesh. <br />
Line 229: Line 229:
 
If you added cloth to a mesh when you double click on it in content browser you will be able to edit some cloth parameters:<br />
 
If you added cloth to a mesh when you double click on it in content browser you will be able to edit some cloth parameters:<br />
 
[[File:ClothParameters.jpeg|none]]<br />
 
[[File:ClothParameters.jpeg|none]]<br />
Pose matching is one of the most important parameter you'll find there. Don't put it on 0 cause it will fly around too much. If you put it to high your cloth mesh will be too stiff or wouldn't simulate at all. Best results could be achieved when it's between 0.01 - 0.2 <br />
+
Pose matching is one of the most important parameter you'll find there. Don't put it on 0, because it will fly around too much. If you put it too high your cloth mesh will be too stiff or wouldn't simulate at all. Best results could be achieved when it's between 0.01 - 0.2 <br />
 
<br />
 
<br />
 
'''Equipment root templates'''<br />
 
'''Equipment root templates'''<br />
If you want to change existing equipment or add new one you'll have to work with eq roots. Each eq root has it's Equipment Data:  
+
If you want to change existing equipment or add new ones, you will have to work with equipment root templates. Each equipment root has it's Equipment Data:  
 
[[File:EqDataExample.jpeg|none]]<br />
 
[[File:EqDataExample.jpeg|none]]<br />
 
You need to assign meshes to each race gender and tick the box if you want to deactivate any visual of any body part (usually you should).<br />
 
You need to assign meshes to each race gender and tick the box if you want to deactivate any visual of any body part (usually you should).<br />
We have "Deactivate Equipment Slot Visuals" there as well, but it is used in very rare cases when we want to hide certain equipment slot whenever something is equipped. For example we have a very long robe that hides any trousers your character equips.  <br />
+
We have "Deactivate Equipment Slot Visuals" there as well, but it is used in very rare cases, when we want to hide certain equipment slots, whenever something is equipped. For example, we have a long robe that hides any trousers your character equips.  <br />
 
<br />
 
<br />
 
'''Skeleton/Undead equipment'''<br />
 
'''Skeleton/Undead equipment'''<br />
Undeads are using the same rigs as alive characters versions so you can avoid remodeling entire mesh by just duplicating the existing mesh from the alive version and assigning Helper_Invisible_A material to the naked bodyparts in it. If the naked skin was baked in the texture you can use a different character material (replace the source file of the material to Characters_PRB_Skeletons from the CHaracters_PBR folder and reassign the textures)<br />
+
Undeads are using the same rigs as their living counterparts, so you can avoid remodeling entire meshes by just duplicating the existing mesh from the alive version and assigning Helper_Invisible_A material to the naked bodyparts in it. If the naked skin was baked in the texture you can use a different character material (replace the source file of the material to Characters_PRB_Skeletons from the CHaracters_PBR folder and reassign the textures)<br />
 
<br />
 
<br />
 
'''Hair and Helmets'''<br />
 
'''Hair and Helmets'''<br />
Line 245: Line 245:
 
The hair and helmet is in one layer "Humans_Female_Armor_Mage_B_Helmet_A" hair is called Humans_Female_Armor_Mage_B_Hair_E_Mesh. If the player is bald and equips this helmet he'll only equip the hat.  
 
The hair and helmet is in one layer "Humans_Female_Armor_Mage_B_Helmet_A" hair is called Humans_Female_Armor_Mage_B_Hair_E_Mesh. If the player is bald and equips this helmet he'll only equip the hat.  
 
<br />
 
<br />
 +
 
== Downloadable files ==
 
== Downloadable files ==
 
Example files of the creatures Animals:<br />
 
Example files of the creatures Animals:<br />
Line 264: Line 265:
 
Example files of the creatures Creatures:<br />
 
Example files of the creatures Creatures:<br />
 
[[:File:Creatures_ElementalDevil_ABC.zip|ElementalDevil example]]<br />
 
[[:File:Creatures_ElementalDevil_ABC.zip|ElementalDevil example]]<br />
[[:File:Creatures_Gheist_A.zip|Gheist example]]<br />
 
 
[[:File:Creatures_Giant_Insect_ABC.zip|Insect example]]<br />
 
[[:File:Creatures_Giant_Insect_ABC.zip|Insect example]]<br />
[[:File:Creatures_Merman_ABC.zip|Merman example]]<br />
 
 
[[:File:Creatures_Nightmare_Werewolf_ABC.zip|Werewolf example]]<br />
 
[[:File:Creatures_Nightmare_Werewolf_ABC.zip|Werewolf example]]<br />
 
[[:File:Creatures_Raanaar_Automaton_ABC.zip|Automaton example]]<br />
 
[[:File:Creatures_Raanaar_Automaton_ABC.zip|Automaton example]]<br />
[[:File:Creatures_SourcePuppet_ABC.zip|SourcePuppet example]]<br />
 
 
[[:File:Creatures_Troll_ABC.zip|Troll example]]<br />
 
[[:File:Creatures_Troll_ABC.zip|Troll example]]<br />
  
Playable Races Armor: <br />
+
Playable Races (includes armor): <br />
 
 
[[:File:Humans_Male_ABC.zip|Human Male files]]<br />
 
[[:File:Humans_Female_ABC.zip|Human Female files]]<br />
 
 
[[:File:Dwarves_Female_ABC.zip|Dwarves Female files]]<br />
 
[[:File:Dwarves_Female_ABC.zip|Dwarves Female files]]<br />
 
[[:File:Dwarves_Male_ABC.zip|Dwarves Male files]]<br />
 
[[:File:Dwarves_Male_ABC.zip|Dwarves Male files]]<br />
[[:File:LizardFemalePlatemailExample.zip|Lizard Female files]]<br />
+
[[:File:Elves_Female_ABC.zip|Elves Female files]]<br />
 +
[[:File:Elves_Male_ABC.zip|Elves Male files]]<br />
 +
[[:File:Humans_Female_ABC.zip|Human Female files]]<br />
 +
[[:File:Humans_Male_ABC.zip|Human Male files]]<br />
 +
[[:File:Lizards_Female_ABC.zip|Lizard Female files]]<br />
 +
[[:File:Lizards_Male_ABC.zip|Lizard Male files]]<br />
 +
 
 +
[[:File:Weapons_REF_A.zip|Weapons REF]]<br />

Latest revision as of 09:20, 21 June 2018

Creating a character can be roughly divided into three parts:

  • Creating a creature (monster or animal)
  • Creating body parts and hairstyles (heads, hairstyles, beards)
  • Creating Armor


Creating custom characters is a very technical and complicated process. It will require artistic skills and profound knowledge of 3d modelling, texturing, rigging, skinning, animation and Larian editor.
If you do not possess all the skills mentioned above and still want to make custom characters we strongly recommend reusing existing rigs and animations.

To make a creature you can either:

  • Make your own custom creature, rig, animations
  • Make your own custom creature that will use already existing rig and animations (recommended)

Larian pipeline of creature creation in a nutshell:

  1. Concept
  2. Creation a high poly asset in zbrush
  3. Retopo, unwrap
  4. Texturing
  5. Testing your mesh in the editor
  6. Rigging
  7. Skinning
  8. Animating

Note: if you're reusing existing rig you can skip #6 and #8

File formats

In the editor 3d models are saved as granny files (.GR2).
The textures are saved as DirectDraw Surface (.dds).

More info on Granny 3D can be found here
More info on DirectDraw Surface can be found here

Creature editor set-up

Lets take an example of the troll creature.
To be able to implement a troll creature in the game you need:
Resources:

  • 3d model
  • Textures: Base Map(BM) Normal map (NM) and Physical map(PM)
  • Material
  • Physics mesh
  • Ragdoll mesh
  • Animation files (won't be covered in this guide)

Special editor files (more on them below):

  • Visual Set
  • Root Template


Example file of the troll creature: Troll example
Example of all the resource files in content browser:

Troll ContentBrowserResourses.jpeg

Modelling

General modelling tips:

  • All the joints areas should have the proper cuts (bending cuts- see below), aligned accordingly along with the respective naked model of the race you’re modeling.
  • The armors are using the same rig as the naked model, joints need to be placed correctly, with as similar cuts as possible.
  • No Scaling applied to the meshes: reset X-form.
  • No N-gons. Only 3 (triangles) and 4-gons (quads) are allowed.
  • Delete any unused vertices and floating triangles.


Joints1.jpeg

Reasons for the Cuts:
The cuts that are made will be used to squash and stretch at joint areas.

Joints2.jpeg

The green and red meshes are skinned to the same rig and posed in the same way.
The green mesh has the correct shapes to create a nice rolling bend of the knee. whilst the red mesh is missing the shapes and cannot be bend in the same way.

Joints3.jpeg

When creating the shapes there must be enough space to straiten the leg. The red mesh on the image is too small to straighten the leg without it collapsing on itself

Joints4.jpeg

In this example the shapes do not match the location of the knee-joint. There for are not used in the skinning.
Make sure when creating the mesh to look at the size of the shape and location of the joints.

Fingers.jpeg

When making the Fingers make sure they all rotate the same way in their base position

  • Bottom of feet should be as flat as possible.
  • Use smoothing groups sparingly: don’t use 32 smoothing groups when 4 is enough.
  • Make sure the armor/clothing pieces are not clipping through one another.
  • The vertices along the center world line (symmetry line) should be obviously aligned correctly in the center.
  • Close your armor pieces: the player starts with a naked model and can dress up his character with any armor piece you’re going to make. It is therefore important there are no holes. Also, make sure your Lowerbody and Upperbody pieces hide the cut at the waistline level.
  • About objects that can bend (e.g. tails), don't put concave (=bending inwards) curves in it. They should be as straight as possible in neutral pose.
  • Final character should be centered on origin (x0,y0,z0).


Don't forget to make a physics mesh for your character, it needs it to collide with the environment, so the player can click and select your character on the screen.

Textures


In DOS2 we use Physically-Based Rendering (PBR).
To learn more about PBR you can read PBR Guide by Allegorithmic here.

A creature, like troll, usually needs basemap (BM), normal map(NM) and physical map(PM) textures.
Texture examples:

TextureExamplesTroll.jpeg

We pack Metallness in the Red channel, Roughness in the Green channel and Ambient Occlusion in the Blue channel of Physical map.
Why our NM and PM textures look different from the ones used in other game engines ?
-In image files (including dds) the red channel gets the least bytes assigned to it this causes some detail loss which you don't want.
To improve quality of our in-game normal maps, we swap our red channel into the alpha channel. Instead of outputting RGB, we output xGBR maps.
Larian primarily uses Substance Painter for texturing our characters and assets. You can get/try it here.

Materials


After you import your mesh and textures in the editor you need to create a material.
We have a couple of Larian materials(shaders) you can use:

Materials.jpeg
character folder:
CharacterMaterials.jpeg

Character materials have fresnel effect on them so you can see your character better in different environment and it also has an MSK system, which helps you change colors on certain things like skin and cloths (more on MSK below).
If you don't need this functionality you can use any material from the "Base_PBR" folder.
After you created your material assign your textures in it and assign material to your mesh. (double click on material in content browser; double click on the mesh in content browser)
If your are not using MSK but still want to use character material, just leave it empty (don't enable it in the box) or assign a black texture to it.
You can edit the functionality of the material by right clicking it in content browser and selecting "Open in editor".

MaterialEditor2.jpeg

Beware if you make changes and save the material all the assets that are using the material will change accordingly.
You can always make edits and "save as" a separate copy for testing purposes.
Material source file can be easily changed if you select your material in the content browser and go to the side bar.

MaterialSourceFile.jpeg

If you change the sourcefile of the material you need to reassign textures.
You can also see a "Material Type" parameter in the side bar of the material. The parameter will trigger different sound effects in the game depending on the type of your material, so don't leave it unassigned.

Visual Sets

Visual sets are special editor files, which help us organize characters, their armor, body parts and colors.
It is also possible to create a character without the visual set, in case you don't need any functionality mentioned above.
Visual Set consists of 9 visual lists, where you can put meshes and 3 color lists where you can store colors.
Visual set example:

VisualSetExample.jpeg

If you're working on a unique creature that doesn't need as many equipment pieces as our regular characters, you can put armor meshes in any visual list. (the names in brackets are for your convenience and consistency).
Although it is recommended to keep something in either list #3(Torso) or #2(Head) because of material sounds functionality.
Our troll example visual set:

TrollVisualSetExample2.jpeg

Troll creature doesn't need to equip armor so it has some unique meshes in visual 3 (torso) list.
!Important! You can also leave the meshes unassigned, by pressing "X" button.
Space in the visual set is very limited, because each visual set is stored in unit64. So you might have to create multiple visual sets for different armors.

Colors in the visual set
There are 3 color tabs in the Visual lists: Skin, Hair and Cloth colors. And 5 color rows you can change on the bottom.
In the lists you can select and store colors. And in the rows on the bottom you can select colors from the list.

VisualSetColors.jpeg

To be able to edit colors from the visual set you need your mesh to use character pbr material and have MSKskin and/or MSKcloth.
Our MSK pipeline will be described below.

Root Template

To be able to spawn a character in the editor you will need to create a root template for it.
More advanced guide about root templates here

RootTemplateTroll.jpeg

You will need to edit following parameters for your creature:

  • Ai Bounds - preferably a cylinder for the creature.
  • DisplayName
  • Physical Resource (physical mesh of your character)
  • VisualResourseID - your actual mesh with the rig (could also be just a file with the rig)
  • VisualSetResourseID (if any)

Make sure it has:

  • ExplodedResourseID
  • ExplosionFX
  • HitFX
  • Icon
  • RagdollResourseID
  • Stats

Do not scale creatures unless you really need to. If you scale a creature, some animations -like climbing- will not work properly..
Small scale like 1.1 -1.3 is generally ok.
Only use "IsPlayer" property for testing.
Beware if you make your character "IsPlayer" the equipment system will not work properly. (More about equipment below)

Root templates and Visual sets. There are 3 ways of using visual sets for creatures in root templates:

  1. Not using visual set for creatures - you put character mesh with all bones in VisualResourseID
  2. Using visual set only for armor/equipment for your character - character mesh with all bones in VisualResourseID + visual set with armor meshes, skinned to the character.
  3. Using visual set for both body parts and armor - just the rig with all bones in VisualResourseID +visual set with naked body parts and armor.

Most of the animals use #1, most of the creatures with equipment use #2 and ALL of NPC of our playable races use #3 approach.

Character creation visuals


If you want to change Character Creation(CC) visuals you need to change "hero" root templates of our playable races:

HeroRootTemplates.jpeg

Hero root templates also have their own "hero" visual sets:

HeroVisualSets.jpeg

If you add/delete meshes from hero visual sets it will appear/disappear in Character Creation(CC). So to add/modify meshes in CC you just need to add them in those visual sets.
Hair, Heads and Facial Features come from hero visual sets. while colors and armors in CC come from stats.
To change the color selection available in character creation you need to change Race Presets files:

RacepresetsFile.jpeg

To change or add color of the hair/skin you will need to change the value of the colors.
Example of the value of the color:

ExampleColorValue.jpeg

Color value is "0xff" + it's Hex Color Code. So white color will be 0xffffffff; black will be - 0xff000000


To change armor equipment and colors you will need to modify "ItemProgression", "Equipment" and "ItemColors" stat files. Those will require more advanced knowledge. Guide on stats is still WIP here.


Armor and Equipment

There is a difference in code between playable and NPC characters. NPC characters, as mentioned above, use visual sets for armor, while player characters use equipment. NPC visuals is just a rig in it's root template with all the armor and body parts stored in visual sets, while player characters have their naked body parts in them, which can't be unequipped, and are hidden when player equips armor from equipment root templates.
So when you make armor you need to ask yourself a question:

Do you want players to be able to equip your armor piece or is it going to be just a unique npc/creature armor?
If not:
You just need to create a mesh, import it to editor and add it your NPC visual set.
If yes you will also need:

  • Create meshes for each race and gender. So you need to have 8 meshes + 8 skeleton version variation.
  • Your armor pieces needs to be made and cut the same way as pre-existing equipment, so they could fit with each other.
  • Meshes need to be textured and masked the same way (read about MSK system below)
  • Create separate equipment root template and add your meshes to equipment data.
  • Create "foldable" mesh of your armor piece (Mesh that you see when you drop an armor piece on the ground)
  • Create an icon for your equipment root template
  • Give stats to your new equipment and make sure it can be generated for loot.


As an example you can check how Lizards female platemail armor is set up :
Lizard Female files
You will need to work in Lizards_Female_Armor_ABC, use other files as references.
Note: if you export armor only include bones that you need, don't include entire skeleton.
But! The character root should be always included.
If you're making a helmet or any other piece of armor that is only skinned to 1 bone, make it rigid.
Go to "Extra Attributes" tab in Maya and put "Rigid = true", otherwise it won't work in the editor.

Cloth Simulation
Cloth meshes shouldn't have any thickness.
To add cloth simulation you need add "Cloth=1" in "Extra Attributes" tab in maya and add vertex paint on your mesh.
Black for fixed vertices (0, 0, 0) Red for simulated vertices (255, 0 ,0)
You can preview how it looks in the example file:

ExampleFileCloth.jpeg

In Maya, select your mesh -> go to Polygons tab -> Color -> Paint Vertex Color
Make sure there are no elements with only red vertices. Black vertices are needed to keep the cloth in place. If the cloth is not connected to the rest of your mesh by black vertices, it will fall through the level.
Make sure your cloth simulated mesh has only 1 smoothing group. To be sure in Maya, select your mesh -> go to Polygons tab -> Normals -> Soften Edge
Try not to go too high poly with your cloth simulated meshes, as it will affect performance. Keep it <400 vertices per cloth mesh.
Don't put cloth simulated meshes in the areas where they will bend (elbows, shoulders, knees) it won't look good.
If you added cloth to a mesh when you double click on it in content browser you will be able to edit some cloth parameters:

ClothParameters.jpeg

Pose matching is one of the most important parameter you'll find there. Don't put it on 0, because it will fly around too much. If you put it too high your cloth mesh will be too stiff or wouldn't simulate at all. Best results could be achieved when it's between 0.01 - 0.2

Equipment root templates
If you want to change existing equipment or add new ones, you will have to work with equipment root templates. Each equipment root has it's Equipment Data:

EqDataExample.jpeg

You need to assign meshes to each race gender and tick the box if you want to deactivate any visual of any body part (usually you should).
We have "Deactivate Equipment Slot Visuals" there as well, but it is used in very rare cases, when we want to hide certain equipment slots, whenever something is equipped. For example, we have a long robe that hides any trousers your character equips.

Skeleton/Undead equipment
Undeads are using the same rigs as their living counterparts, so you can avoid remodeling entire meshes by just duplicating the existing mesh from the alive version and assigning Helper_Invisible_A material to the naked bodyparts in it. If the naked skin was baked in the texture you can use a different character material (replace the source file of the material to Characters_PRB_Skeletons from the CHaracters_PBR folder and reassign the textures)

Hair and Helmets
If you're are making an equip-able helmet you need to add a separate mesh with hair to it. It needs to be in the same granny but separate mesh with "_Hair_" in its name. In this case if a player is bald and equips your hair mesh from the helmet won't be rendered.

HelmetHair.jpeg

The hair and helmet is in one layer "Humans_Female_Armor_Mage_B_Helmet_A" hair is called Humans_Female_Armor_Mage_B_Hair_E_Mesh. If the player is bald and equips this helmet he'll only equip the hat.

Downloadable files

Example files of the creatures Animals:
Bear example
Boar example
Cattle example
Crocodile example
Deer example
Dog example
Frog example
Pig example
Rat example
Salamander example
Squirrel example
Tiger example
Turtle example
Wolf example

Example files of the creatures Creatures:
ElementalDevil example
Insect example
Werewolf example
Automaton example
Troll example

Playable Races (includes armor):
Dwarves Female files
Dwarves Male files
Elves Female files
Elves Male files
Human Female files
Human Male files
Lizard Female files
Lizard Male files

Weapons REF