IMaterial

Description

interface Tinman.Engine.Models.IMaterial

Derived from

IEquatable<IMaterial>
IConfigurable

Extended by

Material sealed

Base interface for classes that describe materials of 3D models.

Public / Attributes

Albedo


public attribute Albedo → (get)

value : ColorF

The albedo color value (linear sRGB).

The albedo color and material transparency.

The red, green and blue channels define the albedo color (ColorF.R, ColorF.G and ColorF.B). The alpha channel holds the material transparency (ColorF.A).

Defaults to ColorF.White.

AlbedoMap


public attribute AlbedoMap → (get)

value : IModelTexture

The albedo texture (compressed sRGB) or null.

Albedo texture map, will be modulated with Albedo.

Displacement


public attribute Displacement → (get)

value : float32

[>=0]
The maximum displacement, in model-space.

The maximum displacement.

DisplacementMap


public attribute DisplacementMap → (get)

value : IModelTexture

The displacement texture (linear) or null.

The displacement map.

Displacement values are read from the red channel; all other channels are ignored.

The red pixel intensity in the range [0..1] is mapped to the displacement values amount in the range -Displacement..Displacement. Thus, a pixel intensity of 0.5 will result in zero displacement.

Emissive


public attribute Emissive → (get)

value : ColorF

The emissive color value (linear sRGB).

The emissive color.

The red, green and blue channels define the emissive color (ColorF.R, ColorF.G and ColorF.B). The alpha channel is ignored ( ColorF.A).

Defaults to ColorF.Black.

EmissiveMap


public attribute EmissiveMap → (get)

value : IModelTexture

The emissive texture (compressed sRGB) or null.

Emissive texture map, will be modulated with Emissive.

Gloss


public attribute Gloss → (get)

value : float32

The gloss value (linear), in the range [0..1].

The material gloss.

Gloss is defined as micro-surface smoothness: a value of 1 means that the surface is smooth (reflections will appear bright and crisp), a value of 0 means that the surface is rough (reflections will appear dim and blurry).

Defaults to 0.1.

GlossMap


public attribute GlossMap → (get)

value : IModelTexture

The gloss texture (linear) or null.

The gloss texture map, will be modulated with Gloss.

Gloss values are read from the red channel; all other channels are ignored.

IsTransparent


public attribute IsTransparent → (get)

value : bool

true if this material is transparent, false if it is opaque.

Is this material transparent?

A material is considered to be transparent if it can produce semi-transparent pixels (i.e. normalized alpha values greater than 0 and less than 1).

LineThickness


public attribute LineThickness → (get)

value : float32

The line thickness for opaque line geometry, in screen pixels. Will be clamped to the supported range (see remarks).

The thickness to use for opaque line geometry.

At render time, the ILineFeatureLevels.FeatureLevel of the graphics context will be used to clamp the line thickness to the supported range.

Defaults to 1.

NormalMap


public attribute NormalMap → (get)

value : IModelTexture

The normal texture (linear sRGB) or null.

Normal texture map.

The red, green and blue channels define the tangent-space normal vector (not necessarily of unit length). The alpha channel is ignored.

The relative pixel intensities (red, green, blue) in the range [0..1] are mapped to the unit cube:

red  :[0..1] => X:[-1 .. +1]
green:[0..1] => Y:[-1 .. +1]
blue :[0..1] => Z:[-1 .. +1]

where X+ is the tangent direction (positive texture U-axis), Y+ is the bitangent direction (positive texture V-axis) and Z+ is direction of the surface normal vector.

OcclusionMap


public attribute OcclusionMap → (get)

value : IModelTexture

The ambient occlusion texture (linear) or null.

Ambient occlusion map.

Ambient lighting is modulated with the ambient occlusion values read from the occlusion map, i.e. an ambient occlusion value of 1 will result in full ambient lighting whereas a value of 0 will result in zero ambient lighting.

Ambient occlusion values are read from the red channel; all other channels are ignored.

OpacityMap


public attribute OpacityMap → (get)

value : IModelTexture

The opacity texture (linear) or null.

Opacity map.

Material transparency (i.e. the alpha channel of Albedo and AlbedoMap) is modulated with the opacity values read from the opacity map.

Opacity values are taken from the red channel; all other channels are ignored.

Reflectivity


public attribute Reflectivity → (get)

value : ColorF

The reflectivity color value (linear sRGB).

The reflectivity value.

The red, green and blue channels define the reflectivity color and intensity of the material (ColorF.R, ColorF.G and ColorF.B). The alpha channel is ignored (ColorF.A).

Defaults to (0.04, 0.04, 0.04).

ReflectivityMap


public attribute ReflectivityMap → (get)

value : IModelTexture

The reflectivity texture (compressed sRGB) or null.

Reflectivity texture map, will be modulated with Reflectivity.

Translucency


public attribute Translucency → (get)

value : ColorF

The translucency color value (linear sRGB).

The translucency value.

The red, green and blue channels define the translucency of the material when backlit ( ColorF.R, ColorF.G and ColorF.B). The alpha channel is ignored (ColorF.A).

Defaults to ColorF.Black.

TranslucencyMap


public attribute TranslucencyMap → (get)

value : IModelTexture

The translucency texture (compressed sRGB) or null.

Translucency texture map, will be modulated with Translucency.