Skip to content

Character collision: generate capsules per vertex/weight group #678

Description

@Weisl

Summary

Add a way to generate capsule colliders for rigged characters driven by vertex/weight groups (e.g. one capsule per bone's weight group), rather than only the existing whole-object/selection-based capsule generation (collider_shapes/add_bounding_capsule.py).

Motivation

Characters are typically already weight-painted per bone for skinning. Reusing those weight groups to auto-generate a capsule per group would give a quick per-limb/per-bone collision rig without manually selecting geometry per bone.

Rough idea

  • For each vertex group (or a user-selected subset) on the mesh, isolate the weighted vertices and fit a capsule to that subset, similar to how the current capsule fit works on a full object/selection.
  • Likely wants to reuse the armature/bone data (group name <-> bone name convention) to orient the capsule along the bone rather than purely from vertex distribution, though a vertex-distribution-only fit may be a reasonable first pass.

Open questions

  • Naming/parenting convention for the generated capsules relative to bones (parent to bone vs. object, existing collider naming scheme in collider_conversion/regenerate_name.py).
  • How to handle vertex groups with very low/zero total weight or that don't correspond to a bone.
  • UI: batch-generate for all groups vs. per-group operator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions