render_set_shadow_catcher

Shadow catcher: an invisible ground plane at the lowest z of the scene (z up), about 3× the scene radius, fading out at its rim, that only darkens: the sun's shadow × opacity, plus ambient occlusion while that is on. Not pickable, cut by sections. Turning it on turns shadows on; off leaves them on. Shadows come from a world-fixed sun (the sky's sun in rendered, a high light in material-preview, which then also lights the model), fall on the scene and the catcher, and are drawn in rendered and material-preview at quality medium (1024² map) and high (2048²), never at low. opacity: 0..1 (default 0.5), absent keeps it. Returns { shadows, catcher: { enabled, opacity } }.

Command

Usage

TypeScript
surface.execute('render_set_shadow_catcher', { enabled, opacity? })

Parameters

  • enabledboolean

    Required

  • opacitynumber

    Optional

Returns

object with shadows, catcher, in the ok: true envelope.

JSON
{
  "type": "object",
  "properties": {
    "shadows": {
      "type": "boolean"
    },
    "catcher": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "opacity": {
          "type": "number"
        }
      },
      "required": [
        "enabled",
        "opacity"
      ]
    }
  },
  "required": [
    "shadows",
    "catcher"
  ]
}

See also