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

Add geographic limit rectangle #6987

Merged
merged 6 commits into from Sep 10, 2018

Conversation

Projects
None yet
6 participants
@likangning93
Contributor

likangning93 commented Aug 31, 2018

Needed for #6986, because some projections really really don't work well unless you clip out everything but the local area (EPSG 2039, for example).

This is distinct from clipping planes on the globe in that this respects curvy projections, which become possible in #6986. Keeping this separate also avoids adding extra complication to the clipping planes implementation.

Pretty pictures:
limiter3d
Coffee belt in 3D

limitercv
Coffee belt in Columbus View

@cesium-concierge

This comment has been minimized.

Show comment
Hide comment
@cesium-concierge

cesium-concierge Aug 31, 2018

Thanks for the pull request @likangning93!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

cesium-concierge commented Aug 31, 2018

Thanks for the pull request @likangning93!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@likangning93 likangning93 referenced this pull request Aug 31, 2018

Closed

Proj4 and custom projections #6901

0 of 4 tasks complete
@mramato

This comment has been minimized.

Show comment
Hide comment
@mramato

mramato Aug 31, 2018

Member

Nice! Please update CHANGES. People have been asking for this feature for a while (even without projections).

Does it work with both infinite scrolling and 2D map rotate modes?

We should probably wait until after the release to merge this, even if we think it's ready.

Member

mramato commented Aug 31, 2018

Nice! Please update CHANGES. People have been asking for this feature for a while (even without projections).

Does it work with both infinite scrolling and 2D map rotate modes?

We should probably wait until after the release to merge this, even if we think it's ready.

@hpinkos

This comment has been minimized.

Show comment
Hide comment
@hpinkos

hpinkos Aug 31, 2018

Contributor

How hard would it be to get rid of the white seam at the IDL when east == west?
Did you check to make sure this works if east < west (ie the rectangle crosses the idl)

Contributor

hpinkos commented Aug 31, 2018

How hard would it be to get rid of the white seam at the IDL when east == west?
Did you check to make sure this works if east < west (ie the rectangle crosses the idl)

@mramato

This comment has been minimized.

Show comment
Hide comment
@mramato

mramato Aug 31, 2018

Member

I assumed the outline was for the screenshots, is there a need to have it at all in production?

Member

mramato commented Aug 31, 2018

I assumed the outline was for the screenshots, is there a need to have it at all in production?

@likangning93

This comment has been minimized.

Show comment
Hide comment
@likangning93

likangning93 Sep 6, 2018

Contributor

Whoops, sorry for the slow response.

I assumed the outline was for the screenshots, is there a need to have it at all in production?

Yes, outline was for screenshots and demos. I thought it would be helpful since we don't draw the backsides of terrain.

Did you check to make sure this works if east < west (ie the rectangle crosses the idl)

Not working, I'll try getting that fixed soon.

Does it work with both infinite scrolling and 2D map rotate modes?

I think so, but using a limiter that that covers less than -180 to 180 longitude will be discontinuous:

limiterscroll2d

Contributor

likangning93 commented Sep 6, 2018

Whoops, sorry for the slow response.

I assumed the outline was for the screenshots, is there a need to have it at all in production?

Yes, outline was for screenshots and demos. I thought it would be helpful since we don't draw the backsides of terrain.

Did you check to make sure this works if east < west (ie the rectangle crosses the idl)

Not working, I'll try getting that fixed soon.

Does it work with both infinite scrolling and 2D map rotate modes?

I think so, but using a limiter that that covers less than -180 to 180 longitude will be discontinuous:

limiterscroll2d

@likangning93 likangning93 requested a review from bagnell Sep 6, 2018

@bagnell

This comment has been minimized.

Show comment
Hide comment
@bagnell

bagnell Sep 6, 2018

Member

It's strange that the performance drops in 2D only when showing the rectangles. I only get ~20 FPS.

Member

bagnell commented Sep 6, 2018

It's strange that the performance drops in 2D only when showing the rectangles. I only get ~20 FPS.

@bagnell

This comment has been minimized.

Show comment
Hide comment
@bagnell

bagnell Sep 6, 2018

Member

How hard would it be to change the center of projection? Columbus view might be useless if there is a limiting rectangle crossing the anti-meridian:
image

Member

bagnell commented Sep 6, 2018

How hard would it be to change the center of projection? Columbus view might be useless if there is a limiting rectangle crossing the anti-meridian:
image

@likangning93

This comment has been minimized.

Show comment
Hide comment
@likangning93

likangning93 Sep 7, 2018

Contributor

It's strange that the performance drops in 2D only when showing the rectangles. I only get ~20 FPS.

I'm seeing this in master as well, although not in the 1.49 release. Interesting thing, it doesn't happen if the scene starts in 2D. I'll write up an issue.

[EDIT] open here: #7018

Contributor

likangning93 commented Sep 7, 2018

It's strange that the performance drops in 2D only when showing the rectangles. I only get ~20 FPS.

I'm seeing this in master as well, although not in the 1.49 release. Interesting thing, it doesn't happen if the scene starts in 2D. I'll write up an issue.

[EDIT] open here: #7018

@likangning93

This comment has been minimized.

Show comment
Hide comment
@likangning93

likangning93 Sep 7, 2018

Contributor

How hard would it be to change the center of projection? Columbus view might be useless if there is a limiting rectangle crossing the anti-meridian:

Should be pretty easy in #6986, here's something that should work. Users might have to be careful with small polygons crossing the prime meridian though:

anitimeridian

[EDIT] that is a strange looking morph

Contributor

likangning93 commented Sep 7, 2018

How hard would it be to change the center of projection? Columbus view might be useless if there is a limiting rectangle crossing the anti-meridian:

Should be pretty easy in #6986, here's something that should work. Users might have to be careful with small polygons crossing the prime meridian though:

anitimeridian

[EDIT] that is a strange looking morph

Show outdated Hide outdated Apps/Sandcastle/gallery/Geographic Limit Rectangle.html Outdated
Show outdated Hide outdated Apps/Sandcastle/gallery/Geographic Limit Rectangle.html Outdated
@@ -155,6 +159,15 @@ vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat
void main()
{
#ifdef TILE_LIMIT_RECTANGLE

This comment has been minimized.

@pjcozzi

pjcozzi Sep 10, 2018

Member

Is there a way to add a fast reject case to the vertex shader so that if the entire tile is outside the region, the vertex is moved beyond the camera like we do for billboards, etc.?

@pjcozzi

pjcozzi Sep 10, 2018

Member

Is there a way to add a fast reject case to the vertex shader so that if the entire tile is outside the region, the vertex is moved beyond the camera like we do for billboards, etc.?

This comment has been minimized.

@likangning93

likangning93 Sep 10, 2018

Contributor

It shouldn't be necessary, the limiter is tied into tileset visibility computation. Tiles completely outside bounds won't get drawn and tiles completely inside bounds won't receive shader modification.

@likangning93

likangning93 Sep 10, 2018

Contributor

It shouldn't be necessary, the limiter is tied into tileset visibility computation. Tiles completely outside bounds won't get drawn and tiles completely inside bounds won't receive shader modification.

@likangning93

This comment has been minimized.

Show comment
Hide comment
@likangning93

likangning93 Sep 10, 2018

Contributor

@bagnell @pjcozzi this is up-to-date

Contributor

likangning93 commented Sep 10, 2018

@bagnell @pjcozzi this is up-to-date

@bagnell bagnell merged commit d6ad77b into master Sep 10, 2018

5 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deployment Deployed
Details
npm package Deployed
Details
zip file Deployed
Details

@bagnell bagnell deleted the globeLimiterRectangle branch Sep 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment