# Orthographic Reference-Plane Character Modeling, <=10k Topology & Finger-Rig Stress Testing in Unity 6

> Build game-ready <=10,000-triangle rigged characters by aligning front and side orthographic reference planes at shared landmarks (soles, eyes, shoulders), authoring clean face/joint edge loops with full 30-bone finger rigs, and stress-testing closed fists, bent elbows, and raised shoulders before Unity 6 URP import.

- **Canonical page:** https://gamecrew.ai/techniques/unity/ortho-refplane-character-rig
- **Techniques hub:** https://gamecrew.ai/techniques
- **Engine:** Unity 6
- **Category:** animation
- **Tags:** `character`, `modeling`, `orthographic`, `reference-planes`, `rigging`, `fingers`, `topology`, `deformation`, `silhouette`, `humanoid`, `animation`
- **Verification:** Compile-verified pattern
- **Revision:** 1 (2026-11-24)
- **Demo:** No demo

## When to Use (and When Not To)

Use this workflow whenever a game needs a hero character, companion, or stylized fighter whose silhouette, facial proportions, and hand poses must faithfully match concept artwork while staying strictly within real-time triangle and bone budgets:

- **Perpendicular orthographic reference planes:** Placing Front (`Y = 0`) and Side (`X = 0`) concept sheets intersecting through the character's center lets you match exact proportions and landmark heights (soles, knees, pelvis, shoulders, chin, eyes) instead of eyeballing from a single 3/4 view.
- **Strict `<= 10,000`-triangle budget:** Covers the complete character including hair, garments, and accessories so characters run smoothly on desktop, mobile, and browser targets with zero heavy decimation artifacts.
- **Articulated hand & finger rig (up to 78 bones, 30 in the fingers):** Three phalanges per finger plus opposable thumbs enable expressive fighting stances, weapon grips, and closed fists without fused mitten hands.
- **Automated extreme-pose deformation verification:** Testing **closed fists**, **bent elbows**, and **raised shoulders** catches shoulder collapse, palm clipping, and sleeve pinching before animation authoring begins.

Skip full 30-bone finger rigs for tiny background crowd NPCs seen only from 20+ m away — use a 25-bone mitten rig there to save skinning cost.

## Repeatable Orthographic Reference-to-Unity Pipeline

1. **Generate Aligned Front & Side Reference Sheets:** Create a clean orthographic Front + Side character turnaround (`make_concept_art`) on a neutral background with matching pose (A-pose, arms clear of torso, fingers relaxed and separated).
2. **Build Intersecting Orthographic Reference Planes (`ortho-setup`):** Run the studio's `ortho-setup` stage (`--front front.png --side side.png --height 1.75`) to construct perpendicular Front (`Y = 0`) and Side (`X = 0`) image planes intersecting at the origin, scaled to exact real-world height with soles resting strictly on the ground plane.
3. **Model, Clean Topology & UV-Unwrap (`<= 10,000` triangles):**
   - Match Front and Side silhouettes along the intersecting reference planes, checking continuously from a **three-quarter perspective angle** (especially face volume, hair silhouette, and hand/thumb thickness).
   - Keep concentric edge loops around eyes, mouth, and brow; place 3-loop deformation fans across shoulders, elbows, knees, wrists, and finger knuckles.
   - UV-unwrap cleanly with consistent texel density (highest on face/hands) so painted colors wrap around the form without stretching.
4. **Rig, Skin & Run Automated Ortho + Stress-Pose Verification (`ortho-verify`):**
   - Rig the full skeleton (spine, neck, head, clavicles, arms, legs, and all 30 finger phalanx bones).
   - Run `ortho-verify` (`--max-tris 10000 --height 1.75 --size 512`) to verify real-world height, `<= 10,000` triangle budget, bone & finger coverage, true orthographic Front/Side comparison views, lit 3/4 render (`ortho_sheet.png`), and extreme joint deformation poses (**closed fist**, **bent elbows**, **raised shoulders**) written to `ortho_report.json`.

5. **Import to Unity 6 URP & Run Live Joint-Stress Harness:** Configure Humanoid/Generic import, attach the stress-pose test harness below, and assert triangle budget, exact real-world height (`1.75 m` with soles at `Y = 0`), and `>= 30` articulated finger bones in EditMode tests.

## Landmark Alignment & Joint Stress Budget

| Check | Target | Failure Sign |
|---|---|---|
| Real-world height | Exact target (e.g. `1.75 m`, soles at `Y = 0`) | Floating boots or wrong scale relative to doors/props |
| Shared landmarks | Soles, knees, pelvis, shoulders, eyes match across Front & Side planes | Elongated neck or shifted hip pivot between views |
| Total triangle count | `<= 10,000` triangles (hair + clothes + accessories included) | Unbudgeted hair strands or dense shoe soles blowing skinning cost |
| Finger rig hierarchy | 30 finger bones (5 digits × 3 phalanges × 2 hands) | Fused mitten hands or missing thumb opposition |
| Closed fist test | Proximal/middle/distal phalanges curled ~75–85°, thumb opposed | Fingertips stabbing through palm mesh |
| Bent elbow test | Forearm flexed ~125° | Candy-wrapper twist or bicep/forearm self-clipping |
| Raised shoulder test | Clavicle +25°, upper arm elevated ~145° | Collapsed deltoid crease or armpit clipping into ribcage |

## Engine Implementation

### 1. Articulated <=10k Character Rig, Intersecting Ortho Planes & Deformation Stress Harness (`Assets/Game/Runtime/Animation/OrthoRefCharacterRig.cs`)

```csharp
using System.Collections.Generic;
using UnityEngine;

namespace Game.Animation
{
    public enum CharacterStressPose
    {
        NeutralAPose,
        ClosedFist,
        BentElbows,
        RaisedShoulders,
        FightingStance
    }

    /// <summary>
    /// Procedural <=10,000-triangle articulated humanoid rig with 30 finger phalanx joints,
    /// intersecting Front/Side orthographic reference planes with landmark guides, and an
    /// interactive deformation stress-test harness (closed fist, bent elbows, raised shoulders).
    /// </summary>
    public sealed class OrthoRefCharacterRig : MonoBehaviour
    {
        public const float TargetHeight = 1.75f;
        public const int MaxTriangleBudget = 10000;

        public CharacterStressPose activePose = CharacterStressPose.FightingStance;
        public bool autoCyclePoses = true;
        public float cycleIntervalSeconds = 2.6f;

        public Transform hips;
        public Transform chest;
        public Transform head;
        public Transform leftClavicle, rightClavicle;
        public Transform leftUpperArm, rightUpperArm;
        public Transform leftForearm, rightForearm;
        public Transform leftHand, rightHand;
        public Transform leftThigh, rightThigh;
        public Transform leftShin, rightShin;
        public readonly List<Transform> fingerBones = new List<Transform>(30);
        public GameObject orthoReferenceRoot;

        private float _timer;
        private int _cachedTriangles;

        public int TotalTriangles => _cachedTriangles > 0 ? _cachedTriangles : CountHierarchyTriangles(transform);
        public int FingerBoneCount => fingerBones.Count;

        public static int CountHierarchyTriangles(Transform root)
        {
            int total = 0;
            foreach (var mf in root.GetComponentsInChildren<MeshFilter>(true))
            {
                if (mf.sharedMesh == null) continue;
                if (mf.gameObject.name.StartsWith("OrthoPlane")) continue;
                total += mf.sharedMesh.triangles.Length / 3;
            }
            return total;
        }

        public void BuildRig(Material bodyMat, Material accentMat, Material jointMat, Material frontPlaneMat, Material sidePlaneMat)
        {
            fingerBones.Clear();

            // Root pelvis & torso aligned to 1.75 m human proportions (soles strictly at Y = 0)
            hips = CreateJoint("Hips", transform, new Vector3(0f, 0.94f, 0f));
            AddPart(hips, "PelvisMesh", PrimitiveType.Cube, new Vector3(0f, 0.02f, 0f), new Vector3(0.30f, 0.16f, 0.20f), accentMat);

            var spine = CreateJoint("Spine", hips, new Vector3(0f, 0.12f, 0f));
            AddPart(spine, "AbdomenMesh", PrimitiveType.Cylinder, new Vector3(0f, 0.10f, 0f), new Vector3(0.24f, 0.12f, 0.18f), bodyMat);

            chest = CreateJoint("Chest", spine, new Vector3(0f, 0.22f, 0f));
            AddPart(chest, "TorsoMesh", PrimitiveType.Cube, new Vector3(0f, 0.11f, 0f), new Vector3(0.34f, 0.24f, 0.22f), bodyMat);

            var neck = CreateJoint("Neck", chest, new Vector3(0f, 0.25f, 0f));
            AddPart(neck, "NeckMesh", PrimitiveType.Cylinder, new Vector3(0f, 0.045f, 0f), new Vector3(0.10f, 0.055f, 0.10f), accentMat);

            head = CreateJoint("Head", neck, new Vector3(0f, 0.09f, 0f));
            AddPart(head, "CraniumMesh", PrimitiveType.Sphere, new Vector3(0f, 0.105f, 0f), new Vector3(0.19f, 0.22f, 0.21f), accentMat);
            AddPart(head, "VisorEyes", PrimitiveType.Cube, new Vector3(0f, 0.11f, 0.095f), new Vector3(0.12f, 0.032f, 0.04f), jointMat);

            // Legs pinned so boot soles rest precisely at Y = 0.00 m
            BuildLeg(-1f, hips, bodyMat, accentMat, jointMat, out leftThigh, out leftShin);
            BuildLeg( 1f, hips, bodyMat, accentMat, jointMat, out rightThigh, out rightShin);

            // Arms + 30 articulated finger bones (5 digits x 3 phalanges x 2 hands)
            BuildArm(-1f, chest, bodyMat, accentMat, jointMat, out leftClavicle, out leftUpperArm, out leftForearm, out leftHand);
            BuildArm( 1f, chest, bodyMat, accentMat, jointMat, out rightClavicle, out rightUpperArm, out rightForearm, out rightHand);

            // Intersecting perpendicular Front (Y=0 in Z-normal) & Side (X=0) orthographic reference planes
            orthoReferenceRoot = new GameObject("OrthoPlanes_LandmarkGuides");
            orthoReferenceRoot.transform.SetParent(transform, false);
            BuildOrthoPlane("OrthoPlane_Front", orthoReferenceRoot.transform, new Vector3(0f, TargetHeight * 0.5f, 0f), Quaternion.identity, new Vector3(1.55f, TargetHeight, 1f), frontPlaneMat);
            BuildOrthoPlane("OrthoPlane_Side",  orthoReferenceRoot.transform, new Vector3(0f, TargetHeight * 0.5f, 0f), Quaternion.Euler(0f, 90f, 0f), new Vector3(1.55f, TargetHeight, 1f), sidePlaneMat);

            _cachedTriangles = CountHierarchyTriangles(transform);
            ApplyPose(activePose);
        }

        public void ApplyPose(CharacterStressPose pose)
        {
            activePose = pose;
            if (hips == null || leftUpperArm == null || rightUpperArm == null) return;

            // Reset to clean A-pose baseline
            hips.localPosition = new Vector3(0f, 0.94f, 0f);
            hips.localRotation = Quaternion.identity;
            chest.localRotation = Quaternion.identity;
            head.localRotation = Quaternion.identity;
            leftClavicle.localRotation = Quaternion.identity;
            rightClavicle.localRotation = Quaternion.identity;
            leftUpperArm.localRotation = Quaternion.Euler(0f, 0f, 40f);
            rightUpperArm.localRotation = Quaternion.Euler(0f, 0f, -40f);
            leftForearm.localRotation = Quaternion.identity;
            rightForearm.localRotation = Quaternion.identity;
            leftThigh.localRotation = Quaternion.identity;
            rightThigh.localRotation = Quaternion.identity;
            leftShin.localRotation = Quaternion.identity;
            rightShin.localRotation = Quaternion.identity;
            SetFingerCurl(0.10f);

            switch (pose)
            {
                case CharacterStressPose.ClosedFist:
                    leftUpperArm.localRotation = Quaternion.Euler(-35f, 12f, 22f);
                    rightUpperArm.localRotation = Quaternion.Euler(-35f, -12f, -22f);
                    leftForearm.localRotation = Quaternion.Euler(-55f, 0f, 0f);
                    rightForearm.localRotation = Quaternion.Euler(-55f, 0f, 0f);
                    SetFingerCurl(1.0f);
                    break;

                case CharacterStressPose.BentElbows:
                    leftUpperArm.localRotation = Quaternion.Euler(-15f, 0f, 12f);
                    rightUpperArm.localRotation = Quaternion.Euler(-15f, 0f, -12f);
                    leftForearm.localRotation = Quaternion.Euler(-122f, 0f, 0f);
                    rightForearm.localRotation = Quaternion.Euler(-122f, 0f, 0f);
                    SetFingerCurl(0.65f);
                    break;

                case CharacterStressPose.RaisedShoulders:
                    leftClavicle.localRotation = Quaternion.Euler(0f, 0f, -24f);
                    rightClavicle.localRotation = Quaternion.Euler(0f, 0f, 24f);
                    leftUpperArm.localRotation = Quaternion.Euler(0f, 0f, -125f);
                    rightUpperArm.localRotation = Quaternion.Euler(0f, 0f, 125f);
                    leftForearm.localRotation = Quaternion.Euler(-22f, 0f, 0f);
                    rightForearm.localRotation = Quaternion.Euler(-22f, 0f, 0f);
                    SetFingerCurl(0.25f);
                    break;

                case CharacterStressPose.FightingStance:
                    hips.localPosition = new Vector3(0f, 0.89f, 0f);
                    hips.localRotation = Quaternion.Euler(4f, -22f, 0f);
                    chest.localRotation = Quaternion.Euler(6f, 14f, 0f);
                    head.localRotation = Quaternion.Euler(-4f, 10f, 0f);
                    leftUpperArm.localRotation = Quaternion.Euler(-58f, 18f, 18f);
                    leftForearm.localRotation = Quaternion.Euler(-78f, 0f, 0f);
                    rightUpperArm.localRotation = Quaternion.Euler(-48f, -14f, -24f);
                    rightForearm.localRotation = Quaternion.Euler(-96f, 0f, 0f);
                    leftThigh.localRotation = Quaternion.Euler(-18f, 0f, 4f);
                    leftShin.localRotation = Quaternion.Euler(24f, 0f, 0f);
                    rightThigh.localRotation = Quaternion.Euler(14f, 0f, -4f);
                    rightShin.localRotation = Quaternion.Euler(18f, 0f, 0f);
                    SetFingerCurl(0.95f);
                    break;
            }
        }

        private void SetFingerCurl(float curl01)
        {
            float c = Mathf.Clamp01(curl01);
            for (int i = 0; i < fingerBones.Count; i++)
            {
                var bone = fingerBones[i];
                if (bone == null) continue;
                bool isThumb = bone.name.Contains("Thumb");
                float sign = bone.name.StartsWith("L_") ? 1f : -1f;
                if (isThumb)
                    bone.localRotation = Quaternion.Euler(c * 24f, sign * c * 32f, -sign * c * 28f);
                else
                    bone.localRotation = Quaternion.Euler(0f, 0f, -sign * c * 74f);
            }
        }

        private void Update()
        {
            if (!autoCyclePoses) return;
            _timer += Time.deltaTime;
            if (_timer >= cycleIntervalSeconds)
            {
                _timer = 0f;
                int next = ((int)activePose + 1) % 5;
                ApplyPose((CharacterStressPose)next);
            }
        }

        private void BuildLeg(float side, Transform parent, Material bodyMat, Material accentMat, Material jointMat,
            out Transform thigh, out Transform shin)
        {
            string pfx = side < 0f ? "L_" : "R_";
            thigh = CreateJoint(pfx + "Thigh", parent, new Vector3(side * 0.11f, -0.04f, 0f));
            AddPart(thigh, pfx + "ThighMesh", PrimitiveType.Cylinder, new Vector3(0f, -0.22f, 0f), new Vector3(0.13f, 0.22f, 0.13f), bodyMat);

            shin = CreateJoint(pfx + "Shin", thigh, new Vector3(0f, -0.44f, 0f));
            AddPart(shin, pfx + "KneeJoint", PrimitiveType.Sphere, Vector3.zero, Vector3.one * 0.11f, jointMat);
            AddPart(shin, pfx + "ShinMesh", PrimitiveType.Cylinder, new Vector3(0f, -0.20f, 0f), new Vector3(0.105f, 0.20f, 0.105f), bodyMat);

            var foot = CreateJoint(pfx + "Foot", shin, new Vector3(0f, -0.40f, 0f));
            // Boot bottom sits strictly at local y = -0.06 => world Y = 0.94 - 0.04 - 0.44 - 0.40 - 0.06 = 0.00 m
            AddPart(foot, pfx + "BootMesh", PrimitiveType.Cube, new Vector3(0f, -0.03f, 0.055f), new Vector3(0.10f, 0.06f, 0.22f), accentMat);
        }

        private void BuildArm(float side, Transform parent, Material bodyMat, Material accentMat, Material jointMat,
            out Transform clavicle, out Transform upperArm, out Transform forearm, out Transform hand)
        {
            string pfx = side < 0f ? "L_" : "R_";
            clavicle = CreateJoint(pfx + "Clavicle", parent, new Vector3(side * 0.09f, 0.21f, 0f));
            upperArm = CreateJoint(pfx + "UpperArm", clavicle, new Vector3(side * 0.11f, -0.02f, 0f));
            AddPart(upperArm, pfx + "ShoulderBall", PrimitiveType.Sphere, Vector3.zero, Vector3.one * 0.115f, jointMat);
            AddPart(upperArm, pfx + "UpperArmMesh", PrimitiveType.Cylinder, new Vector3(0f, -0.145f, 0f), new Vector3(0.095f, 0.145f, 0.095f), bodyMat);

            forearm = CreateJoint(pfx + "Forearm", upperArm, new Vector3(0f, -0.29f, 0f));
            AddPart(forearm, pfx + "ElbowBall", PrimitiveType.Sphere, Vector3.zero, Vector3.one * 0.088f, jointMat);
            AddPart(forearm, pfx + "ForearmMesh", PrimitiveType.Cylinder, new Vector3(0f, -0.135f, 0f), new Vector3(0.08f, 0.135f, 0.08f), accentMat);

            hand = CreateJoint(pfx + "Hand", forearm, new Vector3(0f, -0.27f, 0f));
            AddPart(hand, pfx + "PalmMesh", PrimitiveType.Cube, new Vector3(0f, -0.045f, 0f), new Vector3(0.032f, 0.085f, 0.082f), accentMat);

            string[] digits = { "Thumb", "Index", "Middle", "Ring", "Pinky" };
            float[] zOffsets = { 0.042f, 0.030f, 0.010f, -0.012f, -0.032f };
            float[] lengths  = { 0.024f, 0.028f, 0.031f, 0.028f, 0.022f };

            for (int d = 0; d < digits.Length; d++)
            {
                Transform prev = hand;
                Vector3 basePos = d == 0
                    ? new Vector3(0f, -0.035f, zOffsets[d])
                    : new Vector3(0f, -0.088f, zOffsets[d]);
                for (int ph = 1; ph <= 3; ph++)
                {
                    var bone = CreateJoint($"{pfx}{digits[d]}_{ph}", prev, ph == 1 ? basePos : new Vector3(0f, -lengths[d], 0f));
                    float segLen = lengths[d] * (ph == 3 ? 0.78f : 0.95f);
                    AddPart(bone, $"{pfx}{digits[d]}_{ph}_Mesh", PrimitiveType.Cube, new Vector3(0f, -segLen * 0.5f, 0f), new Vector3(0.015f, segLen, 0.015f), jointMat);
                    fingerBones.Add(bone);
                    prev = bone;
                }
            }
        }

        private static Transform CreateJoint(string name, Transform parent, Vector3 localPos)
        {
            var go = new GameObject(name);
            go.transform.SetParent(parent, false);
            go.transform.localPosition = localPos;
            return go.transform;
        }

        private static void AddPart(Transform parent, string name, PrimitiveType type, Vector3 localPos, Vector3 localScale, Material mat)
        {
            var go = GameObject.CreatePrimitive(type);
            go.name = name;
            Object.DestroyImmediate(go.GetComponent<Collider>());
            go.transform.SetParent(parent, false);
            go.transform.localPosition = localPos;
            go.transform.localScale = localScale;
            go.GetComponent<MeshRenderer>().sharedMaterial = mat;
        }

        private static void BuildOrthoPlane(string name, Transform parent, Vector3 pos, Quaternion rot, Vector3 scale, Material mat)
        {
            var go = GameObject.CreatePrimitive(PrimitiveType.Quad);
            go.name = name;
            Object.DestroyImmediate(go.GetComponent<Collider>());
            go.transform.SetParent(parent, false);
            go.transform.localPosition = pos;
            go.transform.localRotation = rot;
            go.transform.localScale = scale;
            var mr = go.GetComponent<MeshRenderer>();
            mr.sharedMaterial = mat;
            mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
        }
    }
}
```

## Performance & Platform Traps

- **Align Landmarks Before Blocking Volume:** If the Front reference's eyes or knees sit 3 cm higher than the Side reference's, modeling across both planes produces a skewed skull and crooked knee joints. Pin soles to `Z = 0` and match eye/pelvis/shoulder guide lines first.
- **Check Three-Quarter Views Continuously:** Tracing Front and Side silhouettes alone produces a diamond-shaped face and slab-like hands. Orbit to 3/4 view after every major loop cut.
- **Never Skip Joint Stress Tests:** A character that looks spotless in A-pose frequently collapses at the deltoid when arms raise 145° or clips fingertips through the palm in a closed fist. Automate all three stress poses before UV baking.
- **Watch Accessory & Hair Triangle Creep:** Strands of hair, belt buckles, and shoelaces silently double polygon counts. Enforce the `<= 10,000`-triangle ceiling across the *combined* exported hierarchy.

## Verification Checklist

1. Confirm combined character triangle count (body + hair + accessories, excluding reference planes) is `<= 10,000` triangles.
2. Verify real-world character height matches target (`1.75 m ± 0.05 m`) with boot soles resting cleanly on `Y = 0`.
3. Assert all 30 finger phalanx joints (`5 digits × 3 phalanges × 2 hands`) exist in the rig hierarchy and respond to flex drivers.
4. Inspect **Orthographic Front**, **Orthographic Side**, and **Lit 3/4** captures alongside **Closed Fist**, **Bent Elbows**, and **Raised Shoulders** poses for silhouette match and clean deformation.

## Official references

- 3D Armature & Weight Painting Standards
- Unity 6 Humanoid Avatar & SkinnedMeshRenderer Reference
- Game Character Topology & Joint Deformation Standards
