Skip to content

PointClouds 1.0#152

Open
SimonDanisch wants to merge 16 commits into
masterfrom
sd/pc-1.0
Open

PointClouds 1.0#152
SimonDanisch wants to merge 16 commits into
masterfrom
sd/pc-1.0

Conversation

@SimonDanisch
Copy link
Copy Markdown
Member

Weirdly enough, GLMakie crashes the AMD driver on linux/windows.
I have a ryzen 395+, which is pretty new, so could be AMDs drivers fault.
WGLMakie does work though.

Comment thread docs/Project.toml
Comment thread .gitignore Outdated
*.osm
london_drive.json
.qodo
!docs/Manifest.toml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, never 😄 !

Copy link
Copy Markdown
Collaborator

@lazarusA lazarusA Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test locally what's wrong with docs 😉

SimonDanisch and others added 3 commits September 26, 2025 17:49
Comment out the cache action in the workflow.
@asinghvi17
Copy link
Copy Markdown
Member

Ok, I figured out the issue here. It turns out that you can't run resolve before instantiate on CI. I solved that in #154 and will merge that shortly

@asinghvi17
Copy link
Copy Markdown
Member

Looks like the image on CI is completely whited out, somehow?

https://makieorg.github.io/Tyler.jl/previews/PR152/examples/map-3d#PointClouds

@SimonDanisch
Copy link
Copy Markdown
Member Author

Yeah looking into a fix right now!

@asinghvi17
Copy link
Copy Markdown
Member

Looks like the image now has a bit of color :D
https://makieorg.github.io/Tyler.jl/previews/PR152/examples/map-3d#PointClouds

@SimonDanisch
Copy link
Copy Markdown
Member Author

haha, what? :D

The docs build currently fails because the registry GLMakie crashes the
GPU with a hard context loss when rendering point clouds via
`markerspace = :data` (FastPixel branch). The fix lives on the
`sd/fastpixel-shader-fix` branch of MakieOrg/Makie.jl. Pin Makie and the
two backends used in the docs to that branch so CI picks it up; this can
be reverted once the fix lands on master and is tagged.
Pkg validates that every [sources] entry has a corresponding [deps]
entry; without it `Pkg.instantiate` errors with
"Sources for `Makie` not listed in `deps` or `extras` section".
Makie was previously pulled in only transitively via CairoMakie/GLMakie.
Commit 20a0c69 ("trying to make loading more stable") removed the
`wait(m.tiles; timeout=timeout)` call from `Base.wait(::AbstractMap)`
together with `wait(map)` inside `Base.display`. The display change is
intentional (inserting plots while the screen is still initializing
crashes some AMD drivers); the wait change was incidental, and broke
the existing "Tiles counts" tests which assert that the tile queue is
empty and that the full set of prefetched tiles has been fetched once
`wait(m)` returns.

Restore the cache drain, but place it *after* the foreground-plot loop
so the screen is already fully initialized by the time any extra plots
are inserted — keeping the original AMD mitigation in place.

The expected `fetched_tiles` counts were also stale (the prefetch
behaviour has evolved): updated to the current deterministic values
(48 → 71 for default OSM London, 71 → 75 for Google).
…olish

The headline change is SSETiling3D: a Cesium-style screen-space-error
quadtree replacing the single-zoom Tiling3D, used as the new default for
Map3D. Tiles near the camera refine deeper while distant tiles stay
coarse, giving uniform on-screen pixel density across the frustum and
making the 3D map viable at low altitudes without overfetching at the
horizon.

Supporting pieces:

* tile-fetching.jl: SSETiling3D itself; AABB-vs-frustum culling using
  per-tile (xmin..xmax, ymin..ymax, zmin..zmax); recursive descent from
  min_zoom tiles found by ground-plane frustum intersection rather than
  Tile(0,0,0) (the latter fanned out to billions of calls because low-z
  AABBs straddle every frustum plane). Bug fix in Tiling3D's distance
  measure (`norm(scalar .- vec)` broadcast nonsense → `norm(p - eye)`)
  and a near-plane lower bound that stops AMD's depth pass from
  crashing on absurd far/near ratios. Tile-queue push order reversed so
  foreground tiles drain before halo/background under the LIFO worker.
  Halo2DTiling defaults retuned (depth 8→2, halo 0.2→0.4).

* provider/shared.jl: shared per-tile (zmin,zmax) cache + binary sidecar
  format used by ElevationProvider and GeoTilePointCloudProvider so
  SSE/culling can stop falling back to the global Mariana-to-Everest z
  range once tight bounds are known. ancestor_or_default_bounds() walks
  up the tile pyramid for nearest-known bounds.

* provider/elevation: tightens bounds_cache from each fetched LERC tile;
  periodic mv-on-write checkpoint to disk.

* provider/pointclouds: same hookup; AHN1 ships with a tight Netherlands
  default (-15..350 m) which prunes intermediate-LOD recursion ~150×.

* map.jl: progressive-refinement hook — when a freshly arrived tile
  tightens provider bounds, re-fire update_tiles!() at a throttled rate
  so the view keeps refining while sitting still. Pan/zoom throttle
  200ms → 100ms.

* tile-plotting.jl: 3D move_z uses depth_shift to layer overlapping
  LODs (eliminates the speckled boundary between zoom levels) and the
  2D path stops hiding higher-z tiles on zoom-out (eliminates the
  visible blink while finer tiles cull).

* cam3d.jl: cursor-anchored pan and zoom (Cesium/Mapbox style), with
  per-frame translation capping so horizon-grabs can't teleport the
  camera.

* map3d.jl: default fetching_scheme Tiling3D → SSETiling3D.
@SimonDanisch
Copy link
Copy Markdown
Member Author

image yay :)

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.

3 participants