FyroxEngine/Fyrox · warning

More than two geoms with blend shapes?

Error message

More than two geoms with blend shapes?

What it means

When converting an FBX model to a Fyrox mesh, blend shape data is collected per geometry. The converter only supports blend shapes coming from a single geometry per model; if a second (or later) geom also has blend shapes, the previous set is overwritten and this warning is logged, meaning some blend shape data will be lost.

Solutions

  1. In the DCC, merge the geometries into a single mesh before FBX export so blend shapes live on one geom
  2. Remove blend shapes from all but one geometry of the model
  3. Split the model into separate Fyrox meshes if multiple blend-shape meshes are truly needed

Example fix

// before: model with geom A + geom B, both with blend shapes
// after: in Blender/Maya join geoms into one mesh, keep all shape keys there, re-export FBX
Defensive patterns

Strategy: fallback

Validate before calling

// pre-import check on the FBX
let geoms_with_bs: Vec<_> = model.geoms.iter()
    .filter(|g| fbx_scene.get(**g).as_mesh_geometry().unwrap().collect_blend_shapes_refs(fbx_scene).map_or(false, |b| !b.is_empty()))
    .collect();
debug_assert!(geoms_with_bs.len() <= 1, "multiple geoms with blend shapes will lose data");

Prevention

When it happens

Trigger: FBX import (FbxModel resource conversion, convert_mesh) where more than one mesh geometry attached to a model references blend shape deformers.

Common situations: DCC exports (Maya/Blender) that split one mesh into multiple geometries each carrying morph targets; FBX files merged from multiple sculpted meshes.

Related errors


AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10). Data as JSON: /api/errors/a8510d397cf61cee. Report an issue: GitHub.

Appendix: source

Thrown at fyrox-impl/src/resource/fbx/mod.rs:513

        * Matrix4::new_nonuniform_scaling(&model.geometric_scale);

    let mut temp_vertices = Vec::new();
    let mut triangles = Vec::new();

    // Array for triangulation needs, it will contain triangle definitions for
    // triangulated polygon.
    let mut face_triangles = Vec::new();

    let mut mesh_surfaces = Vec::new();
    let mut mesh_blend_shapes = Vec::new();

    for &geom_handle in &model.geoms {
        let geom = fbx_scene.get(geom_handle).as_mesh_geometry()?;
        let skin_data = geom.get_skin_data(fbx_scene)?;
        let blend_shapes = geom.collect_blend_shapes_refs(fbx_scene)?;

        if !mesh_blend_shapes.is_empty() {
            Log::warn("More than two geoms with blend shapes?");
        }
        mesh_blend_shapes = blend_shapes
            .iter()
            .map(|bs| BlendShape {
                weight: bs.deform_percent,
                name: bs.name.clone(),
            })
            .collect();

        let mut data_set = vec![
            FbxSurfaceData {
                base_mesh_builder: if geom.deformers.is_empty() {
                    FbxMeshBuilder::Static(RawMeshBuilder::new(1024, 1024))
                } else {
                    FbxMeshBuilder::Animated(RawMeshBuilder::new(1024, 1024))
                },
                blend_shapes: blend_shapes
                    .iter()

View on GitHub (pinned to 76c91aad8e)