BabylonJS/Babylon.js · error

GaussianSplattingPartProxyMesh: compound mesh not found with

Error message

GaussianSplattingPartProxyMesh: compound mesh not found with ID ${parsedMesh.compoundSplatMeshId}

What it means

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.

Source

Thrown at packages/dev/core/src/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.ts:297

        serializationObject.boundingInfo = {
            minimum: boundingInfo.minimum.asArray(),
            maximum: boundingInfo.maximum.asArray(),
        };
        return serializationObject;
    }

    /**
     * Parses a serialized GaussianSplattingPartProxyMesh
     * @param parsedMesh the serialized mesh
     * @param scene the scene to create the GaussianSplattingPartProxyMesh in
     * @returns the created GaussianSplattingPartProxyMesh
     */
    public static override Parse(parsedMesh: any, scene: Scene): GaussianSplattingPartProxyMesh {
        const partIndex = parsedMesh.partIndex;
        const compoundSplatMesh =
            (parsedMesh.compoundSplatMesh as GaussianSplattingMesh | undefined) ?? (scene.getLastMeshById(parsedMesh.compoundSplatMeshId) as GaussianSplattingMesh | null);
        if (!compoundSplatMesh) {
            throw new Error(`GaussianSplattingPartProxyMesh: compound mesh not found with ID ${parsedMesh.compoundSplatMeshId}`);
        }
        const minimum = Vector3.FromArray(parsedMesh.boundingInfo.minimum);
        const maximum = Vector3.FromArray(parsedMesh.boundingInfo.maximum);
        const boundingInfo = new BoundingInfo(minimum, maximum);
        const vertexCount = parsedMesh.vertexCount ?? 0;
        const splatsDataOffset = parsedMesh.splatsDataOffset ?? 0;
        const shDataOffset = parsedMesh.shDataOffset ?? splatsDataOffset;
        return new GaussianSplattingPartProxyMesh(parsedMesh.name, scene, compoundSplatMesh, partIndex, boundingInfo, vertexCount, splatsDataOffset, shDataOffset);
    }
}

let _Registered = false;
/**
 * Register side effects for gaussianSplattingPartProxyMesh.
 * Safe to call multiple times; only the first call has an effect.
 */
export function RegisterGaussianSplattingPartProxyMesh(): void {
    if (_Registered) {

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Ensure the compound GaussianSplattingMesh is created/registered (added to the scene) before the proxy parts are parsed
  2. Check that parsedMesh.compoundSplatMeshId matches a mesh present in the serialized scene data
  3. Serialize the compound mesh alongside its proxies (or embed the direct compoundSplatMesh reference)

Example fix

// before
// compound mesh never re-created after load
GaussianSplattingPartProxyMesh.Parse(parsedPart, scene);
// after
const compound = GaussianSplattingMesh.Parse(parsedCompound, scene);
GaussianSplattingPartProxyMesh.Parse(parsedPart, scene); // now resolvable
Defensive patterns

Strategy: validation

Validate before calling

const compound = parsedMesh.compoundSplatMesh ?? scene.getLastMeshById(parsedMesh.compoundSplatMeshId);
if (!compound) {
  throw new ReferenceError(`compound mesh ${parsedMesh.compoundSplatMeshId} missing before parsing parts`);
}

Type guard

const compoundExists = (scene: Scene, id?: string, direct?: unknown): direct is GaussianSplattingMesh =>
  !!direct || !!(id && scene.getLastMeshById(id));

Try / catch

try {
  GaussianSplattingPartProxyMesh.Parse(parsedPart, scene);
} catch (e) {
  if (String(e).includes('compound mesh not found')) { await ensureCompoundLoaded(parsedPart.compoundSplatMeshId); retry(); }
  else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: Partial scene snapshots, manually pruning meshes before .serialize, or loading scenes across versions where compoundSplatMeshId changed.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/99224c0bb7261bc6. Report an issue: GitHub.