Texture.Normals

Description

Name

class Tinman.Model.Texture.Normals

Derived from

Model.Texture

Interprets this model texture as a bump map and computes a normal map from it.

Black pixels lie in the XY plane (see figure), white pixels are at the given height. The height is specified relative to the size of this texture (i.e. maximum of width and height), e.g. a value of 1 would turn the cuboid below into a cube.

     .............
    .:          .:
Z+ . :         . :
| .  +--------.--+-- X+
|.  /        .  /
.............  /
: /         : /
:/          :/
+-----------+
           /
          Y+

Fields / Required

source

Type

Model.Texture

Constraint

# != null

The source image from which to create a normal map.

Fields / Optional

height

Type

number

Constraint

# > 0

Default

0.01

The relative bump height (see remarks).