Material maps

    Material maps calculate how materials are rendered. They can use two kinds of values: color (RGB) values or scalar (single float) values.

    You can use material maps for several purposes, including gloss maps, diffuse maps, or blend maps (for combining )

    Material maps can fetch values using one of several providers:

    • Vertex stream: a value taken from mesh attributes
    • Binary operator: a combination of any other two providers
    • Color: a hex color value
    • Shader: a value provided by a ComputeColor shader. This lets you use procedural values
    • Texture: a value sampled from a textureTo choose the provider, click (Replace) and select it from the drop-down menu:

    media/material-colors-1.png

    This provider takes a value from an attribute of the mesh of the model you apply the material to.

    It has two modes: Color Vertex Stream and Custom Vertex Stream. To switch between them, with Vertex Stream selected as the provider, click (Replace) and choose the mode you want to use.

    Vertex stream mode

    Takes a color value from the mesh.

    Custom vertex stream

    Binary operator

    Perform a binary operation from two color/scalar value providers. You can nest as many material maps inside binary operators as you need (including further binary operators).

    To choose how the operation works, click (Replace) and select from the drop-down menu. The operations are similar to options when blending layers in Photoshop.

    Operation mode

    Provided directly as a constant value over the whole material.

    In the case of RGB values, you control the RGBA value with the X, Y, Z and W values (Float4).

    xyzw

    Color

    A value provided from a color hex value. This is only available for material maps that use RGB values.

    media/material-colors-3.png

    A value provided by a ComputeColor shader. This lets you use procedural values.

    For an example of a ComputeColor shader, see the .

    Texture

    Sample the color/scalar from a texture.

    For example, the images below demonstrate how the texture changes the way Xenko blends materials.

    media/material-colors-2.png