Documentation / Node reference / mat nodes

mat/MeshPhong

A lit mesh material with a specular highlight.

Mesh

Phong shading: a diffuse response plus a highlight you aim with two params, its colour and its tightness. It sits between mat/MeshLambert, which has no highlight at all, and mat/MeshPBR, which models metal, roughness and reflections properly. Use it for shiny surfaces that do not need to be physically accurate, such as plastic, varnish, or a deliberately stylised look.

Parameters

Name Type What it does
color Color The base colour the lights act on. This is the surface's own colour, before any highlight is added on top.
specular Color The colour of the highlight. White reads as a clear gloss over the base colour, which is what varnish or wet paint looks like. Tinting it toward the base colour instead reads as coloured plastic. Black removes the highlight and leaves plain diffuse shading.
shininess Float How tight the highlight is. Low values spread it into a broad soft sheen across the whole lit side, high values pull it into a small hard point, which is what a polished surface does. It only changes the highlight's size, never its brightness.
emissive Color A colour the surface gives off by itself, added after the lighting. It brightens this surface only and casts no light on anything else, so it is for something that should read as lit from within, such as a screen or a bulb. Black, the default, adds nothing.
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.
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.