Skip to content

Scene view draws the render clip range, not the comfort budget — no AVC/safe-disparity bounds gizmo #315

Description

@dfattal

What the Scene view shows today

Both rigs draw the per-eye asymmetric frustum between the camera's render clip planes:

  • Runtime/DisplayXRCamera.cs:312-313 — nearDist = cam.nearClipPlane, farDist = cam.farClipPlane
  • Runtime/DisplayXRDisplay.cs:315-317 — same, under a comment that says it plainly:
// Near + far come straight from the camera. The frustum helper
// clamps far internally so we don't fill the whole scene at
// farClipPlane = 1000 m.

So the volume a developer sees in the Scene view is where geometry gets rasterised, and its far edge is an arbitrary aesthetic clamp inside DrawAsymmetricFrustum so a 1000 m far plane doesn't swallow the scene.

The gap

The number that actually governs whether a scene is usable on an eye-tracked 3D display is not the clip range — it's the accommodation–vergence comfort budget: how far in front of and behind the display plane content can sit before the disparity at the panel exceeds what a viewer can fuse.

Nothing in the plugin draws that. A developer authoring a scene has no way to see, in the editor, which of their content is inside the comfortable zone and which will read as a double image. They find out by building and looking — and if they don't have hardware on the desk, they don't find out at all.

This is the single most common authoring mistake on these displays and it is currently invisible until runtime.

Proposal

Draw the comfort bounds as a gizmo on both rigs, derived from the disparity budget rather than from Camera:

  • Near and far comfort planes computed from the max on-panel disparity the display tolerates, the viewer distance, and the rig's convergence setup — i.e. the same inputs the Kooima math already consumes in DisplayXRGizmoHelpers.
  • Rendered distinctly from the magenta render frustum (which should stay — the two answer different questions).
  • Ideally shaded so "outside the budget" is legible at a glance, in the spirit of the colourised safe-zone idea.
  • The physical inputs (viewer distance, panel geometry) are already available via ReadDisplayInfoFromNative() / TryGetKooimaCanvas(), so this needs no new native surface.

Prior art

The legacy Leia Unity plugin (LeiaInc/LeiaUnitySimpleSDK, LeiaInc/LeiaLoftUnityPackage) carried safe-disparity-zone concepts and a display-centric autofocus warning window. Worth mining for the disparity model before deriving one from scratch. Closely related to #316 (autofocus), which is what moves content into this budget.

Not in scope

Changing what the render frustum draws, or clamping the camera. This is a second, additive visualisation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions