Skip to content
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

3d model not rotating properly #65

Closed
aakashpdrl opened this issue Aug 2, 2022 · 4 comments
Closed

3d model not rotating properly #65

aakashpdrl opened this issue Aug 2, 2022 · 4 comments

Comments

@aakashpdrl
Copy link

aakashpdrl commented Aug 2, 2022

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/three@0.137.0/examples/js/libs/draco',
basisTranscoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/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);

}

@Avnerus
Copy link
Collaborator

Avnerus commented Aug 2, 2022

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.

@aakashpdrl
Copy link
Author

aakashpdrl commented Aug 12, 2022

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.

@Avnerus
Copy link
Collaborator

Avnerus commented Aug 21, 2022

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!

@Avnerus
Copy link
Collaborator

Avnerus commented Sep 7, 2022

Closing this due to inactivity. Feel free to reopen as needed.

@Avnerus Avnerus closed this as completed Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants