Skip to content

Commit 94e22e5

Browse files
authored
Add a brief explanation of why Gaussian splats are interesting (#64)
* Add a brief explanation of why Gaussian splats are interesting * Typo
1 parent 203fd19 commit 94e22e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_posts/2025-04-04-neural-gfx-in-an-afternoon.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Our concrete example, which you can see in action on the [Slang playground](http
2727
- Sigma (how fuzzy/spread out it is)
2828
- Color
2929

30+
Why are Gaussian splats so powerful? Their mathematical properties make them particularly well-suited for representing visual information. Each Gaussian splat naturally creates smooth gradients from its center outward, which is perfect for capturing how light and color blend in real-world scenes. And because of this smoothness, they are well suited to optimization techniques like the one we are about to explore. In more advanced applications, these properties allow Gaussian splats to represent complex 3D scenes with remarkably high visual quality while maintaining real-time performance – a sweet spot that's made them increasingly popular in computer graphics applications from virtual production to AR/VR.
31+
3032
The challenge is: how do we determine the right parameters for thousands of splats to recreate a specific image? To do this, we can use a technique common in machine learning called gradient descent. Gradient descent can be used to find an optimal solution to a problem by making small adjustments to its inputs and checking whether they bring the result closer to our desired output. The basic idea is that we start with random splat properties, and define a “loss function”, which measures how different the resulting image is from what we want it to be, and then use gradient descent to adjust the splat properties until the difference is minimized.
3133

3234
## The Challenge: Computing Gradients
@@ -328,4 +330,4 @@ And… that’s essentially it! Other than a few utility functions, this is all
328330

329331
Now, there are some notable shortcomings in this example– primarily, as mentioned before, that it takes quite a long time to execute. Because we look through our entire list of Gaussian blobs once for every pixel being calculated, at every iteration, it takes about 40 minutes (for me, on a system with a six-year-old graphics card) for all 10,000 iterations to complete. And this is with a very small number of blobs; I limited the number of blobs used to generate the image to 200, because going beyond that point starts to hang my GPU. And because of the small number of blobs, you can see that the image is pretty fuzzy. We could counter this with more, smaller blobs, but doing that will require some clever changes to improve execution speed. Thankfully, this is exactly the sort of work that GPUs are good at! And now that we’ve got the hang of how gradient descent and gaussian splatting work, we can dive into the optimization work in a follow-on blog post.
330332

331-
If you have any questions or comments on this example code, or things you’d like to see covered in future walkthrough blog posts, please join us on the [Slang Discord](https://khr.io/slang-discord) – I and the rest of the Slang team can be found hanging out and answering questions there!
333+
If you have any questions or comments on this example code, or things you’d like to see covered in future walkthrough blog posts, please join us on the [Slang Discord](https://khr.io/slang-discord) – I and the rest of the Slang team can be found hanging out and answering questions there!

0 commit comments

Comments
 (0)