-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3DTiles streaming optimizations #7774
3DTiles streaming optimizations #7774
Conversation
There is a stray console log somewhere that's showing up in 3D Tiles related Sandcastles. |
…tions' into staging-3dtiles-streaming-optimizations
…tions' into staging-3dtiles-streaming-optimizations
|
||
// Save the final destination view information for the PRELOAD_FLIGHT pass. | ||
var preloadFlightCamera = this._scene.preloadFlightCamera; | ||
if (this._mode !== SceneMode.SCENE2D) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mentioned in a previous PR but it got pushed, this should also work for 2D.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bug related to this: #7781
@loshjawrence The latest updates look good. I just rearranged the CHANGES entries and made some other small changes. Awesome work! |
Just found a major showstopper #7786, we really need to put master through it's paces before Wednesday to catch anything else. |
This is for all the 3DTile streaming optimizations. Those features include:
Foveated attributes are just a measurement of how off-center the tile is. Foveated deferral is a boolean indicating that the tile is sufficiently off-center enough and fails a modified SSE test (SSE is progressively harder to meet the further off-center you go).
Progressive resolution is a boolean indicating the tile meets SSE for a smaller screen resolution. These tiles are promoted in order to prevent screen starvation (taking a while to refine really jarring LODs) for slow connections and higher resolution screens.
Camera flight destination tiles are marked as such and promoted. A second traversal is required to keep the tiles 'touched' (so they stay in cache) and keep the requests coming while the camera is in flight.
Tiles can be canceled simply by looking at one of the frame-based timestamp members and seeing if its older than the current frame. A tile-requests-in-flight container is kept so that these tiles can be reviewed every frame.
The camera movement based request culling is accomplished by comparing the magnitude of the camera movement with the physical size of the tile. A fudge factor is used to tune the comparison since the comparison is a heuristic.
The time-gating feature just holds off on foveated deferred tiles until the camera has stopped moving for a specified time. Wouldn't be hard to extend it to other types of deferral in the future, just another boolean check.
The priority integration step takes a priority attribute maps it to 0-1 number then scales it into a fixed digit range into the priority number. Min and max of the attributes are tracked (for number attributes) so that the 0-1 mapping can be done. Example (back face deferral not used in this system yet):
Due to the nature of some traversal types (non-skiplod + replace refine) it's better to link up priorities in those cases by having an ancestor hold certain priorities (to force a hash collision) so that the bundle of requests will be formed (sections of the family tree divided up). This allows ordering of bundles and priorities within bundles are distinguished based on an lower order attributes like tree depth.
Not really a streaming performance feature but a useful debugging feature is the tile member heatmap visualizer. You can set the heatmap var to any tile member string. The result will be a relative coloring of that member for all visible tiles. It can quickly give a sense for whats wrong or not completely correct since it's not hard to imagine what the correct result should look like. If a specific range is desired you can set that as well (want to see if tiles fall within a certain range, want to see what tiles fall outside that range, etc). Search 'heatVar' in the sandcastles for an example.