I am not sure this is a bug or an issue with how I am using the nme.
I have this Node Material that animates a gaussian splat here: https://nme.babylonjs.com/#XF5R9Y#7
The issue I have is, I load my gaussian splat then edit the meshes position + rotation then edit set the gaussians material to a custom NME one (linked) that scatters all the points. The rotation is respected but the position is not, I assume it’s because I load the world matrix in the NME but I don’t know how to get and add the overrided position. The NME does edit positions of splats but not rotation that’s why I think the rotation is respected but the position is not.
// Load NME
let nodeMaterial: NodeMaterial = await NodeMaterial.ParseFromFileAsync("scatter", "/src/assets/nodeMaterialScatter.json", this.scene);
//Load Mesh
await ImportMeshAsync("/src/assets/mysplat.splat", this.scene).then(container => {
this.gaussianMesh = container.meshes[0] as Mesh;
if (this.gaussianMesh) {
//Edit mesh positions
this.gaussianMesh.position = new Vector3(0, 3.143, 0); //this could be (1000,10000,1000) and nothing would change.
this.gaussianMesh.rotation = new Vector3(0.247, 0, -0.022);
this.gaussianMesh.material = nodeMaterial;
}
}
Does anyone know if there is a way to make it so the splats position is using the meshes position or perhaps update the matrix? I’m a little out of my depth with matrix maths.