Documentation / Node reference / mat nodes
mat/MeshLambert
A lit mesh material with a diffuse response and no highlight.
Mesh
Lambert shading: every fragment is lit in proportion to how directly it faces each light, and that is all. There is no specular highlight and no reflection, which makes it the cheapest of the lit materials and a good fit for matte surfaces such as paper, chalk or unpolished plastic. Reach for mat/MeshPhong when you want a highlight, and mat/MeshPBR when you want metal, roughness and reflections.
Parameters
| Name | Type | What it does |
|---|---|---|
| color | Color4 | The diffuse colour the lights act on. The alpha channel decides transparency while transparencyMode is AUTO: below 1 the material moves to the transparent pass. |
| transparencyMode | UInt8 AUTO · OPAQUE · MASK · BLEND | Whether this material is drawn in the opaque pass or through order-independent transparency. AUTO decides from the material itself, which for most materials means its colour alpha below 1. OPAQUE always draws in the opaque pass and ignores alpha entirely, which is what you want for a material whose alpha is incidental. MASK draws in the opaque pass but throws away fragments below alphaCutoff, which is what hard-edged cutouts want: they still write depth, so they occlude each other correctly. BLEND always goes through transparency, which is the only way to get soft texture alpha to show, since nothing on the CPU side can inspect the texels. |
| alphaCutoff | Float | In MASK mode, the alpha below which a fragment is thrown away entirely. It applies to the shadow the object casts as well as to the object, so a cutout leaf casts a leaf-shaped shadow rather than a rectangle. Only used when transparencyMode is MASK. |
| sides | UInt8 FRONT · BACK · BOTH | Which side of each triangle is drawn. FRONT draws the outward-facing side only, which is what a closed mesh wants: its inner surface is hidden anyway, so drawing it is wasted work. BACK draws the inward-facing side, for a surface seen from the inside such as a skydome or a box the camera sits in. BOTH draws either side, which is what an open single surface needs: a cutout leaf, a sheet of cloth, or a plane the camera can walk around, all of which disappear from one side under FRONT. The shadow pass follows BOTH so an open surface still casts a shadow whichever way it faces the light, and draws FRONT otherwise. |
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.