Objects don't take the light of where they stand: too bright indoors and at night
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- computer-graphics, game-dev
Research direction
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.
Written by the indexing model from the issue text.
Description
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 useLit-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
zCVobhaslightColorStat,lightColorDyn,lightDirectionStatandgroundPoly. 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
- Already in BoroBongo's work: in
experimental/game-completion-candidate-vibecoded-borobongo:- the world's lightmaps are rendered;
- static lights are per pixel in
Lit-World; - objects in light-mapped areas (caves, mines, houses) take the lightmap light around them (
EnableVobWorldLight,_VobLightTint).
- In #479 (split/16): only the C# side of
EnableVobWorldLight. Without the shader part it has no visible effect. - Not covered anywhere: outdoor objects at night.
- Quest cost: one light colour per object, taken once at build time (again when an object moves), is almost free. Per-pixel lights cost GPU time, and G2 Khorinis at 120 Hz is already GPU-bound.
- Related: #41 (lightmaps).
- Sources:
- Dominant language
- C#
- Stars
- 33
- Forks
- 1
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gothic-Unity-Project/Gothic-Unity
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Gothic-Unity-Project/Gothic-Unity#487 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 49/100
Gothic-Unity-Project/Gothic-Unity#489 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Gothic-Unity-Project/Gothic-Unity#486 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Gothic-Unity-Project/Gothic-Unity#485 ·
Maintainers usually reply within 1 day
-
XRIT - Items in slots get HVR's size (no more flying with a coin on the hip)Possibly taken @JaXt0r claimed this 8 days ago. Openbug
Gothic-Unity-Project/Gothic-Unity#446 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in Gothic-Unity-Project/Gothic-Unity
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
QuantConnect/Documentation#2838 ·
Maintainers usually reply within 1 day
-
"Create your app": .sln/.slnx step and Solution Explorer instructions don't match current C# Dev KitOpenarea-tutorials needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
dotnet/website-feedback#1844 ·
-
Needs: Attention :wave: v5 v5-preview5
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-functions-core-tools#5852 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
OrchardCMS/OrchardCore#20194 ·
Maintainers usually reply within 1 day
-
VB -> C#
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
icsharpcode/CodeConverter#1301 ·
Maintainers usually reply within 3 days