SDCollisionVis is a plugin for UnrealEngine to help see the actual state of the scene, as Chaos sees it.
The collision viewmodes that come with Unreal only draw the rendering mesh, not the physics mesh.
Using LineTraceSingleByObjectType, we can raytrace the physics scene directly and build a better image of what's going on.

Reference (MedievalGame)
The easiest way to add this to Unreal, is by going to either Engine/Plugins or Project/Plugins and git cloning this repo directly there.
git clone https://github.com/splash-damage/collisionvis.git SDCollisionVis
And you should end up with something like:
Engine/Plugins/SDCollisionVis
By default, the plugin is enabled for Editor, Game, Client and Server for everything but Shipping.
If you're in editor, you can very quickly enable the realtime overlay by toggling on this visualisation mode.
In a cooked build, you can instead toggle it on with:
show SDCollisionVis
Everything in SDCollisionVis is configured via cvars.
You can change the current visualisation mode via r.SDCollisionVis.Settings.VisType:
- Default
Facing Ratio Based Thing - Primitive Id
Hash ofHitResult.ElementIndex - Triangle Id
Hash ofHitResult.ElementIndex + HitResult.FaceIndex - Material Id
Hash ofHitResult.PhysMaterial->GetUniqueID() - Raytrace Time
Takes the time difference before and after the raycast.
Can be configured further with:r.SDCollisionVis.Settings.RaytraceTime.IncludeMissesr.SDCollisionVis.Settings.RaytraceTime.MinTimer.SDCollisionVis.Settings.RaytraceTime.MaxTime
- Triangle Density
Attempts to extract a triangle from the underlying physics mesh and computes its' area.
Can be configured further with:r.SDCollisionVis.Settings.TriangleDensity.MinArear.SDCollisionVis.Settings.TriangleDensity.MaxArea
If you're playing a first person game, it's very likely the character's capsule will occlude the entire screen.
For cases like that, there is:
r.SDCollisionVis.Settings.MinDistance
Defaults to 100.
In order to keep things from turning your experience into a full on slide show, the realtime renderer cuts up the screen into tiles and will only evaluate one pixel of that tile per frame.
You can configure this with:
r.SDCollisionVis.Settings.TileSize
Defaults to 8, and clamped between 2 (2x2) and 128 (128x128).
Additionally, the framebuffer can be scaled, so less pixels overall need to be evaluated.
r.SDCollisionVis.Settings.Scale
Defaults to 0.5
The defaults were chosen based upon running things at 3840x2160 and prioritising image clarity.
If you want a very rapid update, like if you want to walk around, something like this might be a good option:
r.SDCollisionVis.Settings.Scale 0.25
r.SDCollisionVis.Settings.TileSize 2
The object query params are configured under r.SDCollisionVis.CollisionObjectQuery.*:
AllObjectsAllStaticObjectsAllDynamicObjectsWorldStaticWorldDynamicPawnVisibilityCameraPhysicsBodyVehicleDestructible
The query params are configured under r.SDCollisionVis.CollisionQuery.*:
TraceTagTraceComplexIgnoreBlocksIgnoreTouchesMobilityType
If you mess up, you can reset FCollisionObjectQueryParams and FCollisionQueryParams with:
r.SDCollisionVis.Preset.Default()
If you want a higher quality offline render, there is:
r.SDCollisionVis.OfflineRender()
Args:
-resolution : Resolution to use. (Default: 512)
-max-rays-per-frame : Number of rays to dispatch per frame. (Default: 1024)
-cubemap : Render as a CubeMap. (Default: false)
-player-controller : Player controller for fetching transform info. (Default: 0)
e.g:
r.SDCollisionVis.OfflineRender() -cubemap -resolution=2048
The output will go into: Saved/SDCollisionVis, with a .png for normal and a .dds for cubemaps. The FOV is always fixed to 90deg for none cubemap.
If in PIE, in the same process, you can redirect the realtime renderer to use the servers world.
r.SDCollisionVis.Settings.UseServerWorld 1
Otherwise you can use serverexec.
serverexec r.SDCollsionVis.Settings.VisType 2
serverexec r.SDCollisionVis.OfflineRender() -cubemap -resolution=2048
And it will have to be manually copied from the server.








