video thumbnail 52:12
Coding Adventure: Optimizing a Ray Tracer (by building a BVH)

2024-06-12

[public] 214K views, 28.3K likes, dislikes audio only

channel thumbSebastian Lague
4K

Trying to speed up the ray tracer (from a previous coding adventure) so that we can render some more intricate scenes!

Links:

● Source: https://github.com/SebLague/Ray-Tracing

● Get early access to new videos and projects by supporting on:

-- Patreon: https://www.patreon.com/SebastianLague

-- Ko-Fi: https://ko-fi.com/sebastianlague

● Previous Ray Tracing episode: /youtube/video/Qz0KTGYJtUk

● BVH Article: https://jacco.ompf2.com/2022/04/18/how-to-build-a-bvh-part-2-faster-rays/

● 3D Test Models: https://casual-effects.com/data/

● Music Credits: https://github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/BVH.txt

Chapters:

00:00 Intro

00:30 Triangle-Test Debug View

03:34 Bounding Boxes Inside of Bounding Boxes

04:41 Building a BVH

07:41 Traversing the BVH

09:13 GPU-Friendly Data

15:32 Converting Recursion to Iteration

18:06 Box-Test Debug View

21:42 Increasing the Depth of the BVH

25:11 Distance Test and Child Ordering

31:47 The Surface Area Heuristic

37:19 Speeding up the Construction

38:57 32-Byte Nodes

42:20 Transformations

45:10 Supporting Multiple Models

48:45 Some Tests and Final Thoughts


Intro
/youtube/video/C1H4zIiCOaI?t=0
Triangle-Test Debug View
/youtube/video/C1H4zIiCOaI?t=30
Bounding Boxes Inside of Bounding Boxes
/youtube/video/C1H4zIiCOaI?t=214
Building a BVH
/youtube/video/C1H4zIiCOaI?t=281
Traversing the BVH
/youtube/video/C1H4zIiCOaI?t=461
GPU-Friendly Data
/youtube/video/C1H4zIiCOaI?t=553
Converting Recursion to Iteration
/youtube/video/C1H4zIiCOaI?t=932
Box-Test Debug View
/youtube/video/C1H4zIiCOaI?t=1086
Increasing the Depth of the BVH
/youtube/video/C1H4zIiCOaI?t=1302
Distance Test and Child Ordering
/youtube/video/C1H4zIiCOaI?t=1511
The Surface Area Heuristic
/youtube/video/C1H4zIiCOaI?t=1907
Speeding up the Construction
/youtube/video/C1H4zIiCOaI?t=2239
32-Byte Nodes
/youtube/video/C1H4zIiCOaI?t=2337
Transformations
/youtube/video/C1H4zIiCOaI?t=2540
Supporting Multiple Models
/youtube/video/C1H4zIiCOaI?t=2710
Some Tests and Final Thoughts
/youtube/video/C1H4zIiCOaI?t=2925
Sebastian Lague Hello, on this channel I explore how to create stuff out of code. I hope you find some of it interesting!
/youtube/channel/UCmtyQOKKmrMVaKuRXz02jbQ
Support on Patreon patreon.com
https://www.patreon.com/SebastianLague/
Coding Adventure: Ray Tracing 1,125,827 views
/youtube/video/Qz0KTGYJtUk
Coding Adventure: Atmosphere 1,128,746 views
/youtube/video/DxfEbulyFcY