Engine crashes whenever I render. Something to do with scratch buffer???

I’m trying to render a couple frames with path tracer, but once I start rendering, after just a couple seconds the engine crashes. All I get for an error report is this. Couldn’t find anything about it online and I’m not a coder. :laughing:

Assertion failed: ScratchBufferRequiredSize + ScratchBufferOffset <= ScratchBufferSize [File:D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 4528] BLAS scratch buffer size is 2384125440 bytes with offset 6326486827008 (6328870952448 bytes available), but the build requires 6679092736 bytes.

Also, when I try to render without pathtracing, my screen instantly enters power saving mode and won’t come out of it unless I restart my computer. :neutral_face:

Getting the same thing, did you ever find a solution>?

Has this ever been fixed?

Getting

  1. Assertion failed: ScratchBufferRequiredSize + ScratchBufferOffset <= ScratchBufferSize [File:D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 4431] BLAS scratch buffer size is 337380352 bytes with offset 11274622134272 (11111084792832 bytes available), but the build requires 4551680 bytes. UnrealEditor_D3D12RHI UnrealEditor_RHI UnrealEditor_Renderer UnrealEditor_RHI UnrealEditor_RHI UnrealEditor_RHI UnrealEditor_Core UnrealEditor_Core UnrealEditor_RenderCore UnrealEditor_Core UnrealEditor_Core kernel32 ntdll

Happens seemingly at random whenever I use the pathtracer.

i9 13900K
128GB RAM
3090 24GB

Any help at all would be greatly appreciated.

For anyone else - Seem to have found out what’s happening.
The BLAS buffer has to do with geometry complexity outside of Nanite.
Meaning - if your scene has many Static Meshes that are not using Nanite, try switching over to Nanite - Simply put, the BLAS buffer needs space to calculate geometry - if there’s too much complex geometry, this seems to happen.

Now, this helped me but did not “fix” it to say that it still sometimes happens, seemingly on random, however it does help.
Hope this helps!

Running 5.2.1

I started getting this issue after converting my project from 5.2 to 5.4. Some levels with lots of high poly assets were crashing on load but only if ray tracing was enabled. Disabling ray tracing fixed it, but obviously not a great solution since I needed it for pathtracing. Also all of my meshes are already Nanite, so it didn’t have to do with having too many non-nanite Static Meshes.

Setting the CVar r.RayTracing.Geometry.MaxBuiltPrimitivesPerFrame to 100000 fixed it, since I think this staggers the loading of geometry data into the BLAS buffer, which prevents it from overloading all at once. By default it’s -1, which builds the ray tracing acceleration structure immediately. Not sure why this was suddenly an issue with 5.4, but Epic said they changed the RHI rendering pipeline (Unreal Engine 5.4 Release Notes | Unreal Engine 5.4 Documentation | Epic Developer Community), so maybe they added additional buffers or acceleration structures which now caused the BLAS buffer to overload when trying to load geometry data all at once

From what I can tell (at least with Pathtracing), the scene looks exactly the same as before, but doesn’t crash on load!

2 Likes