[Graphics] Switch to physical light units & Physical camera units

Aperta
#3,675 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start by reading the linked glTF light units specification and Filament lighting and camera exposure references. The issue does not identify Stride files, tests, or entry points, so first locate light and camera serialization, editor settings, and asset version migrations. Done means physical units and calibrated exposure are supported, existing assets migrate with equivalent behavior, and scripts, shaders, and conventions are documented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area-Asset area-GameStudio area-Graphics enhancement

Stride should support documented physical light units and calibrated camera exposure.
This can be achieved with automatic migration of existing assets, so equivalent behavior can be preserved.

This feature give artists a predictable relationship between lighting authored in DCC applications and lighting rendered in Stride.
Importers could convert documented quantities instead of relying on arbitrary intensity multipliers and manual adjustments.
For example, glTF already specifies candela for point and spot lights and lux for directional lights.
glTF specification

A defined lighting scale would also make it easier to validate Stride against offline reference renders from Mitsuba etc.
With matched geometry, materials, light distributions, and exposure, developers could compare direct lighting and material response quantitatively, then evaluate the errors introduced by real-time approximations.
This would help identify normalization bugs, prevent rendering regressions, and evaluate future lighting improvements.

The feature should document world scale, light normalization, color conventions, and exposure calibration. Existing scenes, prefabs, and compositor settings should receive versioned migrations, with clear guidance for scripts and custom shaders.

The suggested values below are examples for new content, not conversions of today’s Intensity = 1. Migration factors would be established through calibration.

Light/source Current Stride data Suggested physical data Example value Editor presentation
Directional / sun Unitless Intensity, default 1 Illuminance in lux 100,000 lx Illuminance [100000] lx
Point Unitless Intensity, default 1 Luminous intensity in candela; optional lumen input 100 cd Intensity [100] [cd ▾]
Spot Unitless Intensity, default 1 Luminous intensity in candela; lumen conversion accounts for cone profile 1,000 cd Intensity [1000] [cd ▾], followed by cone settings
Area light — future feature No standard built-in area light Luminous flux in lumens, or luminance in cd/m² 800 lm Output [800] [lm ▾], with dimensions
Emissive material Color/texture × relative intensity Luminance in cd/m², also called nits 200 cd/m² Emission luminance [200] cd/m²
Skybox / HDRI Environment texture × intensity Calibrated environment values plus a dimensionless gain Calibrated HDRI, gain 1× Environment, Calibration, Gain [1] ×
Ambient Color × intensity Keep as an artistic gain; use a calibrated uniform environment for physical ambient illumination Gain 1× Ambient gain [1] ×
Voxel GI Intensity plus bounce/specular scales Preserve the lighting scale through GI; retain dimensionless adjustment gains Gain 1× Indirect lighting gain [1] ×

Candela for point/spot lights and lux for directional lights would align with glTF’s existing definitions.

Camera exposure
Setting Current Stride Suggested data Editor presentation
Manual exposure Tone-map brightness adjustment in stops Calibrated EV100, or equivalent photographic settings Exposure input [EV100 / Camera settings]
Aperture No photographic exposure input on camera f-number, e.g. 16 Aperture [f/16]
Shutter speed No photographic exposure input on camera Seconds, e.g. 0.008 Shutter speed [1/125] s
Sensitivity No photographic exposure input on camera ISO, e.g. 100 ISO [100]
Exposure compensation Existing exposure adjustment provides related behavior Signed stops, e.g. +1 Compensation [+1.0] EV
Automatic exposure Image-luminance-based adaptation Calibrated metering with EV100 limits Metering, Min/Max EV100, Adaptation speed

EV100 and camera settings would be two ways to enter the same exposure, within one rendering system. Higher EV100 darkens a fixed scene; positive exposure compensation brightens it.

Interface and serialization
  • Always display units beside values.
  • Changing the unit dropdown converts the value while preserving light output.
  • Store a documented canonical quantity per light type.
  • Define 1 scene unit = 1 metre for physical lighting.
  • Keep range/culling distance separate from emitter size.
  • Upgrade old assets once through asset versions.
  • Document migration requirements for scripts, animated properties, and custom shaders.

Further read:
https://google.github.io/filament/main/filament.html#lighting
https://google.github.io/filament/main/filament.html#imagingpipeline/physicallybasedcamera

Lingua principale
C#
Stelle
8k
Fork
1.2k
Merge medio
2g 7h
PR unite (30g)
316

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stride3d/stride

Tutte le issue di stride3d/stride

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.