M.reflect

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Related Links: Added Category:Material types)
m (Setting up m.reflect in Blender)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
'''This is a legacy material, and should only be used where compatibility with older versions of Trainz is required.'''
 +
 
=Description=
 
=Description=
 
Reflective material
 
Reflective material
  
Blends a reflection map onto a diffuse map. The blend between reflection and diffuse maps is controlled by the ''layerOpacity'' or ''amount'' value of the reflection map.
+
Blends a reflection map onto a diffuse map. The blend between reflection and diffuse maps is controlled by the alpha channel ''layerOpacity'' or ''amount'' value of the reflection map. The opacity of the material is defined by the material-wide opacity setting.
 
=Preview=
 
=Preview=
 
[[Image:mat_reflect.jpg]]
 
[[Image:mat_reflect.jpg]]
Line 8: Line 10:
 
[[Image:max_material_reflect.jpg]]
 
[[Image:max_material_reflect.jpg]]
 
=Max Settings in detail=
 
=Max Settings in detail=
* Ambient - Ambient color R,G,B
+
* Ambient = Ambient color R,G,B
* Diffuse - Diffuse color R,G,B
+
* Diffuse = Diffuse color R,G,B
* Specular - Specular color R,G,B
+
* Specular = Specular color R,G,B
* Opacity - Level of transparency, 0 = transparent, 100 = opaque.
+
* Opacity = Level of transparency, 0 = transparent, 100 = opaque.
* Glossiness - Should be set to 32 to match game.
+
* Glossiness = Should be set to 32 to match game.
 
* [[Diffuse map]] - RGB = diffuse color
 
* [[Diffuse map]] - RGB = diffuse color
* [[Opacity map]] - Legacy support for Diffuse texture Alpha channel
+
* [[Diffuse map]] - A = Per-pixel opacity, multiplied by the material-wide opacity setting. Black = fully transparent. White = fully opaque.
* Reflection map - RGB = reflection color. Spherical mapping. 'amount' controls blend between reflection and diffuse maps.
+
* [[Opacity map]] - (Legacy support.) If used, replaces the A channel of the diffuse map.
 +
* Reflection map - RGB = reflection color. Spherical mapping.
 +
* Reflection map - A = Alpha unused and should be omitted or left fully white to avoid compression artifacts.
 +
* Reflection map - amount = Controls blend between reflection and diffuse maps.
 +
=Setting up m.reflect in Blender=
 +
 
 +
(Warning:  N3V have advised that all materials require a diffuse texture and this would include M.Reflect.  See [https://forums.auran.com/trainz/showthread.php?148803-Reflections&p=1708665#post1708665 this forum post] during a discussion about possible faulty reflective materials in TANE and TRS19).
 +
 
 +
 
 +
A reflective effect using an env_metal image can also be achieved in [[Blender]].
 +
Most of the explanation should be given by the image, but a couple of useful pointers are:
 +
 
 +
1) This is the only time the Blender Trainz exporter will accept any kind of texture mapping other than UV. You don't have to do any mapping yourself, just select reflect and the exporter/Trainz does the rest. Setting the mapping type to reflect is what tells the exporter that this material will be of the m.reflect type.
 +
 
 +
2) Setting the Texture > Influence > Diffuse > Colour slider to a low number (PEV recommends less than 0.3) is important, otherwise your object will be so shiny that it appears pure white.
 +
 
 +
All the important settings are highlighted red in the accompanying image, the box highlighted purple shows example values for the diffuse colour used to get the brassy colour in the screenshot labelled final result.
 +
Adjusting the sliders in the highlighted areas will allow you to produce different variations of the effect.
 +
 
 +
[[Image:envmetal_setup.png]]
 +
 
 
=Related Links=
 
=Related Links=
 
[[Material Types]] - Material types supported by Trainz.
 
[[Material Types]] - Material types supported by Trainz.

Latest revision as of 16:09, 10 October 2018

This is a legacy material, and should only be used where compatibility with older versions of Trainz is required.

Contents

[edit] Description

Reflective material

Blends a reflection map onto a diffuse map. The blend between reflection and diffuse maps is controlled by the alpha channel layerOpacity or amount value of the reflection map. The opacity of the material is defined by the material-wide opacity setting.

[edit] Preview

Mat reflect.jpg

[edit] Max Settings

Max material reflect.jpg

[edit] Max Settings in detail

  • Ambient = Ambient color R,G,B
  • Diffuse = Diffuse color R,G,B
  • Specular = Specular color R,G,B
  • Opacity = Level of transparency, 0 = transparent, 100 = opaque.
  • Glossiness = Should be set to 32 to match game.
  • Diffuse map - RGB = diffuse color
  • Diffuse map - A = Per-pixel opacity, multiplied by the material-wide opacity setting. Black = fully transparent. White = fully opaque.
  • Opacity map - (Legacy support.) If used, replaces the A channel of the diffuse map.
  • Reflection map - RGB = reflection color. Spherical mapping.
  • Reflection map - A = Alpha unused and should be omitted or left fully white to avoid compression artifacts.
  • Reflection map - amount = Controls blend between reflection and diffuse maps.

[edit] Setting up m.reflect in Blender

(Warning: N3V have advised that all materials require a diffuse texture and this would include M.Reflect. See this forum post during a discussion about possible faulty reflective materials in TANE and TRS19).


A reflective effect using an env_metal image can also be achieved in Blender. Most of the explanation should be given by the image, but a couple of useful pointers are:

1) This is the only time the Blender Trainz exporter will accept any kind of texture mapping other than UV. You don't have to do any mapping yourself, just select reflect and the exporter/Trainz does the rest. Setting the mapping type to reflect is what tells the exporter that this material will be of the m.reflect type.

2) Setting the Texture > Influence > Diffuse > Colour slider to a low number (PEV recommends less than 0.3) is important, otherwise your object will be so shiny that it appears pure white.

All the important settings are highlighted red in the accompanying image, the box highlighted purple shows example values for the diffuse colour used to get the brassy colour in the screenshot labelled final result. Adjusting the sliders in the highlighted areas will allow you to produce different variations of the effect.

Envmetal setup.png

[edit] Related Links

Material Types - Material types supported by Trainz.

Max Exporters - 3D Studio Max exporters.

Exporting with 3D Studio Max - Material setup and exporting with 3DS Max.

.texture.txt Files - What goes into a .texture.txt file

Personal tools