ui: unified theme selector with seasonal scene packs (C3X + C4)#159
Closed
ghbarker wants to merge 2 commits into
Closed
ui: unified theme selector with seasonal scene packs (C3X + C4)#159ghbarker wants to merge 2 commits into
ghbarker wants to merge 2 commits into
Conversation
Adds a single Theme selector (Settings -> Visuals) to the C3X and comma
four UIs, driven by one BPThemePack param and one shared entry list, so
theming behaves identically on both devices. The selector carries Off,
the existing 8-Bit Racer theme (its separate toggle is absorbed), and
ten bundled seasonal packs covering New Year's through Christmas.
A pack is a directory of plain assets - no code:
colors/colors.json Path, PathEdge, LaneLines, LeadMarker,
RoadEdges, Accent, Background (all optional)
sounds/<name>.wav alert-sound overrides by filename
steering_wheel/wheel.png wheel icon override
Themed views render as full scenes: Background paints a sky gradient
whenever Minimal Driving View hides the camera, the path ribbon runs a
full-strength gradient, lane lines and road edges use the wider
minimal-view geometry with a stronger glow halo, the torque-bar fill
and set-speed value take the Accent color, and the vision-lead chevron
and info box follow LeadMarker.
The C3X page selects via a scrollable option dialog and the MICI page
via a cycling toggle - both built from the same entries, so any number
of packs stays inside the widget. Users can drop additional packs into
/data/bp_themes over SSH; malformed pieces degrade gracefully to stock
(bad wavs fall back to stock sounds, missing colors keep stock colors).
Bundled palettes are original; wheel icons are from OpenMoji
(CC BY-SA 4.0, credited in the README).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ghbarker
force-pushed
the
unified-theme-selector
branch
from
July 22, 2026 07:35
3f2aea1 to
55d3ec6
Compare
…ecture Builds on the theme selector: a SceneBase interface (background pass before the model render, foreground pass under alerts, replaces_road/replaces_hud capability flags) unifies every theme kind. Rad Racer participates through a capability adapter — its drawing is untouched, the ad-hoc dispatch checks are gone. Seasonal packs get data-driven scenes from a per-pack scene.json: particle layers (falling snow, rising hearts, tumbling leaves, fluttering bats, firework bursts), static decor (string lights, garlands, bunting, corner pieces) and a sky treatment — full strength in Minimal Driving View, subtle over the live camera, alerts always on top. Sprites are procedurally rendered signed-distance fields (no bundled images), tinted per particle at draw time. Budgets are hard-capped and validated; a pack without scene.json is colors-only, exactly as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ghbarker
force-pushed
the
unified-theme-selector
branch
from
July 22, 2026 07:40
55d3ec6 to
61886fb
Compare
ghbarker
added a commit
to ghbarker/openpilot
that referenced
this pull request
Jul 22, 2026
…garlands, leaves, bats, fireworks, bunting) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by a fresh PR with the v2 scene system and updated screenshots — same branch, clean two-commit history (original selector + scenes). New PR follows momentarily. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A single Theme selector (Settings → Visuals) on both the comma 3X and comma four UIs, driven by one
BPThemePackparam and one shared entry list — so theming is selected the same way on both devices. The selector carries:Theme packs are asset-only
New themes need zero code. Users can also drop packs into
/data/bp_themes/over SSH — discovered automatically, same-name user packs shadow bundled ones. Everything degrades gracefully: a malformed wav falls back to the stock sound, a missing color key keeps the stock color.Themed views render as full scenes
v2 — animated + static scene layers. Each pack may ship a
scene.jsonconsumed by oneshared scene engine (
theme_scene.py): particle layers (falling snow, rising hearts,tumbling leaves, fluttering bats, firework bursts), static decor (string lights with
catenary droop, berry garlands, flag bunting, a carved pumpkin) and a sky treatment —
full strength in Minimal Driving View, subtle over the live camera, alerts always on
top. Sprites are procedurally rendered signed-distance fields, so the PR contains no
new image assets: every snowflake, heart and bat below is generated from math at load
time and tinted per particle. The scene architecture is one modular interface
(
SceneBasewith background/foreground passes + capability flags); 8-Bit Racer nowrides the same dispatch through a capability adapter with its drawing untouched, and a
pack without
scene.jsonrenders exactly as before. Budgets are hard-capped andvalidated — a malformed user
scene.jsondegrades to colors-only. 24 new tests.Backgroundpaints a sky gradient behind the road whenever Minimal Driving View hides the cameraPathEdgenear →Pathfar)Accenttints the torque-bar fill (the high-torque yellow→orange warning blend is preserved) and the MICI set-speed valueLeadMarker(radar leads stay blue)UI details
Assets
Bundled palettes are original. Steering-wheel icons are from OpenMoji (CC BY-SA 4.0, credited in
selfdrive/assets/bp_themes/README.md). Total asset weight ~2.5 MB, stored as regular git blobs (exempted from LFS in.gitattributes, matching the existing BP asset pattern).Testing
sconsbuilds after theBPThemePackparams key additionScreenshots
Captured on the PC preview (replay of a real drive, Minimal Driving View). Theme switching is live — no restart between these. Everything you see beyond the road — the falling snow, string lights, garlands, leaves, bats, the pumpkin — is procedural: zero image assets in the diff.
Halloween
Christmas
8-Bit Racer (same selector)
comma four (MICI) layout
🤖 Generated with Claude Code