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

From SCS Modding Wiki
Jump to navigation Jump to search
Line 17: Line 17:
 
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.
 
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.
  
# [[Tools/SCS Blender Tools/Shader type/building.lvcol.day]]
+
=== building.lvcol.day ===
# [[Tools/SCS Blender Tools/Shader type/decalshadow]]
+
Same as [[#building.day]] with extra multiplication of vertex color.
# [[Tools/SCS Blender Tools/Shader type/dif]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.anim]]
+
During the day vertex color is multiplying specular map, on the other hand during the night vertex color is multiplying luminance.
# [[Tools/SCS Blender Tools/Shader type/dif.lum]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.lum.spec]]
+
=== decalshadow ===
# [[Tools/SCS Blender Tools/Shader type/dif.spec]]
+
Used for transparent static baked shadows. Color of surfaces is put together from the base texture multiplied with material diffuse and vertex color.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.add.env]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.spec.add.env.nofresnel]]
+
On the other hand transparency is donated by multiplication of vertex color alpha and base texture alpha channel.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.fade.dif.spec]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.spec.mult.dif.spec]]
+
=== dif ===
# [[Tools/SCS Blender Tools/Shader type/dif.spec.mult.dif.spec.add.env]]
+
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.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.mult.dif.spec.iamod.dif.spec]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.spec.oclu]]
+
==== Useful Flavor Combinations ====
# [[Tools/SCS Blender Tools/Shader type/dif.spec.oclu.add.env]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.spec.over.dif.opac]]
+
# '''"dif.a"''' - the areas on geometries where texture has alpha value 0 will be transparent. Example usage: grills, railings and ladders on far buildings.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.weight]]
+
# '''"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.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.weight.add.env]]
+
# '''"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.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.weight.mult2]]
+
# '''"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.
# [[Tools/SCS Blender Tools/Shader type/dif.spec.weight.mult2.weight2]]
+
 
# [[Tools/SCS Blender Tools/Shader type/dif.spec.weight.weight.dif.spec.weight]]
+
=== dif.anim ===
# [[Tools/SCS Blender Tools/Shader type/dif.weight.dif]]
+
=== dif.lum ===
# [[Tools/SCS Blender Tools/Shader type/fakeshadow]]
+
=== dif.lum.spec ===
# [[Tools/SCS Blender Tools/Shader type/flare]]
+
=== dif.spec ===
# [[Tools/SCS Blender Tools/Shader type/glass]]
+
=== dif.spec.add.env ===
# [[Tools/SCS Blender Tools/Shader type/grass]]
+
=== dif.spec.add.env.nofresnel ===
# [[Tools/SCS Blender Tools/Shader type/lamp]]
+
=== dif.spec.fade.dif.spec ===
# [[Tools/SCS Blender Tools/Shader type/light.tex]]
+
=== dif.spec.mult.dif.spec ===
# [[Tools/SCS Blender Tools/Shader type/lightmap.night]]
+
=== dif.spec.mult.dif.spec.add.env ===
# [[Tools/SCS Blender Tools/Shader type/mlaaweight]]
+
=== dif.spec.mult.dif.spec.iamod.dif.spec ===
# [[Tools/SCS Blender Tools/Shader type/none]]
+
=== dif.spec.oclu ===
# [[Tools/SCS Blender Tools/Shader type/reflective]]
+
=== dif.spec.oclu.add.env ===
# [[Tools/SCS Blender Tools/Shader type/shadowmap]]
+
=== dif.spec.over.dif.opac ===
# [[Tools/SCS Blender Tools/Shader type/shadowonly]]
+
=== dif.spec.weight ===
# [[Tools/SCS Blender Tools/Shader type/sign]]
+
=== dif.spec.weight.add.env ===
# [[Tools/SCS Blender Tools/Shader type/sky]]
+
=== dif.spec.weight.mult2 ===
# [[Tools/SCS Blender Tools/Shader type/truckpaint]]
+
=== dif.spec.weight.mult2.weight2 ===
# [[Tools/SCS Blender Tools/Shader type/unlit.tex]]
+
=== dif.spec.weight.weight.dif.spec.weight ===
# [[Tools/SCS Blender Tools/Shader type/unlit.vcol.tex]]
+
=== dif.weight.dif ===
# [[Tools/SCS Blender Tools/Shader type/water]]
+
=== fakeshadow ===
# [[Tools/SCS Blender Tools/Shader type/window.day]]
+
=== flare ===
# [[Tools/SCS Blender Tools/Shader type/window.night]]
+
=== 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 ==
 
== Flavors ==
  
# [[Tools/SCS Blender Tools/Shader flavor/a]]
+
=== a ===
# [[Tools/SCS Blender Tools/Shader flavor/add.env]]
+
=== add.env ===
# [[Tools/SCS Blender Tools/Shader flavor/altuv]]
+
=== altuv ===
# [[Tools/SCS Blender Tools/Shader flavor/airbrush]]
+
=== airbrush ===
# [[Tools/SCS Blender Tools/Shader flavor/awhite]]
+
=== awhite ===
# [[Tools/SCS Blender Tools/Shader flavor/add & over & mult]]
+
=== add & over & mult ===
# [[Tools/SCS Blender Tools/Shader flavor/colormask]]
+
=== colormask ===
# [[Tools/SCS Blender Tools/Shader flavor/decal]]
+
=== decal ===
# [[Tools/SCS Blender Tools/Shader flavor/flat]]
+
=== flat ===
# [[Tools/SCS Blender Tools/Shader flavor/indenv]]
+
=== indenv ===
# [[Tools/SCS Blender Tools/Shader flavor/linv]]
+
=== linv ===
# [[Tools/SCS Blender Tools/Shader flavor/lvcol]]
+
=== lvcol ===
# [[Tools/SCS Blender Tools/Shader flavor/tsnmap & tsnmap16 & tsnmapuv & tsnmapuv16]]
+
=== tsnmap & tsnmap16 & tsnmapuv & tsnmapuv16 ===
# [[Tools/SCS Blender Tools/Shader flavor/nocull]]
+
=== nocull ===
# [[Tools/SCS Blender Tools/Shader flavor/paint]]
+
=== paint ===
# [[Tools/SCS Blender Tools/Shader flavor/shadow]]
+
=== shadow ===
# [[Tools/SCS Blender Tools/Shader flavor/tg0]]
+
=== tg0 ===
# [[Tools/SCS Blender Tools/Shader flavor/tg1]]
+
=== tg1 ===

Revision as of 14:11, 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

dif.lum

dif.lum.spec

dif.spec

dif.spec.add.env

dif.spec.add.env.nofresnel

dif.spec.fade.dif.spec

dif.spec.mult.dif.spec

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

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