Skip to content
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 / imagery rendering overhaul #7061

Merged
merged 150 commits into from
Feb 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
834aea0
Start of BVH work.
kring Jun 6, 2018
509799f
Merge pull request #31 from AnalyticalGraphicsInc/master
kring Jun 6, 2018
6106795
Merge remote-tracking branch 'upstream/master' into bvh
kring Jun 12, 2018
34bbcc6
Start removing unnecessary upsampling.
kring Jun 14, 2018
88d0fdc
Compute the bounding volume (for culling) as needed.
kring Jun 16, 2018
d51bc73
Make terrain rendering mostly work again.
kring Jun 18, 2018
763976d
Get to upsampling more quickly.
kring Jun 19, 2018
8d47f39
Correctly account for Cesium's tile numbering (from the North).
kring Jun 19, 2018
902052a
Remove TileTerrain.
kring Jun 20, 2018
4d5c53e
Remove more unused tile properties.
kring Jun 20, 2018
c3f4931
More efficient way to finding closest renderable tile.
kring Jun 21, 2018
37e352f
Fix problems with heightmap terrain / no availability data.
kring Jun 22, 2018
4ea1a5d
Fix flipped bounding region estimation.
kring Jun 24, 2018
ee388ff
Load tiles near viewport center first.
kring Jun 25, 2018
827c8bc
Improve tile load prioritization.
kring Jun 26, 2018
7e93c95
Tiny optimization.
kring Jun 26, 2018
a4de6d4
Don't render a million subsets of the same tile for now reason.
kring Jun 26, 2018
72e548e
Optimize out heaps of unnecessary loading.
kring Jun 28, 2018
c5aa64d
Fix distance sorting, cleanup and commenting.
kring Jun 29, 2018
a11e43f
Fix some test failures, add some comments.
kring Jun 29, 2018
93105ce
Tweak root tile selection.
kring Jun 29, 2018
78bc480
Fix test failures in QuadtreePrimitiveSpec.
kring Jun 29, 2018
8fc7a0d
Don't render children until all visible ones are renderable.
kring Jul 2, 2018
1ce367d
Add some tweakable options to QuadtreePrimitive and
kring Jul 5, 2018
e614d6e
Fix test failure, improve camera terrain adjustment.
kring Jul 5, 2018
a462ddc
Fix exaggeration, other cleanup.
kring Jul 6, 2018
2858d6b
Fix eslint warnings.
kring Jul 6, 2018
5d79e11
Fix broken water mask.
kring Jul 6, 2018
61432c1
Fix 2D/CV.
kring Jul 6, 2018
9cf032b
Merge remote-tracking branch 'origin/master' into bvh
kring Jul 6, 2018
14f56ff
Merge remote-tracking branch 'upstream/master' into bvh
kring Jul 6, 2018
3b77787
Super hacky fill tile generation.
kring Jul 26, 2018
4711ac8
Don't load ancestors.
kring Jul 27, 2018
db5f87d
Fix implementing new traversal.
kring Jul 31, 2018
f9546e0
Fix a bug, add some options.
kring Jul 31, 2018
aa4b806
Much better (but still imperfect) fill tiling.
kring Aug 7, 2018
237f8de
Fix a bug that made fill tiles flicker out after partial load.
kring Aug 8, 2018
0328cc9
Don't regenerate fill tiles every frame.
kring Sep 5, 2018
955c996
New fill tile code kinda working.
kring Sep 11, 2018
3a93a10
Add edge vertices, fix bugs.
kring Sep 12, 2018
34160b7
Use correct index for interpolation.
kring Sep 12, 2018
98d414a
Handle totally disconnected fill tiles.
kring Sep 12, 2018
f58b7f8
Prefer a corner derived from an adjacent edge
kring Sep 13, 2018
8eacbf5
Less crashy.
kring Sep 13, 2018
33faa19
Remove unnecessary code and fill tile shading.
kring Sep 13, 2018
db79a4f
Fix eslint warnings and heightmap terrain.
kring Sep 21, 2018
1945b68
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Sep 21, 2018
2402997
Remmove ability to render partial tiles.
kring Sep 23, 2018
7b1ba22
Remove bad assertion.
kring Sep 23, 2018
94067ff
Optional fill tile highlighting.
kring Sep 23, 2018
042abb2
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Oct 5, 2018
2df6dcc
Add Terrain Tweaks Sandcastle example.
kring Oct 5, 2018
4eebbbb
Add fill tile highlight option to Terrain Tweaks.html.
kring Oct 5, 2018
955c6ab
Move comparison funcs to CesiumMath, other cleanup.
kring Oct 5, 2018
f21a0b0
Fixed a bug propating edges across the antimeridian.
kring Oct 5, 2018
b68efbd
Fix another antimeridian problem.
kring Oct 6, 2018
16268a1
Address some TODOs.
kring Oct 6, 2018
6a53390
Cleanup.
kring Oct 6, 2018
a0cd910
Removing missing tile strategy.
kring Oct 6, 2018
d808d2f
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Oct 18, 2018
395529d
Eliminate a copy while creating fill meshes.
kring Nov 6, 2018
90e67ef
Fix incorrect default.
kring Nov 6, 2018
bb92ea4
Eliminate another copy.
kring Nov 6, 2018
1a419c8
Remove unnecessary check and allocation.
kring Nov 6, 2018
c4d5a1c
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Nov 6, 2018
738b60a
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Nov 9, 2018
b253b66
Cleanup.
kring Nov 9, 2018
685dee3
More cleanup.
kring Nov 9, 2018
0d33623
Remove TerrainTileEdgeDetails.js.
kring Nov 12, 2018
11eb02c
The cleanup fun never ends.
kring Nov 12, 2018
8222a0a
Remove unneeded field.
kring Nov 27, 2018
8157ea5
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Nov 27, 2018
8e1d45c
Eliminate frameRendered and frameVisited from QuadtreeTile.
kring Nov 27, 2018
a756cb0
Remove unused and expensive tileLoadedEvent.
kring Nov 28, 2018
599e238
Merge remote-tracking branch 'origin/master' into fill-tiles
kring Dec 10, 2018
edc6059
Remove nonsensical tests, clean up some things.
kring Dec 11, 2018
b54e9f2
Tests and cleanup.
kring Dec 12, 2018
d0e63aa
Much better GlobeSurfaceTileSpecs, minor refactoring for testing.
kring Dec 15, 2018
ac2c792
Water mask testing.
kring Dec 16, 2018
024dd6f
Start moving getBoundingVolumeHierarchy specs to new system.
kring Dec 17, 2018
9e07b73
Update the rest of the BVH tests.
kring Dec 17, 2018
57cb725
Last of the GlobeSurfaceTile specs.
kring Dec 18, 2018
03da694
Remove unused requires.
kring Dec 18, 2018
a816f65
Break out processTiles.
kring Dec 18, 2018
686a9f5
selectTilesForRendering tests, etc.
kring Jan 3, 2019
4e3fc5f
Fix continue processing logic.
kring Jan 3, 2019
d6d65a8
Simplify test.
kring Jan 3, 2019
72514d2
New spec, fix failures, etc.
kring Jan 3, 2019
8cfda70
Fix test failure.
kring Jan 3, 2019
6456e37
Start adding specs for TerrainFillMesh.
kring Jan 4, 2019
0a0426c
More TerrainFillMesh tests.
kring Jan 4, 2019
b5ba318
Improve fill specs.
kring Jan 4, 2019
c0bf974
Work around missing slice function in IE11.
kring Jan 5, 2019
2506261
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Jan 6, 2019
f4c2f35
Add missing semicolon.
kring Jan 6, 2019
34d14d7
More fill specs.
kring Jan 7, 2019
eec8363
More specs, remove unused code, fix a bug.
kring Jan 8, 2019
09ca3c6
updateFillTiles specs.
kring Jan 8, 2019
7fa75da
More fill specs.
kring Jan 8, 2019
497024a
Tests.
kring Jan 8, 2019
85bd4b8
Write some tests, fix some bugs.
kring Jan 11, 2019
3bd110b
Fix some fill tile generation issues.
kring Jan 13, 2019
06ea854
Less blocky fills for low-detail tiles.
kring Jan 14, 2019
0290e3f
Better math for selecting a heightmap over a normal fill.
kring Jan 14, 2019
b58ccc9
Small optimization.
kring Jan 14, 2019
a3b98e8
Fix test failures.
kring Jan 14, 2019
2e1b026
Allow rendering of not-fully-loaded tiles.
kring Jan 15, 2019
193639a
Eliminate duplicate imagery loading code.
kring Jan 16, 2019
a40657b
Tweak math for using heightmap fills, again.
kring Jan 16, 2019
792610d
Don't let the globe vanish when adding a layer.
kring Jan 16, 2019
02a2209
Adjust root tile loading to reduce flickering when adding new layers.
kring Jan 17, 2019
f76ee90
Fix test failures.
kring Jan 17, 2019
4b9b62d
Better debug stats.
kring Jan 17, 2019
cffcbb0
Push parent tiles to be completely upsamplable.
kring Jan 17, 2019
64d17a2
Nice little memory optimization.
kring Jan 17, 2019
43490c8
Remove all the BVH code because it's providing no benefit.
kring Jan 22, 2019
9534f19
Fix some problems in Sandcastle examples.
kring Jan 23, 2019
ebb8760
Don't add undefined vertex arrays to free list.
kring Jan 23, 2019
4adf7d3
Fix Clamp to Terrain Sandcastle example.
kring Jan 24, 2019
a676e66
Fix test failure.
kring Jan 24, 2019
328a03a
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Jan 24, 2019
e250a39
Possibly dodgy fix for Clamp to Terrain example.
kring Jan 25, 2019
992d018
Less per-tile work.
kring Jan 25, 2019
1e60c7d
Remove unused requires.
kring Jan 25, 2019
72d4d39
Remove unused require.
kring Jan 27, 2019
c03dc05
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Jan 27, 2019
354423d
Fix a typo making Firefox explode.
kring Jan 29, 2019
17547a0
A few small cleanup things.
kring Jan 30, 2019
ee65aa4
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Jan 30, 2019
5b6d200
Move Terrain Performance Sandcastle to development folder.
kring Jan 30, 2019
c6d651a
Address TODOs.
kring Jan 30, 2019
ee7744d
Remove unnecessary renderable tile tracking.
kring Jan 31, 2019
a89fc60
Remove unnecessary height updating.
kring Jan 31, 2019
bbe9f82
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Jan 31, 2019
f56791f
Handle possibility that camera is right at tile OBB center.
kring Feb 1, 2019
712325c
Address TODOs.
kring Feb 1, 2019
21394f0
Remove terrainnotes.md.
kring Feb 1, 2019
99e76c7
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Feb 1, 2019
cf657be
Fix water mask in fill tiles.
kring Feb 2, 2019
380e849
Merge remote-tracking branch 'upstream/master' into fill-tiles
kring Feb 3, 2019
09760c9
Changes from Omar's review.
kring Feb 4, 2019
211e596
Put terrain tweakables on Globe, doc updates.
kring Feb 4, 2019
a88c200
TraversalDetails doc.
kring Feb 4, 2019
15e628e
Add missing @default and @type docs.
kring Feb 6, 2019
3a9b9ca
Don't use an array to track needed positions.
kring Feb 6, 2019
9ac2e0b
Remove height range clamping.
kring Feb 6, 2019
b774bd5
Possibly fix water mask destroyed crash.
kring Feb 7, 2019
2f907d4
Make Google terrain include edge indices.
kring Feb 8, 2019
2bc0095
Don't keep adding CULLED_BUT_NEEDED tiles to the load queue.
kring Feb 9, 2019
96b3f26
Merge remote-tracking branch 'origin/master' into fill-tiles
mramato Feb 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unused and expensive tileLoadedEvent.
  • Loading branch information
kring committed Nov 28, 2018

Verified

This commit was signed with the committer’s verified signature.
ronnnnn Seiya Kokushi
commit a756cb06001ff809fd737ce9c7bbf69c1c6bdb81
12 changes: 0 additions & 12 deletions Source/Scene/Globe.js
Original file line number Diff line number Diff line change
@@ -275,18 +275,6 @@ define([
return this._surface.tileProvider.imageryLayersUpdatedEvent;
}
},
/**
* Gets an event that's raised when a surface tile is loaded and ready to be rendered.
*
* @memberof Globe.prototype
* @type {Event}
* @readonly
*/
tileLoadedEvent : {
get : function() {
return this._surface.tileProvider.tileLoadedEvent;
}
},
/**
* Returns <code>true</code> when the tile load queue is empty, <code>false</code> otherwise. When the load queue is empty,
* all terrain and imagery for the current view have been loaded.
19 changes: 0 additions & 19 deletions Source/Scene/GlobeSurfaceTileProvider.js
Original file line number Diff line number Diff line change
@@ -171,7 +171,6 @@ define([
this._imageryLayers.layerRemoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerRemoved, this);
this._imageryLayers.layerMoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerMoved, this);
this._imageryLayers.layerShownOrHidden.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden, this);
this._tileLoadedEvent = new Event();
this._imageryLayersUpdatedEvent = new Event();

this._layerOrderChanged = false;
@@ -288,17 +287,6 @@ define([
}
},

/**
* Gets an event that is raised when an globe surface tile is loaded and ready to be rendered.
* @memberof GlobeSurfaceTileProvider.prototype
* @type {Event}
*/
tileLoadedEvent : {
get : function() {
return this._tileLoadedEvent;
}
},

/**
* Gets an event that is raised when an imagery layer is added, shown, hidden, moved, or removed.
* @memberof GlobeSurfaceTileProvider.prototype
@@ -554,13 +542,6 @@ define([
return;
}
GlobeSurfaceTile.processStateMachine(tile, frameState, this._terrainProvider, this._imageryLayers, this._vertexArraysToDestroy);
var tileLoadedEvent = this._tileLoadedEvent;

// TODO: creating a new function for every loaded tile every frame?!
tile._loadedCallbacks['tileLoadedEvent'] = function (tile) {
tileLoadedEvent.raiseEvent();
return true;
};
};

var boundingSphereScratch = new BoundingSphere();
2 changes: 1 addition & 1 deletion Source/Scene/QuadtreeTile.js
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ define([

this._customData = [];
this._frameUpdated = undefined;
this._lastSelectionResult = TileSelectionResult.CULLED;
this._lastSelectionResult = TileSelectionResult.NONE;
this._lastSelectionResultFrame = undefined;
this._loadedCallbacks = {};

1 change: 0 additions & 1 deletion Specs/DataSources/EntityClusterSpec.js
Original file line number Diff line number Diff line change
@@ -50,7 +50,6 @@ defineSuite([
tilesWaitingForChildren : 0
}
},
tileLoadedEvent : new Event(),
terrainProviderChanged : new Event(),
imageryLayersUpdatedEvent : new Event(),
beginFrame : function() {},
1 change: 0 additions & 1 deletion Specs/DataSources/PointVisualizerSpec.js
Original file line number Diff line number Diff line change
@@ -51,7 +51,6 @@ defineSuite([
scene.globe = {
ellipsoid : Ellipsoid.WGS84,
_surface : {},
tileLoadedEvent : new Event(),
imageryLayersUpdatedEvent : new Event(),
terrainProviderChanged : new Event()
};
1 change: 0 additions & 1 deletion Specs/Scene/ModelSpec.js
Original file line number Diff line number Diff line change
@@ -3147,7 +3147,6 @@ defineSuite([
tilesWaitingForChildren : 0
}
},
tileLoadedEvent : new Event(),
imageryLayersUpdatedEvent : new Event(),
destroy : function() {}
};
1 change: 0 additions & 1 deletion Specs/createGlobe.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ define([
return 0.0;
},
_surface : {},
tileLoadedEvent : new Event(),
imageryLayersUpdatedEvent : new Event(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't really figure this out - was tileLoadedEvent just removed? If so, why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes I forgot to mention this. It's a breaking change. This tileLoadedEvent stuff was not used anywhere, and was extremely costly, so I removed it. I think it was originally added for the height update system, but then that ended up working a different way.

Up to you guys if you think it's necessary to pay the price for a few releases to go through a deprecation cycle, or if we can get away with simply removing it and advertising it as a breaking change. I'd be somewhat surprised if anyone is using it, but I could be wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate a bit more on "was extremely costly" ? Like just raising this event is costly or does it involve having to keep track of extra things? I think it's probably fine if there is such a high cost to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was mostly this code:
https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/GlobeSurfaceTileProvider.js#L518

That was creating a new function for every loaded tile every frame.

I didn't spent a lot of time trying to think of an efficient way to implement this because it didn't seem very useful to me.

_terrainProvider : undefined,
terrainProviderChanged : new Event(),