Skip to content

Scene view: light meshes the way the exporter does - #59

Merged
rixnobis merged 1 commit into
mainfrom
preview-match
Oct 7, 2026
Merged

rixnobis merged 1 commit into
mainfrom
preview-match

Conversation

@rixnobis

@rixnobis rixnobis commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Scene view meshes now use the vertex colours the exporter writes (exportVertexColors in splashpack.hh). The fixed ambient, default sun and linear falloff in ps1view.cpp are gone. Exports of courtyard, tests/light and tests/skin are byte-identical before and after.

Courtyard: added a Sun and a Fill directional light, a Player component on Player Start, removed the empty Main Camera. Without them the game frame was black past the torch, with the camera on the floor at the origin.

Not fixed here: courtyard UVs go up to 9 on the floor and 7 on the walls. The viewport repeats them, the exporter clamps them, so in game the floor is one flat colour. Splitting tiled faces in the exporter is the next PR.

The viewport had its own lighting (a fixed ambient, a default sun, linear
falloff) that the exporter never ships, so the Scene view looked lit while
the game drew everything the torch misses black. It now draws the colours
the exporter bakes. Export output is unchanged.

Courtyard relied on the invented light and on two empty objects: give it a
Sun and a Fill light, put a Player component on Player Start, and drop the
empty Main Camera.
@rixnobis
rixnobis merged commit 35f6b57 into main Oct 7, 2026
5 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