-
Notifications
You must be signed in to change notification settings - Fork 65
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
how to get ground point? #174
Comments
Hi Kieran! I have also noticed an offset in my tests, but where I was looking it was Sorry that we will not be able to allocate time to research this further, at least in the coming month, but PRs are welcome if you find a solution! |
We did a first attempt for raycasting method. We were able to get the (a-frame managed) raycaster to successfully intersect with other object3d's on the scene, however it does not appear to emit an intersected event for 3d tiles rendered from this library. Are there any examples you're aware of for successful THREE.Raycaster intersection against 3d tiles? Here is a quick video of the attempt showing raycaster events for a box geometry but not the 3dtiles: Here is a link to the WIP raycaster demo that does not work yet... related: #97 |
I did run raycasting on the tileset before but I don't have any public example right now. |
@Avnerus you're 100% correct, I dove deep into that last night and will need to adjust the default a-frame raycaster component behavior to collide with the tiles, but it seems feasible. Therefore a PR it will likely be an a-frame loader specific but happy to share |
Hi, great! |
We now have a basic working solution 3DStreet/aframe-loader-3dtiles-component@f59bedf This uses a raycaster with the camera pointing down above the ground and waits a few seconds for the scene to load. It's brittle but it works as a first version. video1 tileset-height1-1080p.movvideo2 tileset-height2-1080p.mov |
Looks great! Maybe this could be integrated to the a-frame component? |
@Avnerus yes we are already adding to our forked a-frame loader repo which still has MIT license and you are always welcome to merge back to your org (it's all here) but I hesitate to suggest anyone else use this as it's not reliable due to lack of control or awareness of state of target tile loading (1) and requires taking control of the camera (2) (1) Right now we just wait x seconds until to assume the target center tile at origin is loaded at its highest LOD quality level. But often this fails due to internet connection speeds and will often trigger raycast at a low LOD which will result in incorrect ground location. I noticed in another thread there is a contentPostProcess but it's not clear how to target that better, such as listening for tile covering a specific origin point (0,0,0) or its state of loading level of detail in order to trigger a raycast for ground point. (Separate but related, sometimes tiles just don't load without any error message or any other indication, there is a general "invisibility" to the state of tiles that makes me uncomfortable but I don't know of any other easy solution for now.) (2) We also have to "take over" the camera during this ground raycasting so that we are aiming the camera at 0,0,0 from above (but not too far above or it's too low LOD!) therefore ensuring that the tiles are being loaded in the origin. In theory this could be fixed by assigning an inactive camera to the tiles to use as its frustum instead of the visible one, but that's another three.js side quest that I don't have time for. For our app we are planning on following UX flow to "paste over" these issues:
Would love any suggestions on how to better handle (1). I'm okay with accepting the reality of (2) for now. |
I'm going to close this thread. Here were the 2 solutions we found First we tried using the raycaster method with a proof of concept demo, but this was unreliable because the value changes depending on camera position and tile loading state We ended up creating a cloud function to find geoid height for given long/lat and then calculate ellipsoidal height which is needed by google 3d tiles "height" property to achieve 0 elevation at 0 0 0 scene origin 3DStreet/3dstreet#720 it seems to work with ~1m accuracy. |
We are encountering a challenge of helping users initialize google 3d tiles at the correct elevation.
We get elevation from this service from google which appears to be relative to mean sea level, and not actual elevation: https://developers.google.com/maps/documentation/javascript/reference/elevation#ElevationResult
We cannot get this
elevation
value to match reliably withheight
from this library as their relationships seems to vary across different longitudes and latitudes.More details: 3DStreet/3dstreet#655
Possible solutions that we could use help with:
height
of this library?The text was updated successfully, but these errors were encountered: