-
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
Oriented bounding box & frustum culling optimizations #2782
Conversation
* @type {Matrix3} | ||
* @constant | ||
*/ | ||
Matrix3.ZERO = freezeObject(new Matrix3(0.0, 0.0, 0.0, |
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.
For consistency, add this to Matrix2
and Matrix4
. Mention these in CHANGES.md.
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.
Where in CHANGES.md should I put it? Since I'm assuming the 1.10 section is final.
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.
Make a new section for 1.11.
This fails JSHint, see https://travis-ci.org/AnalyticalGraphicsInc/cesium/builds/65273151 |
Folks - this is the start of a pull request for more exact view frustum culling so we do not plan to merge this until we have it hooked up to terrain. |
c173ebb
to
de9094e
Compare
}; | ||
|
||
/** | ||
* XXX Temporary compatibility function - remove after rebasing ono the rename from intersect to intersectPlane. |
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.
TODO for self: remove when rebasing onto global rename from intersect to intersectPlane
It's fine to include it in this PR. |
09e1602
to
28c8c9d
Compare
TODO: Since we're changing |
+1 on changing to |
Just double check how wide of a breaking change it becomes. |
be25c6a
to
7793970
Compare
@pjcozzi |
7793970
to
8b8c5b8
Compare
All sounds good. |
7b56349
to
0ed700e
Compare
This affects bounding volumes AxisAlignedBoundingBox and BoundingSphere.
There have been a few changes that should be reviewed but other than these I don't know of anything I might change. I added an adjustment to expand the bounding box to cover the tile skirt. This seems like something we should have, although it seems to sometimes pretty significantly increase the number of tiles rendered (279 to 298 compared to 330 for the sphere in one case). Any comments? |
I'm working on a blog post draft here: https://github.com/kainino0x/draft-obb-blog-post |
It shouldn't be necessary to account for the skirts, since they're only intended to fill the vertical space between tiles. It's hard to imagine a situation where only the skirt is visible but the rest of the tile is not. You haven't seen such a case have you? |
@kainino0x and I talked offline, we are not going to include the skirts, but we'll comment it in the code incase we ever see cracks. |
Looks great. I will do some minor edits and publish next week. Is there anything else you wanted to add/change? |
I'll change the numbers/screenshots a bit to reflect the removal of the skirt change. I'll push that to the repo, so you'll have it when you go to do the editing. |
53b46b4
to
fb64614
Compare
For the record, the case in which the skirts hurt the performance was this one: "Toward horizon, low altitude". |
In the blog post, should I mention why the bounding box appears not to contain the tile, because of the skirt sticking out? |
Yes, I think that is an interesting point to make: the box doesn't full bound the geometry, but, in practice, we don't expect it to generate artifacts since the view position/direction would never be such that it would matter. |
@kainino0x let me know when the blog post is ready and I will copyedit and publish this week. Also, let me know this is ready to merge. |
@kainino0x also, remind me why we decided not to use the OBB for binning into multiple frustums? I want to keep some notes in case we decide to do it later. |
@pjcozzi I just pushed a commit to the blog post which I had forgotten to push on Friday. Blog and PR should be ready. I don't know that we made a specific decision not to use the OBB for binning into multiple frustums. It's possible that we just decided when it came up that I should keep working on other parts first. |
Oh, I also forgot to push the heightmapped terrain commit to this repository on Friday. Please review that short commit. @pjcozzi |
@kainino0x can you merge in master? This looks good. @kainino0x are you OK with us merging this so it can sit in master for a few days before the 1.11 release on July 1? Any additional OBB optimizations can come in a separate PR. |
Sure. I'll sync with master when I get home today. |
Done. I'm seeing a bunch of errors but they are also there on master. Plus the timeout ones that I see regularly. |
The failures in master are a website issue. I'm putting in a fix now. |
Thanks @kainino0x. If we want to tweak this before the 1.11 release, we have until early next week. |
Oriented bounding box & frustum culling optimizations
(Do not merge. Will be tested with 3D buildings first.)
In review & editing.
CHANGES.md
.Future: