Mechanism behind prioritization of sectors
vero-so opened this issue · comments
Hi,
I am trying to understand how sectors are prioritized and loaded in/out using OrderSectorsByVisibilityCoverage
.
Currently, looking at OrderSectorsByVisibilityCoverage::orderSectorsByVisibility
-> OrderSectorsByVisibilityCoverage::renderSectors
, which creates the priority list of sectors. The rendering of sector ids into a texture target, unpacking and reducing is all clear. However, I think I am not getting how a subset of the sectors are being rendered into the target at all.
I think it boils down to this step and which geometry is exactly rendered in step 2 vs step 3?:
// 2. Render already loaded geometry to offscreen buffer
this._alreadyLoadedProvider.renderOccludingGeometry(renderTarget, camera);
// 3. Render to offscreen buffer
this._renderer.render(this.scene, camera);
When I dive into step 2, I end in EffectRenderManager::renderDetailedToDepthOnly
, where nodes are moved from _originalScene
to _cadScene
and later restored back to _originalScene
.
What is the functionality of _cadScene
and _originalScene
. How are they different?
In ByVisibilitySectorCuller::update
, sectors near to the camera should be put together with the priority list of sectors:
const prioritized = coverageUtil.orderSectorsByVisibility(camera);
The length of the priority list prioritized.length
is greater than the number of nodes (SectorNodes with LOD=detailed) that are moved to _cadScene
in renderDetailedToDepthOnly
.
That means more sectors come in through the _renderer.render(this.scene, camera)
. Is it possible to explain how? How does _cadScene
and _originalScene
of the EffectRenderManager
compare the scene
of the GpuOrderSectorsByVisibilityCoverage
?
Maybe you @larsmoa as it seems that you wrote the code?
Thanks a lot in advance.
-veronika
I'm impressed by the details in this question! Answering this in text seems like a daunting task - maybe we can set up a meeting instead? Can you reach out at lars.moastuen@cognite.com so we can set up a call?
Perfect, thanks! Wrote you an email.
Thanks to you as well!