Skip to content

Adjustable Light#581

Open
Rasmuslnd wants to merge 2 commits into
Kruithne:mainfrom
Rasmuslnd:feature/adjustable-light
Open

Adjustable Light#581
Rasmuslnd wants to merge 2 commits into
Kruithne:mainfrom
Rasmuslnd:feature/adjustable-light

Conversation

@Rasmuslnd

Copy link
Copy Markdown

Add adjustable viewer lighting
Adds user-controllable lighting to the model/creature preview:

  • "Adjustable light" mode with a draggable direction gizmo plus intensity
    and ambient sliders and a reset button, alongside Render Shadow and
    Use 3D Camera toggles, in the viewer settings panel.
  • Renderer support (model-viewer-gl, M2RendererGL) applies the configured
    azimuth/elevation/intensity/ambient to the model.
  • Persisted via new config keys (modelViewerCustomLight, modelViewerLight*,
    modelViewerShowShadow, modelViewerUse3DCamera)

Reworks the Creatures tab into a unified Models/Creatures browser:

- A browse-mode switch toggles the file list between models and creatures
  without leaving the tab; the last-used mode is remembered (lastBrowseMode).
- Creature preview gains equipment display (armor/weapons from NPC equipment
  data) with per-slot toggles, alongside geoset and skin controls.
- The texture ribbon for this tab floats bottom-center over the preview.
- Adds a viewer title, model/settings sidebar sub-tabs, and an
  auto-play-animation option (creatureAutoPlayAnim).

Scope note: viewer lighting / zone-lighting controls and the character
armory-info panel are deliberately excluded and will be submitted as their
own PRs, so this change is limited to the tab itself.
Adds user-controllable lighting to the model/creature preview:

- "Adjustable light" mode with a draggable direction gizmo plus intensity
  and ambient sliders and a reset button, alongside Render Shadow and
  Use 3D Camera toggles, in the viewer settings panel.
- Renderer support (model-viewer-gl, M2RendererGL) applies the configured
  azimuth/elevation/intensity/ambient to the model.
- Persisted via new config keys (modelViewerCustomLight, modelViewerLight*,
  modelViewerShowShadow, modelViewerUse3DCamera).

Also includes the rendering infrastructure for in-game zone lighting
(zone-lighting.js, built on the upstream FogDataProvider/LightData); the
renderer queries it for light uniforms. Its UI is currently gated off
(v-if="false") pending completion, so adjustable light is the only
user-facing mode in this change.

Stacked on the Models/Creatures tab branch (the light controls live in that
tab) - merge that PR first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant