Skip to content

feat: light sets, light zones and a better light bake - #40

Merged
nickyyOO merged 2 commits into
OpenRAC:mainfrom
nickyyOO:feature/level-lighting
Nov 24, 2026
Merged

nickyyOO merged 2 commits into
OpenRAC:mainfrom
nickyyOO:feature/level-lighting

Conversation

@nickyyOO

Copy link
Copy Markdown
Collaborator

Before: a level had only its own light sets; the bake drew blocky light pools and sharp point-light shadows.
After: maps carry light sets and light zones (the hero is lit by where he stands), the bake has sky, bounce and soft point-light shadows (a light with a size).
Tested: terrain tools tests, OpenRAC Museum map in the game.

The level's light sets (gameplay +0x04) and the hero's light zones (+0x80)
are in the scene (Game/LightSets, Game/LightZones) and pack back.
bake-light gets one bounce of light (--bounce), a soft sun
(--sun-samples, --sun-soft) and each surface's own albedo.
A light with a size is a ball: its shadow is the mean over points across it,
so small things round a fire cast soft shadows, not sharp rays. Light on a
surface depends half on how it faces the light, so folds in the ground do
not draw sharp lines across a pool of light.
@nickyyOO
nickyyOO merged commit 34d72d1 into OpenRAC:main Nov 24, 2026
7 checks passed
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