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

Entities on terrain #3903

Merged
merged 103 commits into from
Jun 29, 2016
Merged

Entities on terrain #3903

merged 103 commits into from
Jun 29, 2016

Conversation

tfili
Copy link
Contributor

@tfili tfili commented May 9, 2016

Moved to cesium branch from fork PR #3406.

Bounding boxes seem correct but we are still seeing performance issues.

mramato and others added 30 commits April 24, 2015 11:31
…nd primitives if we know for sure an app won't use it.
…but we just want to let the users know once.
…they end up on terrain when we think they should.
@tfili
Copy link
Contributor Author

tfili commented Jun 24, 2016

In addition to updating CHANGES, we need to update the Visualizing Geospatial Data tutorial to discuss all of the rules (and caveats) for the behavior; otherwise the forum is going to get flooded with questions because of all of the caveats. @tfili if you want to at least create a bullet list enumerating everything, that should get the ball rolling.

@mramato Forgot this one. Here is a starting list. Don't think I missed anything but update this if you think of anything else.

  • Polylines aren't on terrain yet
  • Material must be a ColorMaterialProperty
  • height and extrudedHeight must be undefined
  • For polygons, perPositionHeight must be false
  • Outlines aren't drawn (and warning will be shown in the console)
  • fill property must be true or a non-constant property

@mramato
Copy link
Contributor

mramato commented Jun 24, 2016

Merge in master, please.

@mramato
Copy link
Contributor

mramato commented Jun 24, 2016

For the default KML example, performance is still over 100% slower than master and it also very hitchy (I'm talking the default view with stats turned on).

Also, after playing with the default KML example for a while, then switching to the GDP one, Chrome just starting griding CPU for a full 30-45 seconds before the app became responsive and switched. (Seems reproducible on my machine).

isColorMaterial && GroundPrimitive.isSupported(this._scene);

if (outlineEnabled && onTerrain) {
oneTimeWarning('Entities with an outline are unsupported on terrain. Outline will be disabled.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this message is copied in 4 places, I would add a simple property to oneTimeWarning like oneTimeWarning.geometryOutlines with this string and use that instead.

Also, we should replace this message with Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0. so that users actually know what they need to do to get the outline back if they want it.

@mramato
Copy link
Contributor

mramato commented Jun 24, 2016

I think those are my last comments. I realize this is probably going to be a disruptive change no matter what we do, but the performance issue does concern me.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2016

For the performance concerns, this is on by default, right? Instead, could we have users opt into it even if it is at the Viewer level? It would be easy to deprecate later.

…ow-unload

Sped up deleting of custom data from a QuadtreeTile.
@mramato
Copy link
Contributor

mramato commented Jun 27, 2016

GeoJSON is already opt-in and they can easily go back to the old behavior by setting an explicit height of 0 on any geometry, so I'm not sure adding another layer of checks is worth it. If we ever want to get to terrain on by default, we'll have the bite the bullet and start clamping by default, so I think now would be a good time for that. If we get negative feedback on the release, then we can put in an explicit flag for people that need it.

Unless anyone has any objections, or @pjcozzi feels strong about making the exclusively opt-in all around, I think this is ready. The travis deploy is occasionally failing, but this looks like a problem with deploys in general and not this branch.

@denverpierce
Copy link
Contributor

If I get some free time, I can run this through it's paces and see how it affects my use case. I'm primarily worried about perf, and may have to very carefully tailor things to make it usable, or opt out completely.

What's the reasoning behind making geojson linestrings turn into corridors, and not KML linestrings? I use a fair amount of both, and having KML lines as an outlier is going to be a pain point. I understand that corridor conversion is a workaround at the moment, but it seems strange that it isn't consistent.

@tfili
Copy link
Contributor Author

tfili commented Jun 27, 2016

The reason it was done this way is because it is completely opt-in for Geojson.

For Kml, whether to clamp to terrain is part of the file itself. Therefore, it would break apps that load a kml document and then try to use Entity.polyline. Like you said, this is a workaround, so we would most likely break their app again at some point.

@pjcozzi Any opinion here?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 28, 2016

Do we have a table of before/after performance numbers?

Given that we expect to make terrain clamping 10x faster with 3D Tiles and that the current GroundPrimitive is basically opt-in, I still think this should be opt-in. Perhaps we can simplify the overall way in which opt-in happens if that will satisfy everyone's concerns.

@tfili
Copy link
Contributor Author

tfili commented Jun 28, 2016

@mramato @denverpierce I updated KmlDataSource and GeoJsonDataSource to both be opt-in for geometry (polygons and lines) and to use corridors for lines if they do opt-in. Both will follow their spec in regards to points, billboards, etc (For KML listen to altitudeMode and for GeoJson, clamp to ground if no height is specified). This should remove any performance concerns around using GroundPrimitives if the user doesn't care about terrain.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 29, 2016

@tfili can you please post a few choice screenshots of KML/GeoJSON on terrain here so we can use them in the 1.23 blog post, twitter, etc.?

@mramato
Copy link
Contributor

mramato commented Jun 29, 2016

As mentioned offline, update changes again and this is good to go.

@tfili
Copy link
Contributor Author

tfili commented Jun 29, 2016

@mramato CHANGES has been updated.

@mramato mramato merged commit 523544f into master Jun 29, 2016
@mramato mramato deleted the entity-terrain branch June 29, 2016 15:28
@tfili
Copy link
Contributor Author

tfili commented Jun 29, 2016

image

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 29, 2016

@tfili we're looking for choice screenshots of KML/GeoJSON on terrain, not just of entities. Can you please create some?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants