-
Notifications
You must be signed in to change notification settings - Fork 216
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
Incorrect bounding box using the threejs scene #351
Comments
We have a solution for this, with the latest update const viewer = new GaussianSplats3D.DropInViewer({
...
});
viewer.addSplatScene(...);
const bounds = viewer.splatMesh.computeBoundingBox();
const size = bounds.getSize(new THREE.Vector3()); // Y being the full height of the bounds
const center = bounds.getCenter(new THREE.Vector3());
const lowerBottom = new THREE.Vector3(center.x, center.y - (size.y / 2), center.z); // This is the lowest bounds in the center of the object |
Hi @Patrick-van-Halm-360Fabriek, thank you very much, im actually trying this right now. const bounds = this.viewer.splatMesh.computeBoundingBox(); Using the code below to render the bounds i get this as a result. Maybe is it related to the scale of the splat? |
I don't know if the Box3Helper does fully work with the splat Bounds. Maybe @mkkellogg could join in with the specific information about it. |
Hi Mark, im trying to setup a mesh to put under the bottom of a splat.
The best way to achieve that is to calculate the lower bottom using the bounding box, whatever method i try i cant retrieve the correct coordinates for the box.
Any suggestions?
Thank you in advance
The text was updated successfully, but these errors were encountered: