-
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
Tile with transform not being clipped correctly #6600
Comments
@ggetz : I have done a quick test of the fix to replace the quick & dirty bypass I have applied on model.js & PointCloud3DTileContent.js as explained at forum level and the behavior is not the same. |
So while digging into this I found another test case where it's broken. This one has no transforms. localhost:8080 link This is using the TilesetOfTilesets data. You can see that the children are getting clipped at a different location than the parent by the shader, and are also getting culled too early. I'm not sure how to confirm this yet but I believe the models in this tileset use RTC coordinates so I had to move the clipping plane to the tileset using:
I think having to do this is a bit confusing since the clipping plane's coordinates are supposed to be relative to what it's clipping. It would be nice to support this case as well. |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/forum/#!topic/cesium-dev/V3HMRAqToeU If this issue affects any of these threads, please post a comment like the following:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
The tileset consists of two tiles, a root tile with a local->wgs84 transform and a child tile with a small translation/scale transform. The expected result is that both tiles get clipped in the same way but only the root tile is clipped correctly.
localhost:8080 link - uses TilesetWithTransforms in the Specs folder.
Part of the problem may be that only the root's transform is used in the
Cesium3DTile/contentVisibility
function. I vaguely remember the reasoning behind this came up as a PR comment but I can't find the thread.Also I think there might be an inconsistency in how the clipping planes model matrix is handled.
Inside ClippingPlaneCollection/computeIntersectionWithBoundingVolume:
modelMatrix = Matrix4.multiply(modelMatrix, transform, scratchMatrix);
Compared to Model/createClippingPlanesMatrixFunction:
return Matrix4.multiply(model._modelViewMatrix, clippingPlanes.modelMatrix, scratchClippingPlaneMatrix);
I think the first should be
modelMatrix = Matrix4.multiply(transform, modelMatrix, scratchMatrix);
so that the order of operations is the same. But someone should double check that.Brought up the forum: https://groups.google.com/forum/#!topic/cesium-dev/V3HMRAqToeU
@ggetz would you be able to look more into this?
The text was updated successfully, but these errors were encountered: