Skip to content

fix: carpets next to houses aren't black - VOBs take lightmap light only on light mapped ground - #554

Open
BoroBongo wants to merge 1 commit into
developfrom
fix/vob-world-light-outdoor
Open

BoroBongo wants to merge 1 commit into
developfrom
fix/vob-world-light-outdoor

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

Carpets and other VOBs lying on the street next to houses are no longer black. A VOB takes the lightmap's light (the "light of the floor below it", StationaryLightsService.ApplyWorldLight) only when it stands on light mapped ground: a light mapped cell right under its bottom (its 2 m cell or a neighbor, floor level or one below). Worlds lit mostly by lightmaps (mines) keep the old ring search.

Why

Abuyin's carpets in Khorinis (G2) were black, reported from a playtest. ApplyWorldLight took the nearest light mapped cells up to 8 m around a VOB, also above it. The carpets lie on the vertex lit street under a house's light mapped overhang, so they got the overhang's black lightmap: _VobLightTint = (0, 0, 0, 1). The engine uses the light of the VOB's ground polygon.

How to test manually

  • G2, Khorinis, the carpets at Abuyin's stall below the house on the market (save near the market, turn around): every carpet shows its pattern and colors, none is black.
  • G1/G2 caves, mines and houses with lightmaps: VOBs inside (tables, scaffolds) still take the dark light of their room, they don't turn bright.

Save/load

No new state.

Known gaps / follow-ups

  • A VOB on a light mapped floor whose nearest cells are an unused (black) part of the lightmap would still go dark; not seen so far.

…r black - only a VOB standing on light mapped ground takes the lightmap's light

ApplyWorldLight took the nearest light mapped cells up to 8 m around a VOB, also above it. Abuyin's carpets in Khorinis lie on the vertex lit street under a house's light mapped overhang: they got the overhang's black lightmap. Like the engine (the ground polygon's light), the VOB now needs light mapped cells right under its bottom; worlds lit mostly by lightmaps (mines) keep the old search.
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