-
Notifications
You must be signed in to change notification settings - Fork 302
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
OGC3DTilesLayer loading 3dtiles model position adjustment and scaling adjustment? #2406
Comments
Are you using OGC3DTilesLayer to load it ? view.addLayer(layer).then((layer) => {
layer.object3d.position.set( X, X, X );
layer.object3d.updateMatrixWorld( true );
}) |
export function add3dTilesData(view) { const layer = new itowns.OGC3DTilesLayer('3DTiles', { // Add the layer to our view |
You need to set the layer position in the same coordinate system as the view (that you can access with
|
@liangyuan1 have you been able to test the solution from my previous comment ? |
<title>Itowns - 3D Tiles loader</title>
|
@jailln https://github.com/hiwxy95/Hanged-brother.git ,3dtiles model |
@liangyuan1 I managed to display it: There was three reasons why it was hard to see your tileset:
You can comment these lines to remove the terrain (or update the altitude of your model, similarly to what is done here)
Note that the
|
@jailln Thank you very much, but I still want to modify the model position. I tried using the following code, but I was not successful. In addition, how to automatically locate the model after I modify the model position? I don't quite understand what you said about Box3. setFromObject. Can you provide a demo? Thank you codeconst source = new itowns.C3DTilesSource({
|
Manual modeling of data fbx is required to slice and convert it into 3dtiles. Use cesiumLab (download link: https://www.bjxbsj.cn/downcenter.html )This tool can be converted to 3dtiles1.1 (gltf) and 3dtiles1.0 (b3dm), where 3dtiles1.1 cannot load with an error message, while 3dtiles1.0 can load normally, but cannot change the model display position and scaling ratio as Cesium does, resulting in incorrect model position and scale after loading. What do I need to do to correctly place the model in the specified position(需要人工建模数据fbx 进行切片转化成3dtiles。使用cesiumLab(下载地址:https://www.bjxbsj.cn/downcenter.html),该工具可以转成3dtiles1.1(gltf)和3dtiles1.0(b3dm),其中3dtiles1.1无法加载报错,3dtiles1.0可以正常加载,但是无法像cesium加载完成更改模型显示位置和以及缩放比例,导致我加载后的模型位置和比例不对,我需要怎么做可以正确放到指定位置上)
##result
The text was updated successfully, but these errors were encountered: