Skip to content

Validation: check convex-hull vertex count per collider (engine budget check) #666

Description

@Weisl

Context

check_triangle_count in validation/checks.py checks whole-collider triangle count against a configurable threshold, but the actual limits engines enforce on convex colliders are per-hull vertex counts, not triangle counts:

  • Unity: convex MeshCollider is capped at 255 vertices per hull; exceeding it silently produces a simplified hull.
  • Unreal: practical/recommended cap is roughly 8-32 verts per convex hull; exceeding it gets re-simplified by the importer in engine-chosen ways.

Neither is currently caught by validation — a collider can pass all existing checks and still blow an engine's real import-time budget.

Proposal

Add a new validation check (alongside the existing checks in validation/checks.py, e.g. check_convex_hull_vertex_count) that flags colliders whose convex hull vertex count exceeds a configurable threshold, following the same pattern as check_too_many_colliders / check_triangle_count (numeric threshold in Preferences > Validation tab, surfaced in the Validation results UIList).

Out of scope for a first pass: auto-deriving the default threshold from the active naming preset (Unity-default -> 255, UE-default -> ~32) - worth a follow-up once the base check exists, not a blocker for it.

Acceptance criteria

  • New check appears in Validation panel results with a clear message (e.g. "N verts (limit M)"), same style as existing checks.
  • Threshold is configurable in Preferences, matching the existing validation threshold pattern.
  • Test coverage alongside existing validation check tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions