Collider Complexity Visualization

A collision visualization debug that communicates collider complexity would be very helpful for detecting incorrectly set up objects — for example, highlighting all objects that have the “Use Complex As Simple” collision property enabled, or have a collider composed of more than 128 triangles.

I came across these three existing collision debugs, but none of them communicate collider complexity clearly:

* show Collision — displays a wireframe of the object’s collider. The triangle count is visible for nearby objects, but for objects further away the individual edges merge together, making it unclear whether an object has a highly detailed collider or not.

* Player Collisions view — displays player collisions as a solid material.

* p.Chaos.DebugDraw.Enabled — displays physics bodies as a wireframe; has the same merging problem as show Collision.

Additionally, all three significantly decrease framerate, which makes people reluctant to use them. Another issue is that colliders are often smaller than the rendered geometry, causing them to be hidden inside the mesh and not visible.

We considered enhancing one of these existing debugs by coloring the rendered collider according to in-house rules. However, it seems that to achieve this I would need to modify rendering for every component type that has collisions: UStaticMeshComponent, UInstancedStaticMeshComponent, UBoxComponent, ULandscapeHeightfieldCollisionComponent, USkeletalMeshComponent, and UHierarchicalInstancedStaticMeshComponent are all rendered via their respective FPrimitiveSceneProxy-derived classes. Changing the color would therefore require tweaking the rendering of each proxy individually, resulting in many engine changes.

Am I missing something, or is there no way to change the coloring with a single, centralized change?

[Attachment Removed]

On our project, we use the FActorPrimitiveColorHandler system, to show both the Collision Complexity and triangle density metrics to find assets which contain a lot of triangles relative to the size - by recoloring the assets when displayed in the viewport. This only works in the Editor though so not sure if that would fulfil your requirements if you wanted this information while running the game.

[Attachment Removed]

Hi all, and apologies this has taken a little while to respond to (as always Jalpesh - appreciate the input :D)

We don’t have that specifically in CVD, but you may be interested to know that in 5.8 we do have something which should help in this case!

Best

Geoff Stacey

Developer Relations

EPIC Games

[Attachment Removed]