{"record":{"id":"99224c0bb7261bc6","repo":"BabylonJS/Babylon.js","slug":"gaussiansplattingpartproxymesh-compound-mesh-not","errorCode":null,"errorMessage":"GaussianSplattingPartProxyMesh: compound mesh not found with ID ${parsedMesh.compoundSplatMeshId}","messagePattern":"GaussianSplattingPartProxyMesh: compound mesh not found with ID (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.ts","lineNumber":297,"sourceCode":"        serializationObject.boundingInfo = {\r\n            minimum: boundingInfo.minimum.asArray(),\r\n            maximum: boundingInfo.maximum.asArray(),\r\n        };\r\n        return serializationObject;\r\n    }\r\n\r\n    /**\r\n     * Parses a serialized GaussianSplattingPartProxyMesh\r\n     * @param parsedMesh the serialized mesh\r\n     * @param scene the scene to create the GaussianSplattingPartProxyMesh in\r\n     * @returns the created GaussianSplattingPartProxyMesh\r\n     */\r\n    public static override Parse(parsedMesh: any, scene: Scene): GaussianSplattingPartProxyMesh {\r\n        const partIndex = parsedMesh.partIndex;\r\n        const compoundSplatMesh =\r\n            (parsedMesh.compoundSplatMesh as GaussianSplattingMesh | undefined) ?? (scene.getLastMeshById(parsedMesh.compoundSplatMeshId) as GaussianSplattingMesh | null);\r\n        if (!compoundSplatMesh) {\r\n            throw new Error(`GaussianSplattingPartProxyMesh: compound mesh not found with ID ${parsedMesh.compoundSplatMeshId}`);\r\n        }\r\n        const minimum = Vector3.FromArray(parsedMesh.boundingInfo.minimum);\r\n        const maximum = Vector3.FromArray(parsedMesh.boundingInfo.maximum);\r\n        const boundingInfo = new BoundingInfo(minimum, maximum);\r\n        const vertexCount = parsedMesh.vertexCount ?? 0;\r\n        const splatsDataOffset = parsedMesh.splatsDataOffset ?? 0;\r\n        const shDataOffset = parsedMesh.shDataOffset ?? splatsDataOffset;\r\n        return new GaussianSplattingPartProxyMesh(parsedMesh.name, scene, compoundSplatMesh, partIndex, boundingInfo, vertexCount, splatsDataOffset, shDataOffset);\r\n    }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for gaussianSplattingPartProxyMesh.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterGaussianSplattingPartProxyMesh(): void {\r\n    if (_Registered) {\r","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.ts#L279-L315","documentation":"When deserializing a GaussianSplattingPartProxyMesh from a serialized scene, Parse resolves its parent compound splat mesh either from an in-memory reference or by ID via scene.getLastMeshById. It throws when neither resolves, meaning the compound mesh is missing from the scene at parse time.","triggerScenarios":"Loading a saved scene where the compound GaussianSplattingMesh was removed, renamed, or not yet (re)created; serializing only the proxy parts without the compound mesh.","commonSituations":"Partial scene snapshots, manually pruning meshes before .serialize, or loading scenes across versions where compoundSplatMeshId changed.","solutions":["Ensure the compound GaussianSplattingMesh is created/registered (added to the scene) before the proxy parts are parsed","Check that parsedMesh.compoundSplatMeshId matches a mesh present in the serialized scene data","Serialize the compound mesh alongside its proxies (or embed the direct compoundSplatMesh reference)"],"exampleFix":"// before\n// compound mesh never re-created after load\nGaussianSplattingPartProxyMesh.Parse(parsedPart, scene);\n// after\nconst compound = GaussianSplattingMesh.Parse(parsedCompound, scene);\nGaussianSplattingPartProxyMesh.Parse(parsedPart, scene); // now resolvable","handlingStrategy":"validation","validationCode":"const compound = parsedMesh.compoundSplatMesh ?? scene.getLastMeshById(parsedMesh.compoundSplatMeshId);\nif (!compound) {\n  throw new ReferenceError(`compound mesh ${parsedMesh.compoundSplatMeshId} missing before parsing parts`);\n}","typeGuard":"const compoundExists = (scene: Scene, id?: string, direct?: unknown): direct is GaussianSplattingMesh =>\n  !!direct || !!(id && scene.getLastMeshById(id));","tryCatchPattern":"try {\n  GaussianSplattingPartProxyMesh.Parse(parsedPart, scene);\n} catch (e) {\n  if (String(e).includes('compound mesh not found')) { await ensureCompoundLoaded(parsedPart.compoundSplatMeshId); retry(); }\n  else throw e;\n}","preventionTips":["Serialize compound meshes together with their proxy parts","Recreate the compound mesh before parsing parts on scene load","Validate serialized IDs against scene contents before parsing"],"tags":["serialization","gaussian-splatting","scene-loading"],"backgroundTag":"mesh-id-not-found","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}