material.map shape attribute

Syntax

  • string material.colormap
  • string material.bumpmap
  • string material.dirtmap
  • string material.specularmap
  • string material.opacitymmap
  • string material.normalmap
  • string material.emissivemap
  • string material.occlusionmap
  • string material.roughnessmap
  • string material.metallicmap
  • float material.{colormap|...|metallicmap}.s{u|v}
  • float material.{colormap|...|metallicmap}.t{u|v}
  • float material.{colormap|...|metallicmap}.rw

Description

The material.map attribute consists of 10 texture layers. Each texture layer consists of the following:

  • file name of the associated texture (material.{colormap|...|metallicmap})
  • scaling factors in u and v directions (material.{colormap|...|metallicmap}.s{u|v})
  • offsets in u and v directions (float material.{colormap|...|metallicmap}.t{u|v})
  • rotation around the w-axis (material.{colormap|...|metallicmap}.rw)

All these attributes can be set and read.

Note:

Each texture layer has a corresponding uv-set (texture coordinates) in the shape's geometry. More information can be found in Texturing: Essential Knowledge

  • The bump map is interpreted as luminance map (CCIR 601).
  • The normal map is interpreted as normals in tangent space encoded as rgb colors.
  • The roughness map only uses the green channel.
  • The metallic map only uses the blue channel.
  • The occlusion map only uses the red channel.

See Asset Search for information about where the texture is searched and Built-in Assets for a list of built-in textures.

Related


In this topic
  1. Syntax
  2. Description
  3. Related