-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Terrain Quantization #3225
Terrain Quantization #3225
Conversation
…compressing to 8 bits.
@mlimper this work is inspired by our conversation at SIGGRAPH about WEB3D_quantized_attributes. We are also going to implement that glTF extension. |
* @namespace | ||
* @alias TerrainCompression | ||
*/ | ||
var TerrainCompression = { |
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.
Should this be @private
?
*/ | ||
var TerrainMesh = function TerrainMesh(center, vertices, indices, minimumHeight, maximumHeight, boundingSphere3D, occludeePointInScaledSpace, vertexStride, orientedBoundingBox) { | ||
var TerrainMesh = function TerrainMesh(center, vertices, indices, minimumHeight, maximumHeight, boundingSphere3D, occludeePointInScaledSpace, vertexStride, orientedBoundingBox, encoding) { |
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.
Is this technically a breaking change since TerrainMesh
is public?
Looks good so far. Reasonably clean. |
I moved all of the quantization and packing to |
Great, happy to hear that. Let me know if you discover things that could be improved in the extension. |
@pjcozzi This is ready for another review. |
For the same views as in the fog Sandcastle example:
|
Update CHANGES.md for 1.17 including the removed classes (that we'll deprecate in 1.16). |
"uncompressed" is before, and "compressed" is after, right? The CPU results are, well, amazing. Do you think the low altitude GPU results are suspect since there is such a small difference? |
That is with terrain. |
If we can't track this down, worse case, I guess we can render the boundary (and/or perhaps skirts) with full precision. Or maybe we use double the required precision (if it turns out to still be smaller overall) so that adjacent tile boundaries at the same LOD are guaranteed to match up. Would need to think more about adjacent tiles at different LODs. |
They are a little better than I expected but in the same area since the number of bits per vertex was reduced by half.
I think the GPU results are much closer because the textures are stored there and aren't kept on the CPU. |
Ah yes. You could also test with Natural Earth to see, but we would not publish those numbers since they won't be a typical case. |
The boundary artifact is the only issue. This is ready (post 1.16) otherwise. |
That is just the imagery. The same thing happens in master. |
Ah, OK. Can you reproduce the issue in SF? |
Fixes #3265. |
@pjcozzi The cracking issue with terrain was fixed. This is ready for another look. |
Please don't forget the blog post and final memory numbers. |
Looks good! |
Opening for early review.There will be a lot of reorganization and generalization for other geometry rendered RTC.