Difference between revisions of "Documentation/Tools/SCS Blender Tools/Supported shaders"

From SCS Modding Wiki
Jump to navigation Jump to search
(dif.spec.mult.dif.spec.add.env)
Line 94: Line 94:
 
# '''"dif.spec.mult.dif.spec.tsnmap.shadow"''' - beside normal maps geometries with this material will also cast shadows. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.
 
# '''"dif.spec.mult.dif.spec.tsnmap.shadow"''' - beside normal maps geometries with this material will also cast shadows. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.
  
=== dif.spec.mult.dif.spec.add.env ===  
+
=== dif.spec.mult.dif.spec.add.env ===
 +
Same as [[#dif.spec.mult.dif.spec]] with additional reflection pass and texture.
 +
 
 
=== dif.spec.mult.dif.spec.iamod.dif.spec ===  
 
=== dif.spec.mult.dif.spec.iamod.dif.spec ===  
 
=== dif.spec.oclu ===  
 
=== dif.spec.oclu ===  

Revision as of 14:39, 5 February 2016

With version 1.0 Blender Tools are presenting flavors in materials. Flavors are used for common passes in more shaders. Depending on each shader different flavors can be enabled on it.

Shader preset list now includes only base shader types, which can be later altered with switching different flavors on and off. That's why this page now resembles base shader types and flavors description.

Base Shader Types

building.add.env.day

Use this material if you want your building windows to reflect at day-time and be lit at night. It shall be more or less used on distant "panorama" buildings as they don't need advanced features from #window.day / #window.night.

It effectively switches two materials depending on the time of the day. During the day it uses #dif.spec.add.env material with texture for reflections and at night switches to #dif.lum.spec in order for windows to light at the night.

The texture must have alpha channel on places where it should have reflections and light at night.

building.day

Same as #building.add.env.day without reflection component.

It effectively switches two materials depending on the time of the day. During the day it uses #dif.spec material where alpha is used as specular map and at night switches to #dif.lum.spec in order for windows to light at the night.

building.lvcol.day

Same as #building.day with extra multiplication of vertex color.

During the day vertex color is multiplying specular map, on the other hand during the night vertex color is multiplying luminance.

decalshadow

Used for transparent static baked shadows. Color of surfaces is put together from the base texture multiplied with material diffuse and vertex color.

On the other hand transparency is donated by multiplication of vertex color alpha and base texture alpha channel.

dif

This is one of the most basic shader with diffuse and specular light featuring one texture. Specular light is used directly from value specified in material.

Useful flavor combinations

  1. "dif.a" - the areas on geometries where texture has alpha value 0 will be transparent. Example usage: grills, railings and ladders on far buildings.
  2. "dif.shadow" - uses geometry also as shadow caster. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.
  3. "dif.shadow.a" - is a combination of "dif.shadow" and "dif.a" which means that areas of geometry which will be transparent also won't cast shadows. This shader may be used for fences models which shall beside begin transparent also cast shadows.
  4. "dif.over" - in this case alpha map represent transparency blending of material, where alpha with value 0 means completely transparent and alpha with value 255 means non transparent.

dif.anim

Same as #dif with extra behaviour of blending over time between base and over texture.

Extra auxiliary setting in this shader defines animation speed, meaning how quickly textures are switched.

dif.lum

Same as #dif with additional linear interpolation calculation between "dif" shader result and base texture RGB colors by factor of base texture alpha channel. As a result this shader will give you lit surfaces during the night, where amount of surface lit is donated by base texture alpha channel.

Example usage of this shader are dashboard and gps surfaces in truck inside Euro Truck Simulator 2 game.

Useful flavor combinations

  1. "dif.lum.decal.over" - decal part of shader name donates ability to use lightning model from the surfaces lying behind geometries using this shader and over part of shader name represent transparency blending of material, where alpha with value 0 means completely transparent and alpha with value 255 means non transparent. Example usage of this shader are lit icons on buttons in truck cabin which shall be:
  2. lit to reflect effect of back light,
  3. transparent around icon to blend on the button below,
  4. use the lightning model from the surface below again for blending on the button surface.

dif.lum.spec

Similar as #dif.lum with difference that surface has additional specular map shading as #dif.spec.

dif.spec

Basic shader with diffuse and specular light featuring one texture. Alpha of the texture represents intensity of specular light.

Useful flavor combinations

  1. "dif.spec.a" - making transparent areas where texture has alpha with value 0.
  2. "dif.spec.over" - texture alpha channel also represent transparency blending of material, where alpha with value 0 means completely transparent and alpha with value 255 means non transparent.
  3. "dif.spec.shadow" - uses geometry also as shadow caster. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.
  4. "dif.spec.shadow.a" - with enabled shadow calculations over alpha channel which means that areas of geometry which will be transparent also won't cast shadows.
  5. "dif.spec.tsnmap.shadow" - with extra texture defining normal maps and using geometries for shadow casters. Both textures are using same UV layer. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.

dif.spec.add.env

Same as #dif.spec with additional reflection pass and texture.

Useful flavor combinations

  1. "dif.spec.add.env.paint" - with usage of extra color defined in definition files. All areas on the base texture will be multiplied with extra color while in game. This shader is either used for AI cars or truck parts which should be painted with base truck color.

dif.spec.add.env.nofresnel

Same as #dif.spec.add.env without fresnel attribute and computation, therefore is slightly cheaper to compute.

dif.spec.fade.dif.spec

Shader mostly used for rocks where one texture can be used as base and detail one.

Shader is fading between base and detail texture with assumption that detail texture is representing details of base texture (sounds like fractals). Therefore base and detail textures should use same texture file which has to be self-similar.

However blending details are defined with auxiliary values where:

  • From - detail texture fade out start, represented as z-distance in meters
  • Range - detail texture fade range, represented in meters
  • Bias - strength of detail texture mixing with base texture
  • UV Scale - UV layer scale factor for detail layer (as shader shall be using same textures for base and detail, this factor comes handy as user can use only one UV layer for base & detail and then this factor represents how UV layer will be rescaled for detail texture)

dif.spec.mult.dif.spec

Same as #dif.spec with one more texture which color and alpha is multiplied with base texture.

Example usage in Euro Truck Simulator 2 is trailer where company texture is multiplied with base texture of the trailer.

Useful flavor combinations

  1. "dif.spec.mult.dif.spec.tsnmap.shadow" - beside normal maps geometries with this material will also cast shadows. This type of shader shall be used only in the case of complex animated geometries, because cost of animation calculation may be greater than calculating shadows directly on high poly mesh.

dif.spec.mult.dif.spec.add.env

Same as #dif.spec.mult.dif.spec with additional reflection pass and texture.

dif.spec.mult.dif.spec.iamod.dif.spec

dif.spec.oclu

dif.spec.oclu.add.env

dif.spec.over.dif.opac

dif.spec.weight

dif.spec.weight.add.env

dif.spec.weight.mult2

dif.spec.weight.mult2.weight2

dif.spec.weight.weight.dif.spec.weight

dif.weight.dif

fakeshadow

flare

glass

grass

lamp

light.tex

lightmap.night

mlaaweight

none

reflective

shadowmap

shadowonly

sign

sky

truckpaint

unlit.tex

unlit.vcol.tex

water

window.day

window.night

Flavors

a

add.env

altuv

airbrush

awhite

add & over & mult

colormask

decal

flat

indenv

linv

lvcol

tsnmap & tsnmap16 & tsnmapuv & tsnmapuv16

nocull

paint

shadow

tg0

tg1