-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
ColladaLoader object position/center swapped values #24289
Comments
Consider to use glTF instead which is the better choice compared to Collada (and OBJ). More information about this topic in the following guide: https://threejs.org/docs/index.html#manual/en/introduction/Loading-3D-models
Sounds like an issue in context of the up-vector of your models. Do you mind sharing one of the Collada files in this thread? I could imagine that the error goes automatically away when using glTF (since it only supports Y-up). |
@Mugen87 Interesting, so it might be a bug in blender or archicad export. I would have thought the position info is 0 anyway for all objects and calculated by the loader/ThreeJs. Thats the current model: Thanks for your fast help dude, love the library and constant maintain, its great although it took a while to make all the beginner mistakes and im not yet at the end :D |
@Mugen87 So I swapped back to gltf and at least the export from blender does work well with it, GLB handles some things different but I will have a look if it is an issue for me. Also here with glb file and GLTFLoader the coordinates are correct. I updated the file on the server with the current state. |
After reading some issues and PRs I remember that we've decided not to add a real up-axis conversion to The loader just rotates the entire asset to display it correctly. However, the coordinates are of course not "as expected". In other words, this issue is not going to be fixed in the loader. You have to perform the axis conversion when exporting to Collada. However, I recommend not doing this but keep using glTF even if that means you have to change your workflow. But you definitely end up with the better solution. |
Alright got you, thanks for pointing that out and for your help. Unfortunately you dont always search for the right things to find an existing issue. I presented the project in my university in Stuttgart today and it worked well with GLB. Schöne Grüße und vielen Dank 😉 |
Maybe we should add a warning in the console when we do that? |
Yeah, that would help to avoid confusion. I'm struggling a bit with the wording though^^. How about:
|
@Mugen87 That sounds good 👍 |
Context: Im programming a 3D Room Search PWA for my university
Describe the bug
I was moving from OBJLoader to ColladaLoader and recognized, that my added Labels from CSS2DRenderer had wrong positions when they are correct in the OBJ file.
To Reproduce
Steps to reproduce the behavior:
Code
Context: the function creates a tooltip to show the room number linked as a label to the position above the searched room in my scene.
Simple Loader:
Live example
Expected behavior
Same position calculation with the other loaders (tested with OBJLoader and Rhino3dmLoader).
I havent seen an obvious issue in the position of ColladaLoader code on a quick look so I guess the swapped values are in the getCenter, boundingBox or geometry.
Screenshots
Big PointLightHelper is 0,0,0 (Ground Zero, initial position) - small PointLightHelper is 21, 76, 10 (the collada room center -> wrong!) - tooltip + PointLightHelper is 21, 10 , 76 (if changed values correct position)
Platform:
The text was updated successfully, but these errors were encountered: