Description

An ensure is hit for static raytracing geometry because skeletal mesh assets that had ray tracing disabled were not handled in: FSkeletalMeshSceneProxy::GetStaticRayTracingGeometries

The concurrent render state does not create ray tracing geometries (as it’s guarded by that flag). However, later the FScene still tries to register primitives and requests the ray tracing geometry without verifying whether it was created.

An additional check can be added like the static mesh version to safeguard the function:

TArray<FRayTracingGeometry*> FSkeletalMeshSceneProxy::GetStaticRayTracingGeometries() const
{
+   if (IsRayTracingEnabled() && bRenderStatic && SkeletalMeshRenderData->bSupportRayTracing)
    // if (IsRayTracingEnabled() && bRenderStatic)
    {
       TArray<FRayTracingGeometry*> RayTracingGeometries;
       RayTracingGeometries.AddDefaulted(SkeletalMeshRenderData->LODRenderData.Num());
       for (int32 LODIndex = 0; LODIndex < SkeletalMeshRenderData->LODRenderData.Num(); LODIndex++)
       {
          FSkeletalMeshLODRenderData& LODRenderData = SkeletalMeshRenderData->LODRenderData[LODIndex];
 
          // Skip LODs that have their render data stripped
          if (LODRenderData.GetNumVertices() > 0)
          {
             ensure(LODRenderData.NumReferencingStaticSkeletalMeshObjects > 0);
             RayTracingGeometries[LODIndex] = &LODRenderData.StaticRayTracingGeometry;
          }

Steps to Reproduce
  • Disable ray-tracing on a skeletal mesh asset in the scene

Expected

Ensure does not get hit

Actual

Ensure is hit

Callstack

n/a

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-353614 in the post.

0
Login to Vote

Unresolved
ComponentUE - Graphics Features - Ray Tracing
Affects Versions5.65.7
CreatedNov 12, 2025
UpdatedNov 12, 2025
View Jira Issue