omarshehata / google-earth-as-gltf Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hey Omar
This is some really neat work! I've been having a lot of fun trying out renders using these gltf 3d tiles. I have been trying hard to figure out a way to "place" this gltf in the correct place. In the software i use right now i load a normal XYZ layer as basemap and then manually place the glTF model on top, then adjust it manually one by one to try and make it fit - however this takes a long time to do, and never really fits perfectly, see pic.
Do you have any clues as to how i could solve this? I see that we send the viewport as a request to the google 3d tiles, but after they are loaded with loaders.gl and then exported i guess we "lose" the coordinates?
Is this what you mean on this line about normalizing it?
As you can probably hear, i'm not really sharp on 3d tiles and these kinds of formats - but i feel like what im trying to do should be possible in an easier way lol. Basically just to load the gltf model and get it correctly placed!
Right now the code normalizes the tiles by putting them all inside a top level container. So the individual glTF tiles may have a translation of X, Y, Z, and the top level container has negative X,Y,Z.
This happens here:
google-earth-as-gltf/src/Viewer.js
Line 73 in 3ca2548
it would be cleaner to process the geometry itself so it is translated/scaled without having a hierarchy that just reverses the translation. This would make it easier to work with in Blender or build other transformations/manipulations at runtime
It always comes up with this error. I created an API key and clicked on the Fetch files button.
Error:
"Fetching...
Fetching tiles at (40.6892 -74.0445, 17, sse: 8)
Failed to fetch 3D Tiles! Error: Error: Failed to fetch resource https://tile.googleapis.com/v1/3dti..."
The simple NodeJS example fetches glTF tiles but does not normalize them:
currently, the Viewer.js normalizes the geometry with ThreeJS (by adding a container on top and re-exporting the scene as a glTF). See:
google-earth-as-gltf/src/Viewer.js
Line 73 in 3ca2548
It would be nice to support a pure JS way of normalizing & re-orienting so it can be easily ported to other engines as example code for anyone who is trying to use the API in their own engine/framework
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.