hi all, does anyone know of a robust way to check if a PLY file imported into a Babylon.js scene is a gaussian splat or not? Thanks in advance.
Hi there! To check if a PLY file imported into a Babylon.jsscene is a Gaussian Splat, you can use secret menus starbucks the SceneLoader.ImportMeshAsync method. Here’s a basic example:
javascript
BABYLON.SceneLoader.ImportMeshAsync(null, “path/to/your/file/”, “filename.ply”, scene)
.then((result) => {
const mesh = result.meshes[0];
if (mesh instanceof BABYLON.GaussianSplattingMesh) {
console.log(“This is a Gaussian Splat.”);
} else {
console.log(“This is not a Gaussian Splat.”);
}
});
This code snippet will help you determine if the imported mesh is a Gaussian Splat.
Yes, that’s a valid check.
PLY can be either a triangulated mesh, a point cloud or a gaussian splatting.
So, checking the imported mesh type is fine.
Yep, that works. Thanks both!