Model loading · interface

BlendSurface

A material's surface, channel by channel. Factors multiply the map where there is one.

Explained in Importing models.

interface BlendSurface
import type { BlendSurface } from '@driftengine/assets';

Properties

NameTypeDescription
namereadonlystring
baseColorreadonly[number, number, number]
baseColorMapreadonlyChannelSource | null
alphareadonlynumber
alphaMapreadonlyChannelSource | null
alphaModereadonly'OPAQUE' | 'BLEND' | 'MASK'
alphaCutoffreadonlynumber
vertexColorreadonlystring | nullThe colour attribute the base colour is multiplied by: a name, '' for the render one.
metallicreadonlynumber
metallicMapreadonlyChannelSource | null
roughnessreadonlynumber
roughnessMapreadonlyChannelSource | null
occlusionMapreadonlyChannelSource | null
normalMapreadonlyChannelSource | null
normalStrengthreadonlynumber
emissionreadonly[number, number, number]
emissionStrengthreadonlynumber
emissionMapreadonlyChannelSource | null
transmissionreadonlynumber
doubleSidedreadonlyboolean
uvMapreadonlystring | nullThe UV map the maps read, by name, or null for the render map.
uvTransformreadonlynumber[] | nullA 3x3 affine transform of that map, column-major, in Blender's UV space, or null.
extrasreadonlyRecord<string, unknown> | null
approximationsreadonlyreadonly string[]What glTF cannot say about this material by either route: a procedural texture, a Mix Shader, a math chain. Blender's exporter loses these too, so they are warnings and not a reason to ask it.