Changes

Jump to navigation Jump to search

Documentation/Tools/SCS Blender Tools/Materials

670 bytes added, 12:57, 6 December 2019
no edit summary
SCS Blender Tools uses its own Material material settings, so every Material material in Blender contains a palette panel called “SCS Materials”'''SCS Material''' in ''Material'' tab of Blender properties window. It is essential to use settings here exclusively to set up any available Material material properties. If you'll be changing the Materialmaterial's settings in Blender's standard palettespanels, the appearance of the Material 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.
== Lamps Render and 3D View setup Setup ==
To get closest result to the one in SCS Game Engine you should use new feature of easy lighting setup, see moreEEVEE render engine: [[../Scene Lighting]]
Additionally you have to switch shading in the 3D view properties to GLSL and tick "Backface Culling" to see models properly[[File:SCS_Material_Specials_-_EEVEE.280.png]]
and switch ''Viewport Shading'' to ''Rendered'' to see models rendered properly.  [[File:SCS_Material_Specials_-_Rendered_Viewport.280.png]] <blockquote>{{Note|By default fully fledged reference lighting will be used, but if you want to create specific in-game time of the day like lighting, please refer to: [[../Scene Lighting|Scene Lighting]]}}</blockquote> == Merge Materials == SCS Material panel also features one well hidden powerfull operator: '''Merge Materials''' located in panel header on the right side: [[File:SCS_Material_Specials_-_3D_View_Setup_Merge_Materials.280.png]] This operator is able to merge materials depending on selected criteria from the newly appearing dialog when operator button is pressed.
== Shader Usage ==
SCS Material Materials 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 ===
[[File:SCS_Material_Specials_-_Shader_Preset.280.png]]
The “SCS Materials” palette SCS Materials panel 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 &quot;"shadow&quot; " 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 ===
[[File:SCS_Material_Specials_-_Imported_Shader.280.png]]
When you import any existing game model and some of the materials cannot be found in existing Shader Presetsshader 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 &quot;"Mappings&quot; " field inside &quot;"Textures&quot; " for this type of shader. &quot;, where "tex_coord_X&quot; " 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 &quot;WT&quot; button for some of the properties which can be written through all of the looks, for more information see the section [[Documentation/Tools/SCS Blender Tools/Look system#Write Through|Look system#Write Through]]
=== Substance ===
Substance property is item from list of physical materials, which is loaded from Material Substance Library file (see [[Documentation/Tools/SCS Blender Tools../Global Settings#Path Settings|Global Settings#Path Settings]]). These can for example set up the physical type of the road surface.
=== Material Attributes ===
==== 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. Beside currently selected shader preset search button can be found, which enables you to quickly search trough available presets.
<blockquote>{{Note|Usage of texture which is not from SCS project directory (see [[Documentation/Tools/SCS Blender Tools../Global Settings#Path Settings|Global Settings#Path Settings]]) and it's sub-directories may cause errors and warnings on export!}}
</blockquote>
==== 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 ( [[File:SCS_Material_Specials_-_Create_TOBJ_Btn.png]] ) 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 then reload button ( [[File:SCS_Material_Specials_-_Reload_TOBJ_Btn.png]] ) , with which you can load currently saved settings of this TOBJ, will be shown. 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.
==== 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 shader preset is used. === Material Item Extras Menu === Additionally there is ''More Options'' menu button ( <span style="color:#FFFFFF">{{Blender Button|'''𐩒'''}}</span> ) for most of the material attributes. Some can be written through (more about write trough: [[../Look system#Write Through|Look system#Write Through]]) and some can be even copied as or pasted from linear color space. [[File:SCS_Material_Specials_-_Extras_Menu.280.png]]

Navigation menu