Skip to content

Lights: Slice D — Viewport gizmos + light icons + cone/range visualization #486

@fernandotonon

Description

@fernandotonon

Parent epic: #482
Depends on: Slice C

Goal

Lights are invisible by default in Ogre. Make them clickable, draggable, and visually meaningful in the viewport with type-specific gizmos that match what users expect from Blender/Unity/Unreal.

Scope

  • Always-on billboard icons at each light's position (different sprite per type: sun glyph for directional, bulb for point, cone for spot). Rendered as Ogre::BillboardSet per-light on a dedicated overlay layer so they sort correctly with the scene. Toggle: View → Show Light Icons (default ON).
  • Pickable: clicking an icon selects the light (route through the existing ray-pick path in TransformOperator).
  • Type-specific helper gizmos (drawn with ManualObject, like the existing translation gizmos):
    • Directional: an arrow showing direction with a sun-rays glyph around the origin.
    • Point: a sphere of radius = range (wireframe, low segment count).
    • Spot: a wireframe cone matching outer angle + range; an inner cone at inner angle.
  • Colour-tinted gizmos: the helper geometry uses the light's diffuse colour at 50% alpha so the user can read the light's tint at a glance.
  • Update on property change: gizmos update reactively when LightManager::lightChanged fires.
  • Selection highlight: the gizmo of the currently selected light(s) draws thicker / fully opaque.
  • Optional: View → Show Selected Light Gizmo Only to declutter scenes with many lights (default OFF).

Acceptance Criteria

  • Each light type shows the correct icon and helper gizmo.
  • Clicking an icon selects the light.
  • Helper gizmos update live as colour, range, and cone angles change.
  • Helper gizmos respect the global toggle and the "selected-only" toggle.
  • No ghost-text or Z-fighting with other overlays (MeshInfoOverlay, ViewCube, transform gizmos).
  • No regression in pick performance with 10 lights in the scene.
  • Sentry breadcrumb scene.light.gizmo_toggle on visibility changes.

Effort

~6 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlightingScene lighting: add/edit/manage lights, shadows, IESui

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions