DOOM: Multi Level BVHs

Published September 03, 2019
Advertisement

One of the major challenges in real time ray tracing are dynamic scenes. It is not hard to pre-compute BVHs and then just render the scene, but working with dynamic objects and geometry is challenging. To handle such scenario I've implemented multi-level BVHs where top-level BVH is rebuilt every single frame, additionally for fully dynamic geometry I've added HLBVH (which is extremely fast to build).

The first test I have (which you can try) is a Sponza atrium, which creates each single object in it as node within multi-level BVH. Each node has high quality SAH BVH pre-computed on start, and then a top-level BVH is built every single frame. Additionally it immediately supports instancing, which is a great feature! Geometry also have material (with diffuse map) assigned.

 

To run demo, OpenCL 1.2 compatible hardware is required (I've tested this on AMD Rx 380, AMD Rx 590, NVidia 1070 and Intel HD Graphics 620 - where it runs quite slow, but still - runs)

Raytracer Test No. 1

 

mlbvh.png.0037faca4b61fca77a751bb48a69ed40.png

 

I don't like to promise future features, but if everything goes well - I'd like to have some skeletal animated model in soon along with finally some models that I'm working on for the actual game!

4 likes 0 comments

Comments

Rutin

Sadly I wasn't able to get it to run on my office machine (Windows 10). The application opens then closes after showing:

image.png.7eef2c815a243a7cbcc8a2302d4c1533.png

I have a GeForce 1050 TI SC 4GB which supports OpenCL 1.2.

September 03, 2019 11:10 PM
JoeJ

Runs for me on Vega56, 92 MRays/s after startup and maximizing window to 1440p.

September 04, 2019 08:35 AM
Vilem Otte

@JoeJ Thanks. Sounds good!

@Rutin I'll try to add a bit more statistics and logging, to see why (it could be that I'm using too big surface for texture atlas, or too large workgroup).

 

September 04, 2019 10:02 AM
dmatter

Works for me on an antiquated Radeon HD 7790 with the window maximised on a 1440p screen at ~4.5 FPS and 15.7 MRays/s.

On my 1080p screen that's 7 FPS and 13.3 MRays/s.

September 04, 2019 05:03 PM
Vilem Otte

@dmatter Wow, I really didn't expect it running on Radeon HD 7790 (it is after all a bit older GPU).

Now I can't test it on any NVidia directly (as I only have a friend who has it), which isn't really good - so I'll probably get one 2070 before end of September, so I can debug & run on it.

September 04, 2019 09:10 PM
LandonJerre

I ran it a few times, the perf seems nice but I noticed two things:
- For some reason a 1px thin vertical black line sometimes appears on the middle of the screen. I can reliably reproduce it by pressing the strafe keys after start. If I look around with the camera it disappears again, but there are position where it reappears again.
- The app crashes randomly, after one of the crashes both of my screens went black, like when the driver crashes, but the WoW Classic instance in the background kept running, and the windows event log told me that the crash happened in ucrtbase, so that doesn't point at the driver either.

It ran between 100-130FPS, in a maximized window on a 1920*1200 screen. I couldn't read the exact MRays/s values because it flucuated so heavily, but seemingly it was between the low 200s and low 400s, sometimes dipping down to around 160 momentarily. I ran it on a factory overclocked RTX 2080 (This is the exact card) with the latest driver (which is 436.15 at the moment).

September 05, 2019 03:55 PM
Vilem Otte

@LandonJerre I'm glad to hear it is running on RTX 2080! Thanks for testing.

I've figured out one application crash (BVH had a memory leak - and as it is rebuilt every frame, you can run out of memory quite fast), this might have been the cause of it.

I was able to reproduce vertical black line on my GPU either - will look at it eventually (added into TODO list).

Seems like RTX 2080 gives the highest performance so far (for later releases, I may want to add a way to send results to database (with hardware information and resolution)), that way we could compare how fast which GPU is - and I could make a minimal and recommended configuration (plus what resolution you should run) once the DOOM game is more game-like.

September 05, 2019 04:03 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Merry Christmas!

8273 views

Progress

4355 views

Roadmap for 2020

5984 views

DOOM: Post Mortem

5591 views

DOOM: GROOM

4883 views

DOOM: Placeholders

5479 views

Ludum Dare 45

5252 views
Advertisement