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

Black scene when heading south with custom heightmap terrain-provider #7702

Closed
tuif opened this issue Apr 2, 2019 · 9 comments · Fixed by #7769
Closed

Black scene when heading south with custom heightmap terrain-provider #7702

tuif opened this issue Apr 2, 2019 · 9 comments · Fixed by #7769

Comments

@tuif
Copy link

tuif commented Apr 2, 2019

Hello,

We use a custom terrain-provider with 65x65 heightmap data, which works perfect under 1.54 and previous. With new 1.55/1.56, the scene become black when heading south. It occurs on macOS、Android Webivew and iOS WKWebview, all platforms we could test.

Cesium 1.56 heading north
Screen Shot 2019-04-02 at 11 37 08 AM

Cesium 1.56 heading south
Screen Shot 2019-04-02 at 11 36 48 AM

Here is a minimal sandcastle example that reproduce. Please wait a few seconds for auto-rotating starting.
https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html#c=nVbNbttGEH6VhVAgVCEvJac2EkVy6yZuU8CKDdiNi0JAvSJH5sLLXWZ3KZkK9AQ99Figl75A7z31dYr0LTrLH4uiaCctDxLJnfnm95thIJgxZJJdgtaMy3OtFjwETd5PJcErUNJYnQZWaa9bvXSXjbihGliYkTFBCXixOfN9kqQzwQPiBJQUWX6TIXjMDQwJk07LewmGpzFhxr3o0mUEEiGNEgvwHGT3RcMe+qj0yQKkRXUJS1Ig0PyVtyNuueDy5iKIIIZthSuYTUAHDMO6rAntQkTMXDELesLMLULMmTDQIvMWtIW7N0rHKPCQnIAFiB9Bqwm743EafwsqBqt5cOLCQq3SuUYp6A3YE2N5jH6EpxXGtvI3Sh+/Bn4T2Zgl3sZuayooCMETo3jYI4cHvY9Jo/k3aTwDfTb/AZMF5tjmXnj9bk23ytx6KosbVHPSr5hlxwvGBZsJ8O56JOuR1VYnabCplmRFRmMyOGjCCMXCBg46Z7PHoFIZwpxLCFt8yl1vLYDXivUplfPJhNmIJmrp7TuXmmaZyWRAftLwLgWTZ6UEaI9CgCW26AHXtakQ9U7SWV22kkfaJEhV1+Zsybglc7BB5F1H1iZm6PtYUaCryKZUgvU1M2jA/+z9ao0/d+4nW/ulTRoye10nQmVjls7noO8tVCYpQ7Xs6/zQa+rV4kD2fc+lfXbsxL0CrC6+JsjHICJezvJuM0o3iRQGkZ961yXwXlKyZIic44JYlXcM2Q5tJxwbabUkOVTdg6pgtfrXhsY9wUqCupb0Gl4WYQ2ruBvkWvLQRkNHOhLlYMNdAhbjNtU4JhvY7irULgIm8LxP93sPiZzN5wYQf2/Q7/dbpEAgt6U156Bfl660gaE3mN32sxJikgrLE8Fd2PsHh7Rpbd14DiIuckq7mTp0vEfaky/dD4ZUE17XiFRU5NP4U1aurNr2VnFsfpSINZt5O7jGx7Lh5NjeIMXfVX7iPQnyp5dKWiw66Ce9yh+7PcuHOcTOtvXcJM3DLUzRgMWgGcUKvuWwrJosRKe5ZJYrObz3g+HmMZzJp3SO6/UV3GgAU1sBg8Eh/aLfI0+f0+eDHtnftEM1vpXmWMYStpbHCHc2roHtoiTccRT7ytXLJ4NnffJ5Mf7Ov6uJaSXERnFdhWfcUohBpdbDz4nxUWXOZbnmBqa6X9ahSohQwS1V8pLjHwvDfOOfchxjmO4Ky314fPjz939+++XvX3/+8NcfG3fq2HtjR5wSfiPyaOar639V4OOVuF+ijeeHKrNToXp8DxflP9awvZZttN4w1d2se+QAY3O3U9npdUbGZgKOComveJwobUmqhUcp7pw4EfhhY/xZGty6/BvjFEd+pTQK+YLwcDztNEg27ZDAfbziyRx35AVfwbRzNPJRfkvN7QNM0tkCtGCZE4kGR6fFS0rpyMfHXS2rlJgxXUP8Fw

Browser:
Safari Version 12.0.3 (14606.4.5)
Chrome Version 73.0.3683.86

Operating System:
MacOS Mojave 10.14.3<!--

Mobile:
Android Webview 70.0.3538.110
iOS WKWebview 11.x~12.x

@lilleyse
Copy link
Contributor

lilleyse commented Apr 2, 2019

@tuif this is a 1.56 regression that we have a fix open for here: #7701.

@tuif
Copy link
Author

tuif commented Apr 2, 2019

#7701 relates to changes in 1.56 comparing 1.55. The back scene aforementioned appear in 1.55.
Is it truly the problem?

@lilleyse
Copy link
Contributor

lilleyse commented Apr 2, 2019

@tuif yeah you're right, this is also a problem with 1.55. I couldn't bisect to an exact spot but I think this broke somewhere in #7061. @kring do you have any ideas?

@tuif
Copy link
Author

tuif commented Apr 3, 2019

It seems it only occurs when sky is visible. If adjusting pitch toward the ground more where the sky is invisible, everything is fine.
Is it possible that I missed something in my custom terrain-provider?

Here is the sandcastle:
https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html#c=nVbNbttGEH6VhVAgVCEvKac2EkVy6yZuU8CKDdiNi0JAvSJH5sLLXXZ3KZkK9AQ99Figl75A7z31dYr0LTrLH4uiZMcoDxLJnfnm95thKJgxZJxfgtaMy3Ot5jwCTT5MJMErVNJYnYVWaa9bv3SXjbmhGliUkxFBCXi1PvN9kmZTwUPiBJQUeXGTI3jCDQwIk07Lew2GZwlhxr3o0kUMEiGNEnPwHGT3Vcse+qj0yRykRXUJC1Ii0OKVtyVuueDy5iKMIYFNhSuYjkGHDMO6bAhtQ8TMXDELeszMLULMmDCwQ+Y9aAt375ROUOAhOQFzED+CVmN2x5Ms+RZUAlbz8MSFhVqVc61S0BuwJ8byBP2ITmuMTeVvlD5+C/wmtglLvbXdnamgIARPjeJRjxwe9D4ljebfZckU9NnsB0wWmGNbeOEF3YZunbnVRJY3qOak3zDLjueMCzYV4N31SN4jy41O0mAzLcmSDEekf9CGEYpFLRx0zuaPQWUyghmXEO3wqXB9ZwG8nVhPqZxPxszGNFULb9+51DbLTC5D8pOGnzMwRVYqgN1RCLDElj3gujYTotlJOm/K1vJImxSp6tqcLRi3ZAY2jL3r2NrUDHwfKwp0GduMSrC+ZgYN+J99WK7w58795Cu/skkjZq+bRKhtTLPZDPS9hdokZaiWf10cem29RhzIvu+5tC+OnbhXgjXFVwT5GMbEK1jebUfpJpHCIIpT77oC3ksrlgyQc1wQq4qOIZuhbYVjY60WpIBqelAXrFH/xtC4J1hFUNeSXsvLMqxBHXeLXAse2XjgSEfiAmywTcBy3GYax2QL212l2kXIBJ4HdL/3kMjZbGYA8ff6QRDskAKB3JbWnIN+W7myCwy9wezuPqsgxpmwPBXchb1/cEjb1lat5zDmoqC0m6kDx3ukPfnS/WBIDeFVg0hlRZ7Gn6pyVdU2t4pj86NEbNgs2sE1PpYNJ8fmBin/rooT71lYPL1W0mLRQT/r1f7YzVk+KCC2tq3nJmkRbmmKhiwBzShW8D2HRd1kETrNJbNcycG9Hww3j+FMPqczXK9v4EYDmMYK6PcP6RdBjzx/SV/2e2R/3Q71+FaaYxkr2EYeY9zZuAY2i5Jyx1HsK1cvn/RfBOTzcvydf9cQ00qIteKqDs+4pZCAyqyHnxOjo9qcy3LDDUx1UNWhTohQ4S1V8pLjH4uiYuOfchxjmO4ay314fPzrj39///Wf3375+Pefa3ea2HsjR5wKfi3yaObr639V4NOVuF+ireeHKrNVoWZ8Dxdlu4YHwRPEN2u5i9ZrprqbVQ9xg8DdTmSn1xkamws4KiW+4kmqtCWZFh6luHOSVOCHjfGnWXjr8m+MUxz6tdIw4nPCo9Gk0yLZpENC9/GKJzPckRd8CZPO0dBH+Q01tw8wSWdz0ILlTiTuH52WLymlQx8ft7WsUmLKdAPxPw

@tuif
Copy link
Author

tuif commented Apr 3, 2019

just tried 1.56.1, the same issue.

@kring
Copy link
Member

kring commented Apr 3, 2019

Thanks for the Sandcastle repro @tuif, huge help!

I have a fix here, but I need to consider whether it's totally the right solution before PRing it:
https://github.com/AnalyticalGraphicsInc/cesium/compare/mercator-culling

The problem is that this terrain uses the Web Mercator tiling scheme which has a single tile at the root, and OrientedBoundingBox.fromRectangle produces a rubbish bounding box for a whole-world rectangle. HeightmapTessellator guards against this (https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/HeightmapTessellator.js#L410), but in the new terrain engine that bounding box isn't used and the OBB is computed separately instead. So we were getting a bad OBB and the single root tile was getting culled.

@tuif
Copy link
Author

tuif commented Apr 3, 2019

Wow, so quick response. Hope it could be fixed in the next release!

@hpinkos
Copy link
Contributor

hpinkos commented Apr 23, 2019

@kring will you be able to have a fix for this before the next release?

@tuif
Copy link
Author

tuif commented Apr 30, 2019

Thank you all. Look forward to the next release.

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

Successfully merging a pull request may close this issue.

4 participants