Skip to content

SoftBody3D editor gizmo does not highlight pinned points correctly #108149

Open
@simpkins

Description

@simpkins

Tested versions

  • Reproducible in 4.5-beta1 and earlier versions

System information

Windows 11

Issue description

When editing a SoftBody3D, the editor gizmo shows handles at each mesh vertex. Clicking on one of these handles is supposed to pin the point, and then show it highlighted in blue. However, depending on the mesh it usually does not highlight the pinned vertices correctly.

The problem appears to be that the editor gizmo draws one handle per vertex in the rendered mesh, and not one handle per physics vertex. In most meshes, there are many render vertices at the same coordinates (just with different normals and UV coordinates from one another).

For instance, consider the following mesh:

Image

This BoxMesh has 24 vertices: there are 3 vertices at each corner of the cube, since each face has a different normal. However, from a physics perspective the soft body only has 8 vertices that get simulated.

The editor is showing 24 separate handles here, and is displaying 3 separate handles on top of each other at each corner. When you click on a handle it attempts to render it in blue, but in practice one of the non-highlighted handles usually renders on top of it, so you can't tell that it is highlighted.

The soft body gizmo seems like it should be fixed to only display 8 handles in this case, so it can correctly display which handles should be highlighted. (In practice there are only 8 logical vertices that can be pinned; each physics vertex will be pinned if any one of the associated render vertices are pinned.)

Steps to reproduce

  • Add a SoftBody3D to a scene
  • Attach a BoxMesh to it
  • Try clicking on some of the points to highlight it

In practice this will happen with many other mesh types as well. Imported ArrayMesh objects often have this problem.
The SphereMesh also has this problem at the ends of the sphere and along a seem down one segment of the sphere
The primitive PlaneMesh type is one of the few mesh types that does not have this problem, because it has a simple 1:1 mapping between render vertices and physics vertices.

Minimal reproduction project (MRP)

soft-body-pinned-points.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions