---
contentHash: sha256:bf5082ef80dab1ffb11a93d28da8c0b80b009146bae1b49d0c554823c0dd71d3
documentId: guide:for-agents-example-primitives-materials
kind: guide
schemaVersion: 1
skenraVersion: 0.1.0-alpha.1
---
# Primitives and materials

<a id="overview"></a>

## Overview

A static composition: geometry primitives, scene-root materials referenced by #id from paint children, a ground plane, one directional light, and the canonical auto-fit camera. Materials are by-id resources — a mesh is invisible until a paint child binds one.

Staging rules the scene demonstrates: objects sit ON the ground (y = half the object's height — a bounce's LOW keyframe too), the ground plane is sized proportionally to the content (an oversized ground inflates scene bounds and degrades depth precision), and coincident surfaces are offset slightly (ground a touch below y = object base) so bases never z-fight.

Demonstrates: primitives, by-id materials, surface/edge paints, ground, light.

<a id="scene"></a>

## Scene

```sk
<sk-scene style="width: 100%; height: 420px;">
    <sk-camera-orbit-control fit-targets="auto" fit-margin="0.15"
        azimuth="30deg" elevation="24deg" orient-toward-pivot></sk-camera-orbit-control>
    <sk-perspective-camera focal-length="28"></sk-perspective-camera>
    <sk-directional-light intensity="1" p="70deg" h="30deg"></sk-directional-light>

    <sk-plain-material id="ground-mat" base-color="#3a3a3a"></sk-plain-material>
    <sk-plain-material id="warm-mat" base-color="#d8a24a"></sk-plain-material>
    <sk-plain-material id="cool-mat" base-color="#7fa8d8"></sk-plain-material>
    <sk-plain-material id="accent-mat" base-color="#c05a4e"></sk-plain-material>
    <sk-plain-material id="line-mat" base-color="#1c1c1c"></sk-plain-material>

    <sk-plane y="-1.2" width="12" height="12" orientation="+y" cull-mode="none">
        <sk-surface-paint material="#ground-mat"></sk-surface-paint>
    </sk-plane>

    <sk-sphere x="-2.2" radius="1.1">
        <sk-surface-paint material="#warm-mat"></sk-surface-paint>
    </sk-sphere>

    <sk-cube size="1.7">
        <sk-surface-paint material="#cool-mat"></sk-surface-paint>
        <sk-edge-paint material="#line-mat"></sk-edge-paint>
    </sk-cube>

    <sk-torus x="2.4" major-radius="0.9" minor-radius="0.35" p="90deg">
        <sk-surface-paint material="#accent-mat"></sk-surface-paint>
    </sk-torus>
</sk-scene>
```

---

Related records: [`element:sk-camera-orbit-control`](elements/sk-camera-orbit-control.md), [`element:sk-cube`](elements/sk-cube.md), [`element:sk-directional-light`](elements/sk-directional-light.md), [`element:sk-edge-paint`](elements/sk-edge-paint.md), [`element:sk-perspective-camera`](elements/sk-perspective-camera.md), [`element:sk-plain-material`](elements/sk-plain-material.md), [`element:sk-plane`](elements/sk-plane.md), [`element:sk-scene`](elements/sk-scene.md), [`element:sk-sphere`](elements/sk-sphere.md), [`element:sk-surface-paint`](elements/sk-surface-paint.md), [`element:sk-torus`](elements/sk-torus.md), [`guide:for-agents`](guides/for-agents.md)
