Documentation/Tools/SCS Blender Tools/Materials
SCS Blender Tools uses its own Material settings, so every Material in Blender contains a palette called “SCS Materials”. It is essential to use settings here exclusively to set up any available Material properties. If you'll be changing the Material's settings in Blender's standard palettes, the appearance of the Material will change in 3D View, but the SCS material settings will not change and exported material may look very different when viewed in SCS Game Engine.
Contents
Lamps and 3D View setup
To get closest result to the one in SCS Game Engine you should use one "Sun" lamp with settings shown in the image below.
Additionally you have to switch shading in the 3D view properties to GLSL and tick "Backface Culling" to see models properly.
Shader Usage
SCS Material are created on the base of shader presets. When user is creating and using SCS Materials he can use any shader preset found in the list and switch/edit material flavors, attributes and textures. However second type of shader usage is imported shader, which is exclusively created only on import when model is using material effect that can not be found inside shader presets.
Shader Preset
The “SCS Materials” palette features the list of Shader Presets, where you can choose from materials with its own predefined values and change some of them to your liking. Moreover each shader preset now also features flavors, which are common extensions to many shaders.
Flavors are changing behaviour of shader it's full effect name and in some cases adding or removing some material attributes or textures. Some flavors may not change mesh visually as they are used for different purposes. For example "shadow" flavor will tell shader to use this material also as shadow caster and thus there is nothing that should visually change on the mesh.
Imported Shader
When you import any existing game model and some of the materials cannot be found in existing Shader Presets, Imported Shader is created. Attributes cannot be edited, but it will still export correctly as it was in original file. Though textures and their mappings can be changed for visual preview.
Additionally there is "Mappings" field inside "Textures" for this type of shader. "tex_coord_X" entries specify which UV layer will be exported for this alias.
Properties and usage
Properties in material are shader type dependent. So each type of shader may have different attributes and textures. Additionally there is "WT" button for some of the properties which can be written through all of the looks, for more information see the section Look system#Write Through
Substance
Substance property is item from list of physical materials, which is loaded from Material Substance Library file (more info at Global Settings#Path Settings). These can for example set up the physical type of the road surface.
Material Attributes
In this section you can find various visual shader attributes, that you can alter. Most important ones are interactively reflected on your model in 3D View.
Material Textures
This section provides an interface for specifying texture images for different shader's texture channels. Most prominent textures are automatically loaded and displayed in the 3D View.
Texture
Property defining path to texture or texture object file (TOBJ - pointers to texture images). Using map icon on the side of this property will open file browser where you will be able to select image or any TOBJ for using it as texture. After selecting, the image will be automatically applied to material.
NOTE: Usage of texture which is not from SCS project directory (see Global Settings#Path Settings) and it's sub-directories may cause errors and warnings on export!
Settings
Each texture also features extra row of controls for TOBJ file and it's settings. TOBJ's are by default created upon export if they don't exist yet. However create button ( ) will appear if TOBJ file doesn't exist yet and pressing it will create TOBJ file for this texture with default settings. In case this texture already has TOBJ file there will be only reload button ( ) with which you can load currently saved settings of this TOBJ. Sometimes reload button may appear in red color which indicates that current settings are outdated and you should press reload button to reload them. As soon as TOBJ file exist you will also have access to change any value in settings itself. Changing any of the setting in settings list will rewrite TOBJ file with updated values right away.
- U Repeat - repeat texture in U direction.
- V Repeat - repeat texture in V direction.
- TS Normal - tangent space normal for the texture.
Mapping
This property specifies which UV layer will be used for this texture. For some textures you may need to specify more then one UV layer, depends on which Shader Preset is used.