Weapons Documentation

From Nexus Mods Wiki
Jump to: navigation, search

General modeling remarks

  • Don't be afraid of using quite a lot of polygons in LOD0, because we need a lot of fidelity while the weapons are being weilded by player. Some Sabres and Hunting swords use custom normals for blade – any modification will break smoothing.
  • Weapons don't have LODs
  • Some types of weapons are sorted by quality - cheap, normal, expensive. Most affected from the overal visual is glossines and specular of blade, where cheap blades are smudgy with imperfect blade edge (in terms of mesh shape), normal blades should look normal and expensive ones should be glossier with perfect shape.
    RTENOTITLE
     

 

Axes

  • cheap, normal, expensive

Size, slots etc.:

RTENOTITLE

 

3 sharpening zones (- 5,5,5, - 15,15,15, - 25,25,25):

RTENOTITLE

 

Maces, hammers

  • cheap, normal, expensive

Size, slots etc.:

RTENOTITLE

  • no sharpening, only blood and rust mask needed

Polearms

RTENOTITLE

 
  • no sharpening, only blood and rust mask needed

Sword – long and short

  • cheap, normal, expensive
  • sharpening – 5 zones (1-5)

2nd UVs for blade damage

For weapons which are supposed to be sharpened, we use blade damage texture (see bellow). To achieve that, we lay second UVs so that the edge of the blade is exactly in the middle of a UV space. Other parts of the weapon should be downscaled and moved somewhere to the corner. Artefact allert: keep UVs in 0..1 tile, do not overlap.

RTENOTITLE

 

Materials and textures

A special Weapons shader is used for our weapons enabling us to make the weapons gradualy more bloody or rusty. The setup of this material is the main topic of this chapter.

RTENOTITLE

These checkboxes should be ticked in the material for it to function fully:

  • Detail mapping - for edge damage
  • 2UVs from VC - enables use of 2nd uvw channel, which gives us the ability to map the detailed damage on the edges.
  • weapon - enables use of blood, rust and edge damage

Textures we will be using

  • Diffuse - unique per weapon
  • Specular - unique per weapon
  • Normal + gloss in alpha (ddna)  - unique per weapon
  • Masks for rust, blood and edges and zones - unique per weapon
  • Diffuse for blood and rust - shared by all weapons
  • Edge damage - shared by all weapons

Diffuse

Nothing special here. We don't need any information in alpha. Just remember in case of metal parts that you need make it pretty dark (as the metals have very low diffuse reflectivity)

Specular

Nothing special here either. Just make it bright for metal parts (as the metals have very hight specular reflectivity. Values around 180, 180, 180 sRGB are a good start). Also don't bother to use any color in specular in case of gold and such. It gets thrown away by engine in deffered rendering anyway.

Normal

As usual.

Masks

R – rust, G – blood, B – edges, Alpha – zones. The example beloow shows mask texture for sword.

RTENOTITLE

 

R channel – RUST – simillar to G but it controls the spread of rust. Keep the range 0-180 as well (some BW rusty grunge map should work good) .

G channel  – BLOOD  – specifies where the blood will appear while hacking and slashing some flesh. Values here works with Blood factor in material proterties and it generaly says where is the treshold for blood. So the brighter the value is the sooner will the blood appears. It takes some trials to make this channel right. And the values shouldnt be brighter then 180/255 because of the algorithm used (believe me and use the levels to clip the values emoticon_wink.png

B channel – EDGES – shows where the edges of the weapons blade are and will mask the effects of sharpening

Alpha – ZONES – Basicly paint the blade from bottom up with RGB values: ZONE 1 - 5,5,5; ZONE 2 - 15,15,15; ZONE 3 - 25,25,25; ZONE 4 - 35,35,35; ZONE 5 - 50,50,50. Everything else should remain 0,0,0.

Diffuse map for blood and rust

Contains rust diffuse in R, rust specular in G and blood diffuse intensity in B (the color of the blood is picked by swatch) This map is be the same for all the weapons:

RTENOTITLE

Edge damage

Detail map mapped in 2nd UVs and can be the same for all weapons.

RTENOTITLE

 

Shader Params explained

Detail bump scale – set to 0,7–2

Detail diffuse scale – set to 0,4–0,7

Detail gloss scale – set to 0,2–0,5

Fresnes Bias – as usual around 0,15 for non metals and around 0.8 for metals

Fresnel Scale – as usual set to 1

Tiling for second UVs textures in U – 1

Tiling for second UVs textures in V – 1

Weapon Blood Color – sets the color of the blood - 200,0,0

Weapon Blood Factor – this determines how much blood is visible on the weapon. Use it to set the blood mask right and then leave it at 0

Weapon Blood Falloff – influences how sharp the edges of the blood will be, cca 15–60; depends on input mask

Weapon Blood Gloss – gloss of the blood. Around 190–220 should be right

Weapon Blood Scale – scales the blood diffuse, 4 is just right for sword size weapon

Weapon Blood Specular – specularity of the blood in range 0–1; 0,15 should be ok

Weapon Rust Blend – this is the opacity of the rust layer

Weapon Rust Factor –  this determines how much rust is visible on the weapon. Use it to get the rust mask right and then leave it at 0

Weapon Rust Falloff – influences how sharp the edges of the rust will be, around 5 looks ok (depends on input mask)

Weapon Rust Scale – scales the rust diffuze and spec

Zone0-5 Quality – used in sharpening minigame ( zone 0 – 0,0,0 is not used )

Zone0-5 Scratches – used to damage the weapon during fights ( for swords zones 1–5, for axes zones 1–3)