Uploaded June 2024 | Updated November 2026, 1 week ago
Attempting to render more intricate scenes using an acceleration structure called a Bounding Volume Hierarchy.
Support my work (and get early access to new videos and source code) on Patreon or Nebula
* Patreon: patreon.com/SebastianLague
* Nebula: go.nebula.tv/sebastianlague
Source Code:
* GitHub: github.com/SebLague/Ray-Tracing
Credits and References:
* BVH Article: jacco.ompf2.com/2022/04/18/how-to-build-a-bvh-part-2-faster-rays
* 3D Test Models: casual-effects.com/data
* Music: 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
Attempting to render more intricate scenes using an acceleration structure called a Bounding Volume Hierarchy.
Support my work (and get early access to new videos and source code) on Patreon or Nebula
* Patreon: patreon.com/SebastianLague
* Nebula: go.nebula.tv/sebastianlague
Source Code:
* GitHub: github.com/SebLague/Ray-Tracing
Credits and References:
* BVH Article: jacco.ompf2.com/2022/04/18/how-to-build-a-bvh-part-2-faster-rays
* 3D Test Models: casual-effects.com/data
* Music: 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




![[Unity] Camera Shake
In this video we create a simple camera shake system, with several parameters to control the appearance of the shake.
NOTE: Thereve been some criticisms about the shake looking a bit off, mostly due to the camera not slowing down towards the end. I have added an update to the source code to try and address this. The change is simple: the speed variable has been replaced with a maxSpeed and a minSpeed variable. The current speed of the shake is then determined by interpolating between these two values based on the damping curve. This change does make the duration variable less precise, but hopefully that isnt too great a concern.
The project is available here:
https://github.com/SebLague/Camera-Shake
If youd like to support these videos, you can make a recurring monthly donation (cancellable at any time) through Patreon: http://bit.ly/sebPatreon
Or a once-off donation through PayPal:
http://bit.ly/SupportGamedevTutorials [Unity] Camera Shake](https://i.ytimg.com/vi/D3gbXAVcG-0/mqdefault.jpg)





