Skip to content

Validation: collider volume vs. source-mesh volume sanity check #671

Description

@Weisl

Context

Cross-engine research (Unity/Unreal/Godot official docs) found that authored collider volume/shape has real, documented simulated-physics consequences beyond collision detection, in all three target engines:

  • Unreal computes simulated mass directly from collider volume: Physical Material Density (g/cm³) x the simple collision shape's volume = mass, by default (Override Mass available to bypass this).
  • Unity and Godot keep mass manual, but both auto-compute center of mass and/or inertia tensor from the actual attached collider geometry by default - affecting tumbling, toppling, and torque-response realism even though raw mass doesn't change.

This means a degenerate or badly-fitted collider (e.g. a leftover default box, or a failed decomposition that produced something wildly oversized/undersized relative to the source mesh) doesn't just collide wrong on import - in Unreal it gives the object the wrong simulated weight, and in Unity/Godot it skews computed inertia/center of mass.

Nothing in the addon currently checks for this class of problem - existing validation checks (check_triangle_count, check_too_many_colliders, etc.) don't compare a collider's volume to the render mesh it's meant to represent.

Proposal

Add a new validation check (alongside the existing checks in validation/checks.py) that compares a collider's volume against its source render mesh's own bounding/convex-hull volume, flagging results outside a reasonable configurable ratio (e.g. more than Nx larger or smaller). Natural sibling to #666 (convex-hull vertex-count validation).

Acceptance criteria

  • New check appears in Validation panel results with a clear message (e.g. "collider volume is Nx [larger/smaller] than source mesh").
  • Ratio 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