Skip to content

fix(fp): range traffic signals and signs by view distance - #128

Merged
KunalSiyag merged 1 commit into
mainfrom
droid/web-signal-ranges
Oct 28, 2026
Merged

KunalSiyag merged 1 commit into
mainfrom
droid/web-signal-ranges

Conversation

@KunalSiyag

Copy link
Copy Markdown
Owner

Why

The traffic-light and stop/yield GLB instances spawn ~790 GeometryInstance3D children (signal heads, bodies) with no visibility range, so on the day-10 census every junction in the city drew in street view regardless of distance: 790 of 2732 draws at the worst day-10 street crossing.

What

  • junctions.gd: _range_asset(inst) ranges every unranged GeometryInstance3D child of a junction asset at WS.VIS_PROP * vis_mult (self-fade, 0.5 margin), skipping pre-ranged nodes; applied to the traffic-light and stop/yield GLBs. vis_mult follows the quality preset.
  • traffic_feature.gd: wires junctions.vis_mult from the view.
  • tools/tests/fp_junction_range_test.gd: 6/6.
  • docs/api/scripts.fp.traffic.md regenerated.

Verified

  • Headless census A/B on the day-10 save (desktop preset, hero pose): FpMode in-range draws 955 -> 94, shadow casters 900 -> 39. Desktop ranges unchanged in absolute terms (vis_mult 1.0 keeps prior kit behaviour; the GLB parts were unranged before).
  • Pre-PR battery: gate quick + full, pytest, run_all, pre-commit — all green.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

The traffic-light and stop/yield GLB instances spawn ~790 GeometryInstance3D
children (signal heads, bodies) with no visibility range, so every junction
in the day-10 city draws in street view regardless of distance. Range them
at WS.VIS_PROP * vis_mult with self-fade, like the kit parts around them.
Desktop census A/B (day-10 save, hero pose): FpMode in-range draws 955 -> 94,
shadow casters 900 -> 39.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Automated review

No new findings on the 5 changed files (gdlint, complexity, TODO policy, dead code).

Run python3 tools/checks/run_all.py locally for the full set of checks.

@KunalSiyag
KunalSiyag merged commit ec2be97 into main Oct 28, 2026
6 checks passed
KunalSiyag added a commit that referenced this pull request Oct 30, 2026
)

Each shadow caster is a shadow-pass draw, and a signal lens or sign face
casts nothing a walker reads. On the web tier (vis_mult < 1) _range_asset
now strips cast_shadow from the GLB children and the kit parts (_mi) no
longer cast; the kit range also scales by vis_mult there, closing the gap
fix #128 left between _mi (absolute VIS_PROP) and _range_asset (scaled).
Desktop and orbit are unchanged.

Sites needed nothing: their small parts already ask for shadow=false and
the static merge buckets the rest, so the caster set is identical across
tiers (verified by probe).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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