← Back to Docs
  • index.html
  • Clayground
  • Clayground.Character3D
  • FaceBox
  • Clayground 2026.7
  • FaceBox QML Type

    A body-part box that draws a face into its own front surface. More...

    Import Statement: import Clayground.Character3D

    Properties

    Detailed Description

    Geometrically a Box3D and nothing more - the same Box3DGeometry, the same outline, the same toon lighting, so it sits in a character next to ordinary body parts without looking like a different material. What it adds is a panel: eyes and brows, or a mouth, rendered into the front face by the fragment shader.

    The face costs no draw calls and no vertices. That is the point of it: the thirteen small boxes it replaces were about two thirds of a head's draw calls while contributing nothing to its silhouette, and an eye built as a cube shows its own side wall as soon as the camera moves off axis.

    Every measurement it takes is in the box's own frame - x from the centre line, y up from the box's floor - which is the frame Head publishes its anchors in, so a face and the things worn on it cannot disagree about where the eyes are.

    See also Head and Box3D.

    Property Documentation

    browAngle : real

    Brow angle in degrees; positive lifts the outer end.


    browHalf : vector2d

    Half extents of one brow bar.


    browOffset : vector2d

    Brow displacement from its resting place above the eye.


    browSkew : real

    How far one brow rises while the other drops, as a length in the same units as browOffset. The only term on this face that tells the two sides apart - and the reason a raised eyebrow and a sneer are possible at all, since everything else here is mirrored.


    eyeCentre : vector2d

    Eye centres: x out from the centre line, y up from the box floor.


    eyeHalf : real

    Half an eye's width.


    eyeHood : real

    Upper lid, 0 open to 1 nearly shut. Down from above is a glare.


    eyeSquint : real

    Lower lid, 0 open to 1 nearly shut. Up from below is pleasure.


    faceDetail : int

    How much of it to draw. 0 keeps only what survives being small - the whites of the eyes, the lash line, the lip - and drops the irises, the highlights, the brows and the mouth corners. It is a shader branch rather than a change of geometry, so switching it mid-shot cannot pop.


    gaze : vector2d

    Where the irises look, -1..1 of their free travel inside the white.


    mouthCentre : vector2d

    Upper lip: x is always 0, y is up from the box floor.


    mouthCornerLift : real

    -1 frown, 0 neutral, 1 smile.


    mouthGap : real

    How far the cavity has opened downward.


    mouthHalf : vector2d

    Half the mouth's width, and half the lip line's thickness.


    mouthRound : real

    0 a slot, 1 a circle. The shape of a rounded vowel, not just a narrower one.


    mouthSkew : real

    A one-sided lip curl, -1 to 1: the mouth tilts and one corner climbs clear of the other. A sneer, which is a different thing from a frown and the thing disgust is made of.


    panel : int

    Which part of the face to draw. Defaults to none.