3DTilesRendererJS
3DTilesRendererJS copied to clipboard
3DTilesRenderer: Consider a utility function to center & orient tileset
Hi, I'm trying to use this library to load 3dtiles, yet I found it doesn't work for some tilesets. The oob.inFrustum always return false for some root tiles. I've made a jsfiddle listing some of the tilesets I've tested, hope you can help me with this issue. You can simply uncomment lines for tileset url to switch tileset.
Thank you
https://jsfiddle.net/skywalkershen/8k74vsf9/2/
Hi, I noticed it should be caused by the root transform of the tileset. If a transform matrix is provided, it will be multiplied to the bbox, link: https://github.com/NASA-AMMOS/3DTilesRendererJS/blob/a25bb252e0bf316e673e8ca38574b7a58d7da841/src/three/math/TileBoundingVolume.js#L239-#L246
Is it possible to provide a param to control whether to use the root transform? like: https://github.com/ebeaufay/threedtiles/blob/05d741f53420bd7fc4d4a159f7f7398b4dd06313/src/tileset/OGC3DTile.js#L35 https://github.com/ebeaufay/threedtiles/blob/05d741f53420bd7fc4d4a159f7f7398b4dd06313/src/tileset/OGC3DTile.js#L219-#L223
Thank you.
Do you have any suggestions on API?
This sounds similar to the setLatLonToYUp function. I'm wondering if something like a .recenter
function would be good - or a .orientLatLonNormalUp
function to handle cases where the a building tileset would be oriented strangely due to its lat / lon position.
Haven't touched the function you mentioned. Currently I'm only considering use a boolean param to ignore the transform when calculating bbox. I'll look into the source code, and maybe come back with a pr.