Jump to content
  • Advertisement

Project: DOOM

DOOM: Multi Level BVHs

Sign in to follow this  
Vilem Otte

1559 views

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!

Sign in to follow this  


0 Comments


Recommended Comments

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.

Share this comment


Link to comment

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

Share this comment


Link to comment

@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).

 

Share this comment


Link to comment

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.

Share this comment


Link to comment

@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.

Share this comment


Link to comment

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).

Share this comment


Link to comment

@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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!