Model.Material

Description

Name

struct Tinman.Model.Material

Used by

Read.material

Describes a material of a 3D model.

Fields / Optional

albedo

Type

Tinman.Color

Default

{Color.Name: White}

The albedo color and material transparency.

The red, green and blue channels define the albedo color (linear sRGB). The alpha channel holds the material transparency (linear).


albedoMap

Type

Model.Texture

Default

null

Albedo texture map (compressed sRGB), will be modulated with albedo.


displacement

Type

number

Default

0

The maximum displacement, in model-space.


displacementMap

Type

Model.Texture

Default

null

The displacement map.

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


emissive

Type

Tinman.Color

Default

{Color.Name: Black}

The emissive color.

The red, green and blue channels define the emissive color (linear sRGB). The alpha channel is ignored.


emissiveMap

Type

Model.Texture

Default

null

Emissive texture map (compressed sRGB), will be modulated with emissive.


gloss

Type

number

Default

0.10000000149011612

The material gloss (linear).

Gloss is defined as microsurface 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).


glossMap

Type

Model.Texture

Default

null

The gloss texture map, will be modulated with gloss.

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


lineThickness

Type

number

Default

1

The thickness to use for opaque line geometry.


normalMap

Type

Model.Texture

Default

null

Normal texture map.

The red, green and blue channels (linear sRGB) 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

Type

Model.Texture

Default

null

Ambient occlusion map.

Ambient lighting is modulated with the ambient occlusion values read from the occlusion map.

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


opacityMap

Type

Model.Texture

Default

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 (linear); all other channels are ignored.


reflectivity

Type

Tinman.Color

Default

{I16: 2621}

The reflectivity value.

The red, green and blue channels (linear sRGB) define the reflectivity color and intensity of the material. The alpha channel is ignored.


reflectivityMap

Type

Model.Texture

Default

null

Reflectivity texture map (compressed sRGB), will be modulated with reflectivity.


translucency

Type

Tinman.Color

Default

{Color.Name: Black}

The translucency value.

The red, green and blue channels (linear sRGB) define the translucency of the material when backlit. The alpha channel is ignored.


translucencyMap

Type

Model.Texture

Default

null

Translucency texture map (compressed sRGB), will be modulated with translucency.