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

オープン
#488 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, unity

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
C#
スター
33
フォーク
1
平均マージ
1日 17時間
マージ済み PR(30日)
51

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Gothic-Unity-Project/Gothic-Unity のほかの issue

Gothic-Unity-Project/Gothic-Unity の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。