Hi,
I believe we have found a bug in the Niagara code that you should be aware of. In the function NiagaraRendererMeshes::GetDynamicRayTracingInstances sometimes mesh instances are added when their geometry is not streamed in yet or is invalid. This causes a check() to fail in FD3D12RayTracingGeometry::GetAccelerationStructureAddress D3D12RayTracing.h (because AccelerationStructureBuffers[GPUIndex] is null).
The following changes to the code, adding a check on RayTracingGeometry->IsValid(), in NiagaraRendererMeshes::GetDynamicRayTracingInstance seem to fix the issue.
//ENGINE MODIFICATION - START //if (LODModel.LODIndex == INDEX_NONE || LODModel.RayTracingGeometry == nullptr) //Need to check if the RayTracingGeometry is valid or instances of it can be sometimes added when the geometry's data has not been streamed in yet if (LODModel.LODIndex == INDEX_NONE || LODModel.RayTracingGeometry == nullptr || LODModel.RayTracingGeometry->IsValid() == false) //ENGINE MODIFICATION - END { continue; }
Is this change the correct way to fix this issue ?
I have checked the perforce database and could not find any change that would fix this issue but I might have missed it if it was fixed in another way.
Thanks
Lucian