You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation of billboard on terrain is well written and I have learned a lot from reading it.
However I found some problems while working on #4622:
I think the billboard height should be computed also if the level of the scene getting lower (zoom-out). Currently the height is computed only in one direction. ( if (tile.level > data.level) in this link).
However, sometimes lower levels have higher terrain at a given point so the billboard disappears.
In the following code the isChildAvailable is invoked on the grandparent of the child, instead of on tile
If the tile is upsampled the data.terrainData.isChildAvailable in the lines above would always return false (see this line). So, in such case the billboard wouldn't be updated after some zooming.
I found that this is the reason to this behavior (the billboard should be clamped to the ground):
I'm not sure at this point but I think the billboard height must be recomputed if the original data of the tile was a result of an upsampling process, and the tile was later loaded.
Please consider depth offset in the BillboardCollectionVS.glsl. In previous versions there were the following lines:
#ifdef CLAMPED_TO_GROUND
// move slightly closer to camera to avoid depth issues.
positionEC.z *= 0.995;
It would be great if, in addition to eyeOffset paramter in billboard and label, there will be a depthOffset which will be expressed as a fraction of the camera distance to the vertex (0-1).
Currently if the terrain provider is replaced by another one, clamped billboards would disappear. Maybe that because the QuadtreePrimitive.prototype.invalidateAllTiles treat only levelZeroTiles's customData but I didn't enter into it
The text was updated successfully, but these errors were encountered:
@mramato 2, 3, and 4 are all things we still potentially need to address. 2 in particular seems wrong to me but I'm not sure what the right thing to do is. @bagnell can you take a look at this?
1 is probably something we're not going to address. We made a decision to clamp to the highest resolution LOD and not reclamp if lower resolution tiles are loaded in when you zoom out from an area.
Current implementation of billboard on terrain is well written and I have learned a lot from reading it.
However I found some problems while working on #4622:
I think the billboard height should be computed also if the level of the scene getting lower (
zoom-out
). Currently the height is computed only in one direction. (if (tile.level > data.level)
in this link).However, sometimes lower levels have higher terrain at a given point so the billboard disappears.
In the following code the
isChildAvailable
is invoked on the grandparent of the child, instead of ontile
(link).
data.terrainData.isChildAvailable
in the lines above would always returnfalse
(see this line). So, in such case the billboard wouldn't be updated after some zooming.I found that this is the reason to this behavior (the billboard should be clamped to the ground):
I'm not sure at this point but I think the billboard height must be recomputed if the original data of the tile was a result of an upsampling process, and the tile was later loaded.
Please consider depth offset in the
BillboardCollectionVS.glsl
. In previous versions there were the following lines:It would be great if, in addition to
eyeOffset
paramter inbillboard
andlabel
, there will be adepthOffset
which will be expressed as a fraction of the camera distance to the vertex (0-1).Maybe that because theQuadtreePrimitive.prototype.invalidateAllTiles
treat onlylevelZeroTiles
'scustomData
but I didn't enter into itThe text was updated successfully, but these errors were encountered: