three-loader-3dtiles
three-loader-3dtiles copied to clipboard
3d model not rotating properly
I have 3d tileset data (tileset.json),I am loading this tiles into three js scene using three-loader-3dtiles. it loads properly but its rotation is not working properly, can anybody help in this ? I attached code snippet for the same.
const result = await Loader3DTiles.load(
{
url: ./tiles/pointcloud/tileset.json
,
renderer: renderer,
options: {
dracoDecoderPath: 'https://cdn.jsdelivr.net/npm/[email protected]/examples/js/libs/draco',
basisTranscoderPath: 'https://cdn.jsdelivr.net/npm/[email protected]/examples/js/libs/basis',
pointCloudColoring: PointCloudColoring.RGB,
shading:Shading.ShadedNoTexture,
maximumScreenSpaceError: 6
}
}
);
console.log(result)
const {model, runtime} = result;
model.rotation.set(-Math.PI / 2 , 0 ,0);
tilesRuntime = runtime;
scene.add(model);
}
Hi @aakashpdrl!
What tool did you use to create the tileset?
Are you perhaps seeing a warning on the console related to a bounding box of type region
?
If so, rotation is not yet supported on such tilesets. I have an open issue in loaders.gl regarding the matter.
Hello @Avnerus, Thanks for the reply, I opened the same issue on the stack overflow, all necessary data provided with this https://stackoverflow.com/questions/73194732/3d-model-not-rotating-properly-in-threejs please refer.
Hi! Sorry for the delay in answering this. I am not sure if I can spot the problem in the rotation in the video. Are you not able to rotate the model to the correct angle for it to appear as in the demo? PS. You can use this tool to convert Entwine tiles to 3D Tiles, but I am not sure if you would get a better result. Which tool did you use to generate the current tileset? Thanks!
Closing this due to inactivity. Feel free to reopen as needed.