CesiumGS / CesiumGS/cesium

Tileset being selected for rendering on the other side of the globe?

Open
#8,612 10 comments 0 reactions 0 assignees View on GitHub
category - 3d tiles category - memory/performance category - traversal & selection theme - 3D Tiles as Terrain type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

1. Start [this Sandcastle](https://sandcastle.cesium.com/index.html#c=fVLfb9MwEP5XTF7qiMqBAdLo0oqp8DBpCLRO4yUvnn3dLBy78p0zxtT/Hadu2hQk7iXx3fd997OTgXUGniCwOXPwxJaAJrbibufjE7V7Lr0jaRyEyZS9NI4lIwghub4H3xkNYTYQVQBJ8MMHq28zhJeN25YXjWtcl7KRsYBAKV3OK1CBA7EJpjVkOkAhteY5yaig/Hn3+TbT+b6M3mKwh/RX3t0A+hgUiHXw7SUm8JXmZ+cf338op0fSxhtHS+ujXj1KbdzDjI0ke5NE4KIk492MUYgwPY238pdpY3s5hp0dIdv8u03dH5tHsKAIdOr+TXaezMAj3YBL4+xn8KUDR9cGk3zaxDo61edgvBwKNWt+0Hs1nw+TFUipGiSjUAzxctTbqIb/MC6OBOUdegvC+gc++ZpOIa3YZi5b7eEzNmGvD9Llnr3dbb6YFjXSs4VF9n4y7cYH6vfGhagI2o1NN4PVfVQ/UzUKsReoq4FUa9Mxo+dN8dc5NgVTViKmyDpauzK/oSkWdZXwJzTrdyv+1kGw8rmHPL5dXGenEKKu0vNfFnlv72UYKf4B) Which loads the Montreal tileset. It also has a postRender event registered which prints out the number of montreal tiles selected for rendering whenever the selected value changes.

2. Type `Jamaica` into the geocoder and fly there. (Still 0 tiles selected for rendering)

3. Tilt the camera towards the horizon, you'll notice that the root tile of Montreal gets selected, even though it is well below the horizon practically on the other side of the earth. Zooming in close to the ground doesn't fix this either, the moment you are looking at the horizon, it selects the tile.

This seems to happens whether terrain or depthTestAgainstTerrain is on or off, so I don't think that's the problem. @likangning93 thinks maybe something is wrong with horizon culling?

Contributor guide

Open the contributing guide

Research direction

Run the linked Sandcastle, load the Montreal tileset, fly to Jamaica, and tilt the camera toward the horizon while watching the postRender tile count. Start by tracing the tileset selection and horizon-culling path implicated by the reproduction, including behavior with terrain and depthTestAgainstTerrain both enabled and disabled. Done means the Montreal root tile is not selected when it is below the horizon on the opposite side of the globe.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.