MaterialAssetData: {
    alphaFade: number;
    alphaTest: number;
    alphaToCoverage: boolean;
    ambient: number[];
    ambientTint: boolean;
    anisotropy: number;
    aoMap: number;
    aoMapChannel: string;
    aoMapOffset: number[];
    aoMapTiling: number[];
    aoMapUv: number;
    aoMapVertexColor: boolean;
    blendType: number;
    bumpMapFactor: number;
    clearCoat: number;
    clearCoatBumpiness: number;
    clearCoatGlossiness: number;
    clearCoatGlossMap: number;
    clearCoatGlossMapChannel: string;
    clearCoatGlossMapOffset: number[];
    clearCoatGlossMapTiling: number[];
    clearCoatGlossMapUv: number;
    clearCoatGlossVertexColor: boolean;
    clearCoatGlossVertexColorChannel: string;
    clearCoatMap: number;
    clearCoatMapChannel: string;
    clearCoatMapOffset: number[];
    clearCoatMapTiling: number[];
    clearCoatMapUv: number;
    clearCoatNormalMap: number;
    clearCoatNormalMapOffset: number[];
    clearCoatNormalMapTiling: number[];
    clearCoatNormalMapUv: number;
    clearCoatVertexColor: boolean;
    clearCoatVertexColorChannel: string;
    conserveEnergy: boolean;
    cubeMap: number;
    cubeMapProjection: number;
    cubeMapProjectionBox: { center: number[]; halfExtents: number[] };
    cull: number;
    depthTest: boolean;
    depthWrite: boolean;
    diffuse: number[];
    diffuseMap: number;
    diffuseMapChannel: string;
    diffuseMapOffset: number[];
    diffuseMapTiling: number[];
    diffuseMapTint: boolean;
    diffuseMapUv: number;
    diffuseMapVertexColor: boolean;
    emissive: number[];
    emissiveIntensity: number;
    emissiveMap: number;
    emissiveMapChannel: string;
    emissiveMapOffset: number[];
    emissiveMapTiling: number[];
    emissiveMapTint: boolean;
    emissiveMapUv: number;
    emissiveMapVertexColor: boolean;
    enableGGXSpecular: boolean;
    fresnelModel: number;
    glossMap: number;
    glossMapChannel: string;
    glossMapOffset: number[];
    glossMapTiling: number[];
    glossMapUv: number;
    glossMapVertexColor: boolean;
    heightMap: number;
    heightMapChannel: string;
    heightMapFactor: number;
    heightMapOffset: number[];
    heightMapTiling: number[];
    heightMapUv: number;
    lightMap: number;
    lightMapChannel: string;
    lightMapOffset: number[];
    lightMapTiling: number[];
    lightMapUv: number;
    lightMapVertexColor: boolean;
    metalness: number;
    metalnessMap: number;
    metalnessMapChannel: string;
    metalnessMapOffset: number[];
    metalnessMapTiling: number[];
    metalnessMapUv: number;
    metalnessMapVertexColor: boolean;
    normalMap: number;
    normalMapOffset: number[];
    normalMapTiling: number[];
    normalMapUv: number;
    occludeSpecular: number;
    opacity: number;
    opacityFadesSpecular: boolean;
    opacityMap: number;
    opacityMapChannel: string;
    opacityMapOffset: number[];
    opacityMapTiling: number[];
    opacityMapUv: number;
    opacityMapVertexColor: boolean;
    reflectivity: number;
    refraction: number;
    refractionIndex: number;
    shininess: number;
    specular: number[];
    specularAntialias: boolean;
    specularMap: number;
    specularMapChannel: string;
    specularMapOffset: number[];
    specularMapTiling: number[];
    specularMapTint: boolean;
    specularMapUv: number;
    specularMapVertexColor: boolean;
    sphereMap: number;
    useFog: boolean;
    useGammaTonemap: boolean;
    useLighting: boolean;
    useMetalness: boolean;
    useSkybox: boolean;
}

Represents the data for a Material asset.

Type declaration

  • alphaFade: number

    Used to fade out materials that do not use opacity to fade specular (opacityFadesSpecular is false).

  • alphaTest: number

    The alpha test reference value to control which fragments are written to the currently active render target based on alpha value. All fragments with an alpha value of less than the alphaTest reference value will be discarded.

  • alphaToCoverage: boolean

    Enables or disables alpha to coverage. When enabled, and if hardware anti-aliasing is on, limited order-independent transparency can be achieved. Quality depends on the number of MSAA samples of the current render target.

  • ambient: number[]

    An array of 3 numbers controlling the tint color to multiply the scene's global ambient color.

  • ambientTint: boolean

    Enable this to multiply the scene's global ambient color with a material specific color.

  • anisotropy: number

    Defines the amount of specular anisotropy when GGX Specular is enabled.

  • aoMap: number

    The id of an ambient occlusion texture asset containing pre-baked ambient occlusion.

  • aoMapChannel: string

    An ambient occlusion map color channel to extract color value from texture. Can be: r, g, b, a.

  • aoMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the AO map. Each component is between 0 and 1.

  • aoMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the AO map.

  • aoMapUv: number

    AO map UV channel.

  • aoMapVertexColor: boolean

    Use vertex colors for AO instead of a map.

  • blendType: number

    Controls blending. Can be various types like pc.BLEND_SUBTRACTIVE, pc.BLEND_ADDITIVE, etc.

  • bumpMapFactor: number

    The strength of the applied normal map. This is a value between 0 (the normal map has no effect) and 2 (the effect of the normal map is exaggerated).

  • clearCoat: number

    Defines the intensity of the clear coat layer from 0 to 1.

  • clearCoatBumpiness: number

    The strength of the applied normal map for the clear coat layer, value between 0 and 2.

  • clearCoatGlossiness: number

    A value determining the smoothness of the clear coat surface.

  • clearCoatGlossMap: number

    The asset id of the clear coat gloss map that specifies a per-pixel intensity value. The clear coat gloss map is modulated by the clearCoat property.

  • clearCoatGlossMapChannel: string

    A clear coat gloss map color channel to extract color value from texture. Can be: r, g, b, a.

  • clearCoatGlossMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the clear coat gloss map. Each component is between 0 and 1.

  • clearCoatGlossMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the clear coat gloss map.

  • clearCoatGlossMapUv: number

    Clear coat gloss map UV channel.

  • clearCoatGlossVertexColor: boolean

    Use vertex colors for clear coat glossiness instead of a map.

  • clearCoatGlossVertexColorChannel: string

    A color channel to extract color value from vertex colors for clear coat glossiness. Can be: r, g, b, a.

  • clearCoatMap: number

    The clear coat map that specifies a per-pixel intensity value. The clear coat map is modulated by the Clear Coat Factor property.

  • clearCoatMapChannel: string

    A clearCoat map color channel to extract color value from texture. Can be: r, g, b, a.

  • clearCoatMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the clearCoatMap. Each component is between 0 and 1.

  • clearCoatMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the clearCoatMap.

  • clearCoatMapUv: number

    ClearCoat map UV channel.

  • clearCoatNormalMap: number

    The asset id of the normal map that specifies the per-pixel surface normals for the clear coat layer. The normal map is modulated by the 'Bumpiness' property.

  • clearCoatNormalMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the clear coat normal map. Each component is between 0 and 1.

  • clearCoatNormalMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the clear coat normal map.

  • clearCoatNormalMapUv: number

    Clear coat normal map UV channel.

  • clearCoatVertexColor: boolean

    Use vertex colors for clear coat intensity instead of a map.

  • clearCoatVertexColorChannel: string

    A color channel to extract color value from vertex colors for clear coat intensity. Can be: r, g, b, a.

  • conserveEnergy: boolean

    Defines how diffuse and specular components are combined when Fresnel is on. It is recommended to leave this option enabled.

  • cubeMap: number

    The asset id of a cube map asset that approximates environment reflection. If the scene has a SkyBox set, then it will be used as the default cubeMap.

  • cubeMapProjection: number

    The type of projection applied to the cubeMap property, with options: pc.CUBEPROJ_NONE and pc.CUBEPROJ_BOX. Set to Box to enable world-space axis-aligned projection of cubemap based on bounding box.

  • cubeMapProjectionBox: { center: number[]; halfExtents: number[] }

    The world space axis-aligned bounding box defining the box-projection used for the cubeMap property. Only used when cubeMapProjection is set to pc.CUBEPROJ_BOX.

    • center: number[]

      Array of 3 numbers controlling the center of the box for cubeMap projection.

    • halfExtents: number[]

      Array of 3 numbers controlling the half extents of the box for cubeMap projection.

  • cull: number

    Controls culling. Can be: pc.CULLFACE_NONE, pc.CULLFACE_BACK, pc.CULLFACE_FRONT, pc.CULLFACE_FRONTANDBACK.

  • depthTest: boolean

    If true, a per-pixel check is performed to determine if the pixel passes the engine's depth test when a mesh with the material is rendered.

  • depthWrite: boolean

    If true, depth information is written to the depth buffer when a mesh with the material is rendered.

  • diffuse: number[]

    An array of 3 numbers representing the diffuse color of the material if no diffuse map is set or tint is enabled.

  • diffuseMap: number

    The asset id of the diffuse map that specifies the per-pixel diffuse material color. If no diffuse map is set, the diffuse color is used instead.

  • diffuseMapChannel: string

    The diffuse map color channel to extract color value from texture. Can be: r, g, b, a, rgb.

  • diffuseMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the diffuseMap. Each component is between 0 and 1.

  • diffuseMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the diffuseMap.

  • diffuseMapTint: boolean

    Check this to modulate the material's diffuse map with a material specific diffuse color.

  • diffuseMapUv: number

    Diffuse map UV channel.

  • diffuseMapVertexColor: boolean

    Use vertex colors for diffuse instead of a map.

  • emissive: number[]

    An array of 3 numbers representing the emissive color of the material if no emissive map is set or tint is enabled.

  • emissiveIntensity: number

    A multiplier for emissive color that can achieve overbright effects for exceptionally bright emissive materials.

  • emissiveMap: number

    The asset id of the emissive map that specifies the per-pixel emissive color. If no emissive map is set, the emissive color is used instead.

  • emissiveMapChannel: string

    An emissive map color channel to extract color value from texture. Can be: r, g, b, a, rgb.

  • emissiveMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the emissiveMap. Each component is between 0 and 1.

  • emissiveMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the emissiveMap.

  • emissiveMapTint: boolean

    Check this to modulate the material's emissive map with a material specific emissive color.

  • emissiveMapUv: number

    Emissive map UV channel.

  • emissiveMapVertexColor: boolean

    Use vertex colors for emission instead of a map.

  • enableGGXSpecular: boolean

    Enables GGX specular response. Also enables anisotropy parameter to set material anisotropy.

  • fresnelModel: number

    A parameter for Fresnel. Can be: pc.FRESNEL_NONE, pc.FRESNEL_SCHLICK.

  • glossMap: number

    The asset id of the gloss map that specifies a per-pixel shininess value. The gloss map is modulated by the shininess property.

  • glossMapChannel: string

    A gloss map color channel to extract color value from texture. Can be: r, g, b, a.

  • glossMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the glossMap. Each component is between 0 and 1.

  • glossMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the glossMap.

  • glossMapUv: number

    Gloss map UV channel.

  • glossMapVertexColor: boolean

    Use vertex colors for glossiness instead of a map.

  • heightMap: number

    The asset id of the height map that specifies the per-pixel strength of the parallax effect. White is full height and black is zero height.

  • heightMapChannel: string

    A height map color channel to extract color value from texture. Can be: r, g, b, a.

  • heightMapFactor: number

    The strength of a parallax effect (a value between 0 and 2).

  • heightMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the heightMap. Each component is between 0 and 1.

  • heightMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the heightMap.

  • heightMapUv: number

    Height map UV channel.

  • lightMap: number

    The asset id of the lightmap texture that contains pre-baked diffuse lighting. The lightmap usually is applied to the second UV set.

  • lightMapChannel: string

    A light map color channel to extract color value from texture. Can be: r, g, b, a, rgb.

  • lightMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the lightmap. Each component is between 0 and 1.

  • lightMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the lightmap.

  • lightMapUv: number

    Lightmap UV channel.

  • lightMapVertexColor: boolean

    Use vertex lightmap instead of a texture-based one.

  • metalness: number

    Metalness factor multiplier.

  • metalnessMap: number

    The asset id of the map that specifies per-pixel metalness values. A value of 1 is metal and a value of 0 is non-metal.

  • metalnessMapChannel: string

    A metalness map color channel to extract color value from texture. Can be: r, g, b, a.

  • metalnessMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the metalness map. Each component is between 0 and 1.

  • metalnessMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the metalness map.

  • metalnessMapUv: number

    Metalness map UV channel.

  • metalnessMapVertexColor: boolean

    Use vertex colors for metalness instead of a map.

  • normalMap: number

    The asset id of the normal map that specifies the per-pixel surface normals. The normal map is modulated by the 'Bumpiness' property.

  • normalMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the normalMap. Each component is between 0 and 1.

  • normalMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the normalMap.

  • normalMapUv: number

    Normal map UV channel.

  • occludeSpecular: number

    If true, ambient color will occlude specular factor of a material.

  • opacity: number

    The opacity of the material. This is a value between 0 (completely transparent) and 1 (completely opaque).

  • opacityFadesSpecular: boolean

    Controls whether Specular is faded out by material Opacity which is sometimes not desired for shiny translucent materials such as glass.

  • opacityMap: number

    The asset id of the opacity map that specifies the per-pixel opacity. The opacity map is modulated by the opacity property.

  • opacityMapChannel: string

    An opacity map color channel to extract color value from texture. Can be: r, g, b, a.

  • opacityMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the opacityMap. Each component is between 0 and 1.

  • opacityMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the opacityMap.

  • opacityMapUv: number

    Opacity map UV channel.

  • opacityMapVertexColor: boolean

    Use vertex colors for opacity instead of a map.

  • reflectivity: number

    A factor to determine what portion of light is reflected from the material.

  • refraction: number

    A factor to determine what portion of light passes through the material.

  • refractionIndex: number

    Determines the amount of distortion of light passing through the material.

  • shininess: number

    A value determining the smoothness of a surface. For smaller shininess values, a surface is rougher and specular highlights will be broader. For larger shininess values, a surface is smoother and will exhibit more concentrated specular highlights.

  • specular: number[]

    An array of 3 numbers representing the specular color of the material if no specular map is set or tint is checked.

  • specularAntialias: boolean

    Enables Toksvig AA for mipmapped normal maps with specular.

  • specularMap: number

    The asset id of the specular map that specifies the per-pixel specular color. If no specular map is set, the specular color is used instead.

  • specularMapChannel: string

    A specular map color channel to extract color value from texture. Can be: r, g, b, a, rgb.

  • specularMapOffset: number[]

    Array of 2 numbers controlling the 2D offset of the specularMap. Each component is between 0 and 1.

  • specularMapTiling: number[]

    Array of 2 numbers controlling the 2D tiling of the specularMap.

  • specularMapTint: boolean

    Check this to modulate the material's specular map with a material specific specular color.

  • specularMapUv: number

    Specular map UV channel.

  • specularMapVertexColor: boolean

    Use vertex colors for specular instead of a map.

  • sphereMap: number

    The asset id of a sphere map texture asset that approximates environment reflection.

  • useFog: boolean

    Apply fogging (as configured in scene settings).

  • useGammaTonemap: boolean

    Apply gamma correction and tonemapping (as configured in scene settings).

  • useLighting: boolean

    Apply lighting.

  • useMetalness: boolean

    Toggle between specular and metalness workflow.

  • useSkybox: boolean

    Apply scene skybox as prefiltered environment map.