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

Toggling Orthorgraphic can break everything #8346

Closed
mramato opened this issue Nov 1, 2019 · 5 comments · Fixed by #8850
Closed

Toggling Orthorgraphic can break everything #8346

mramato opened this issue Nov 1, 2019 · 5 comments · Fixed by #8850

Comments

@mramato
Copy link
Contributor

mramato commented Nov 1, 2019

  1. Run http://localhost:8080/Apps/Sandcastle/index.html?src=Projection.html&label=All
  2. Without moving the camera, toggle to Perspective view
  3. Without moving the camera, toggle back to Orthographic
  4. Everything is terrible:

image

Moving the camera doesn't fix anything at this point. However if you do move the camera between steps 2/3 everything seems to be fine.

@lilleyse any ideas? I don't think this is a showstopper, but seems like something we should fix soonish.

@lilleyse
Copy link
Contributor

lilleyse commented Nov 6, 2019

For me step 3.5 is to right-click and zoom outward. That's when the milk truck becomes visible again and starts to show the problems.

This doesn't seem to be a problem when log depth is disabled.

@OmarShehata
Copy link
Contributor

This was reported on the forum today, although a slightly different issue that I think is related. If you toggle orthographic -> perspective -> back to othrographic, you get this:

image

This almost looks like the camera has zoomed out into space and is rendering the globe incorrectly, but if you use the geocoder to fly anywhere, you'll see the camera actually hadn't moved from its original place, the view gets fixed when the camera starts to fly.

@UniquePanda
Copy link
Contributor

UniquePanda commented Jan 30, 2020

Thanks for bumping from my forum post, Omar :)

Something I can add from my investigations on this:
My initial problem (before I encountered what Omar described above in the sandcastle) was, that a 3DTile (a point cloud) disappeared when the camera switched to orthographic frustum.
I found out that many times (although not always unfortunately) a call to "pick()" can make the point cloud appear again. E.g. a call like that:
viewer.scene.pick(new Cartesian2(0, 0), 1, 1);

From looking at the code my guess was that it had something to do with the clearing of the frame- or depthbuffer but I didn't manage to extract the correct code for making the point cloud appear again without all of the unnecessary picking ^^

But as I said this seems to not always help, because a colleague of mine managed to let the point cloud disappear again even with the added pick call.

And another addition..
Often I had the following case:

  1. Switch to orthographic -> point cloud disappeared
  2. Do the pick call/move the camera -> point cloud appeared again
  3. Switch to perspective -> everything fine
  4. Switch back to orthographic -> everything still fine

So it looks like something got "fixed" in step 2 so that even for consecutive switches to orthographic frustum everything worked again.

And sometimes I had no problem at all when switching to orthographic. I think it depended on the camera angle.

@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/d/msg/cesium-dev/8KFNqzbSc9I/RGixiWo9AgAJ

If this issue affects any of these threads, please post a comment like the following:

The issue at #8346 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https:/AnalyticalGraphicsInc/cesium.

@OmarShehata
Copy link
Contributor

Posted an update that this issue has been fixed on the forum: https://community.cesium.com/t/switch-to-orthographic-camera-breaks-rendering/9036/2

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.

5 participants