Objects don't take the light of where they stand: too bright indoors and at night

Offen
#488 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp, unity

Rechercherichtung

Start by reading the C# side of EnableVobWorldLight in #479 and the Lit-World and Lit-SingleMesh lighting paths mentioned here; compare them with the referenced zCVob::CalcStaticLighting behavior. Check how objects obtain their ground polygon and baked light, including the no-floor case. Done means objects reflect their surroundings indoors and at night, and nearby baked lights affect the world as described.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug
Description
  • Objects ignore the light of their spot. Static objects (tables, beds, kettles) are drawn with Lit-World, but with a flat full base light (no baked light of their own) times the day colour. Items and NPCs use Lit-SingleMesh (sun + ambient). None of them gets the light of the floor they stand on. Indoors and at night they are much brighter than the world around them.
  • The world barely brightens near fires. Static lights are added per vertex, and Gothic's world polygons are large, so a fire in the middle of a room hardly reaches the polygon corners.
Expected Behavior (original engine)
  • Each zCVob has lightColorStat, lightColorDyn, lightDirectionStat and groundPoly. The engine computes the static light per object (zCVob::CalcLightSampleAtOrigin, zCPolygon::GetLightStatAtPos).
  • Enhanced-Gothic-Renderer does the same on top of the original engine (zCVob.h, CalcStaticLighting):
    • a ray down from the bounding box centre onto the ground polygon;
    • the baked light at the hit point (lightmap indoors, vertex light outdoors);
    • grey 160 when there is no floor.
  • Static zCVobLights only exist in the bake (vertex light and lightmaps).
Actual Behavior

See the description. Seen on Quest 3 in G1 and G2 (huts and Khorinis at night). It's the same on PC, since the shaders are the same.

Environment Information

  • Reproducibility: Always
  • Platform: all
  • Game Version: main 83a1aebd2
Notes
Vorherrschende Sprache
C#
Sterne
33
Forks
1
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
51

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Gothic-Unity-Project/Gothic-Unity

Alle Issues in Gothic-Unity-Project/Gothic-Unity

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.