-
Notifications
You must be signed in to change notification settings - Fork 329
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
Tilted 3D view corrections for 2D sync #24
Comments
When internally discussing this in Klokan Technologies team, we come up with a possible simple solution by implementing "Quarter Screen Picking Correction". See this recording: http://youtu.be/cVqFrHJ6EX0 and the red dot which is preserved (in first implementation). The idea is that instead of synchronizing the 2D map on center we will synchronize it on a lower quarter of the 3D screen where we will move the picking point. To display a correct center in 2D the correction may be made by shifting back in 2D for a quater of height of window in pixels. See this recording: http://youtu.be/nKWjISp5blg for the above resolution degradation issue and a possible solution with "Quarter Screen Picking Correction". Comments on this approach and suggestions for alternative corrections algorithm from C2C team would be very welcome. We need a consensus on this and an approval that this is the right solution which should be implemented (as a time consuming correction of interaction algorightms are required). |
This solution seems to me a clear improvement over the current state. I would suggest creating a pull request so that we clone it and test. |
@gberaudo there is pending invitation on your github account for getting access to klokantech/ol3-cesium since the last week. The code of the demo is in our private branch "quarter". The above is a proof-of-concept - not ready to be merged, not ready to be code reviewed really, a fully bidirectional correct 2D-3D sync may need new or improved sync equations. The approach implemented now in master is exactly as specified in #9 for the initial implementation. This ticket is calling for an improvement - something extra on top of what was promissed. I think the biggest idea on the "Quarter Screen Picking Correction" above was to try to make the 2D shift by pixels, instead of tring to solve everything directly in geo coordinates and 3D, which would require at least two pickings or more for each frame and more complicated math. This 2D pixel shift approach could be improved further or denied if unsolvable problems appear. There is a lot of open questions here and no clearly described target we want to reach - and also no budgeted development time (at least on our side). Is there a 2D-3D side-by-side view reliably and "correctly" implemented somewhere? It is not always clear what is really "correct" in certain situations with terrain turned on and tilted camera. |
@klokan there is no trace of the invitation in my mailbox. Please try resending the invitation. |
Resent. Check your SPAM folder on the email address you have on GitHub. |
It working now, thanks. It was an issue with my email address. |
Hello, I was curious about the status of this idea, I've got some time and would love to assist on the math of sync'ing up the 2 views. Let me know if this is still on your guys radar. Thanks and take care. |
Hi @laterdude, thanks for proposing your help. It would be awesome to see experiments on these ideas. Have you compiled and run the code already? Did you look at the |
Actually I've struggled to build the code, I've been working on windows 7 machine on a United States Forest Service computer network, and though I've got ant and the gnu make binaries loaded up, for some reason mingw isn't playing nice with some old installations. I was going to try and build it with cygwin this weekend though. I ended up just using the zipped file for the project I'm working on for the wildland firefighting program. Anyway, yes, I would appreciate any background on the code, is the camera.js file where most of the relevant code lives? I looked deeper into klokan's work on it yesterday evening and was going to check out esri's implementation this week, I'm not sure if their latest arcgis setup provides a similar side-by-side view option, but if so I'd like to see how it compares and try to get a sense of the transformations they might be utilizing. |
OL3-Cesium compiles on GNU/Linux and has been known to work on Mac. However, it has never been tested on Windows. The quickest option may be to run the compilation and developer server inside an Ubuntu VM. The camera.js file is where the computations occur. You may want to start with the two high level functions Don't hesitate to share your findings about how ESRI is hadnling this, if it does. |
Thanks for the tip, I'll give cygwin a try tomorrow am and if it's a no-go in the meantime here's this: can't find the camera tilt yet: https://developers.arcgis.com/javascript/latest/sample-code/views-synchronize/index.html On Tue, May 24, 2016 at 2:26 PM, gberaudo notifications@github.com wrote:
|
Thanks for the information @laterdude. I tried your link, you can tilt using the mouse right button. |
It seems to follow the same behavior on zoom out as ol3cesium, ie, when On Wed, May 25, 2016 at 1:24 AM, gberaudo notifications@github.com wrote:
|
There are several ways to zoom in and out in 3D.
Using the right button, the target is chosen (point clicked of the globe) when you click and thus you should go and come back at the same position. The camera should travel along a line going from the camera position to the target point. Using the mouse wheel, the target is chosen at each elementary move of the wheel. The target point is probably taken by Cesium to be the center of the screen and the movement is a succession of segments of different directions. This is a bit complex and should be fixed / improved in Cesium itself. I agree with you it would be a great improvement. On the other hand, when you zoom in/out in the 2D OpenLayers map then it is only OL3-Cesium code. |
If the view is tiled substantially, then the center point of screen is not anymore an ideal center of synced 2D view.
This means we may see a completely different things in 2D then we see in 3D. A general perfect solution is not known (to me), but this ticket may try to find one good enough for now.
Related: because the resolution for 2d view is calculated from the center point of screen where interaction happens as well, there may be an (expected) issue with synchronization of the view and resolution calculation without moving the center. The worst case scenario is visible here:
The text was updated successfully, but these errors were encountered: