Skip to content

Lights: Slice I — Power-user extras (light linking, IES profiles, area lights) #491

Description

@fernandotonon

Parent epic: #482
Depends on: Slice D, Slice F. Stretch — do not pick up until A–H land.

Goal

Cover the power-user lighting features that competitive 3D tools (Blender, Maya, Houdini) provide. Listed as a single stretch slice because each piece is small but the whole bundle is meaningful for advanced users.

Scope

  • Light linking / include-exclude lists: a light only affects (or only ignores) a named set of entities. Useful for character key lights that shouldn't bleed onto the environment.
    • Inspector UI: a small list with add/remove buttons per light.
    • Backend: Ogre supports MovableObject::setLightMask and Light::setLightMask; map our include/exclude semantics onto bitmask layouts (32 channels).
    • Document the 32-channel limit.
  • IES photometric profiles: .ies file picker per point/spot light. Bake the IES profile into a 1D texture sampled by the light's attenuation in the shader.
    • Use a small IES parser (single C++ file, public-domain implementations exist).
    • Visualize the IES profile shape as a 3D polar plot in the light's helper gizmo.
  • Area lights (rectangle / disk / line): represented in the viewport as visible primitives.
    • Behind a feature flag — Ogre 14.5 doesn't have first-class area lights. Approximate with multiple point lights sampled on the surface (slow but works) or with LTC (Linearly Transformed Cosines, modern technique) if the shader path is reachable.
    • If LTC is too risky, deliver only the gizmo + multi-point-light approximation in this slice.
  • Light groups / collections: select multiple lights, group them under a named scene node, transform/enable/disable as one unit. Useful alongside rigs.
  • Light layer visibility: per-viewport light toggle ("show with light X off") so users can audit individual light contributions. No baking — just runtime enable flipping.

Acceptance Criteria

  • Light linking works for at least one entity ↔ light pair and survives save/load.
  • IES profile loads, parses, applies, and visibly changes the light's distribution.
  • Area light gizmo renders correctly; multi-point approximation produces reasonable shading even if LTC isn't shipped.
  • Light groups can be created, named, transformed, and toggled.
  • Per-viewport solo-light view works.
  • Each sub-feature is independently merge-able as its own PR (don't ship Slice I as one monolithic change).

Effort

~3 weeks total if all four ship; each sub-feature is 4–7 days.

Open questions

  • Does Ogre 14.5's light mask plumbing reach all the way through RTSS PBR? If not, document the partial-coverage limitation up front.
  • Is the LTC area-light path realistic on our shader budget, or is multi-point-sample acceptable for v1?
  • Which IES parser is cleanest to vendor?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlightingScene lighting: add/edit/manage lights, shadows, IESquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions