Giter VIP home page Giter VIP logo

google-earth-as-gltf's People

Contributors

omarshehata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

google-earth-as-gltf's Issues

Georeferenced glTF tiles?

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.

image

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?

https://github.com/OmarShehata/google-earth-as-gltf/blob/765470cf359dce680ccc6b7e58f3c958cd4be755/simple-node-example/fetch-tiles.js#L64C1-L65C1

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!

Fully normalize geometry instead of putting all tiles in a container

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:

const box = new THREE.Box3().setFromObject(tilesContainer)

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

Demo not working

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..."

Normalize glTF's without ThreeJS

The simple NodeJS example fetches glTF tiles but does not normalize them:

// TODO: these glTF's are in ECEF coordinates

currently, the Viewer.js normalizes the geometry with ThreeJS (by adding a container on top and re-exporting the scene as a glTF). See:

const box = new THREE.Box3().setFromObject(tilesContainer)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.