Rendering elements that are outside "expanded project extents" range #8860
Unanswered
anmolshres98
asked this question in
General
Replies: 1 comment 4 replies
-
The purpose of that PR was not to make stuff outside of the project extents become visible. It was to prevent every single change to the project extents from invalidating the tile cache. The project extents define the volume of space relevant to the project. All geometry you want to visualize should be inside those extents. Why do you have geometry outside the extents and why do you want to visualize it without fixing the extents? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a question regarding iTwin JS rendering system, specifically the tile tree and what tiles backend returns. My knowledge in the matter is probably incomplete so feel free to correct my assumptions.
For context, I am working on an app that allows users to locate individual models in the viewport. The specific question I have is about models that might be very far away from the project extents (this might be because of other underlying issue like incorrectly geolocated when synced but let's ignore that for now). I know that previously the tiles loaded into the viewer were tightly coupled with the project extents and Paul made some changes a year ago to allow some buffer beyond the extents to have tiles loaded in this PR. If a user has anything beyond this extended extents range the tiles are not loaded.
We do provide visual cues to the user to indicate where the is but again this is not the best solution since the user might want to see the rendered model and not just empty space. I was trying to possibly find a way to force the backend to possibly override the buffer range and force the tiles to be fetched anyways even if it is outside the extended extents range but didn't have much luck in that regard. I tried using setting the useProjectExtents flag to false since that would mean the union of the model ranges are used but it seems that these model ranges still have to intersect with project extents for those tiles to be returned. I did find the requestElementGeometry method and readElementGraphics functions but it seems if we want to use this we would have to fetch geoms from each element in a model one at a time and with 100s of thousands of elements this would be extremely slow and not a viable option at all.
Given all this, my question is, is there a good way to force the render system to request tiles from the backend that are very far away from the project extents, way beyond the expanded project extents buffer range Paul added? or is there a different route we can use to solve this issue? Can we request the needed tiles from the backend and render them on the viewport in a performant manner?
For now I have decided to use tools and decorators already in the core repo for our usecase so this is not a necessary feature request but still wanted to get some clarity on what might be the design decisions in terms of why elements very far outside of extents are not returned? Is there a way to fetch geometries of a arbitrary list of elements from backend with a single call without having to do it one at a time? If not would adding a feature like that be prohibitively costly or a bad idea?
Thanks in advance :)
Beta Was this translation helpful? Give feedback.
All reactions