Live data from Hacker News

Ray Tracing Essentials, Part 1: Basics of Ray Tracing

news.developer.nvidia.com

11–20 of 42 posts

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#11
On the topic of Ray tracing books:

I'm currently at chapter 9 of The Ray Tracer Challenge and I have to say it's a wonderful book and the stellar reviews are well deserved.

It handholds you all the way and that is such a breath of fresh air for someone like me, who's not a math guy, nor do I instantly 'get' modern graphics APIs, since there is a lot of prerequisite knowledge encoded in those APIs.

I also like to understand things from first principles and it helps when those principles are explained in a straightforward, even somewhat humorous way and I get to see results right away.

Learning practical things would be so much easier if the other books on my shelf had the same approach.

It's already in the top 3 of my favorite books, along with Nature of Code.

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#12
post #5

Peter Shirely's Ray Tracing in One Weekend series ( https://raytracing.github.io/ ) is a great way to learn enough about ray tracing to implement it yourself.

Less well known is "Rasterization in One Weekend"

https://tayfunkayhan.wordpress.com/2018/11/24/rasterization-...

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#13
From the example in this video I’m not quite sure how you get anti-aliasing for free in sub-pixel sampling. I understand it in general, but in this example the light is being reflected on a diffuse surface. Assumedly where the diffused ray goes has a large random component, so sub-pixel sampling provides very little, if any, benefit. Is my take in this correct?

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#14

From the example in this video I’m not quite sure how you get anti-aliasing for free in sub-pixel sampling. I understand it in general, but in this example the light is being reflected on a diffuse surface. Assumedly where the diffused ray goes has a large random component, so sub-pixel sampling provides very little, if any, benefit. Is my take in this correct?

While sub-pixel sampling provides little benefit for diffuse surfaces, sampling the same pixel multiple times does provide better smoothness across the surface of the object.

Since it's not much more computationally expensive to do sub-pixel sampling than to repeatedly sample the same point within the pixel you might as well just use sub-pixel sampling.

Additionally a pixel has no knowledge of its contents until you cast a ray. And even if the ray did hit a diffuse surface you would have to do more math to determine if the edge of that surface lies within the boundaries of that pixel. Might as well just use sub-pixel sampling.

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#15
post #5

Peter Shirely's Ray Tracing in One Weekend series ( https://raytracing.github.io/ ) is a great way to learn enough about ray tracing to implement it yourself.

I was reading through and noticed he does not normalize his vectors for (so far) things like ray direction or surface normals for lighting. He does give warnings but I'm curious what type of bugs or rendering issues will manifest from this decision?

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#16
post #15
post #5

Peter Shirely's Ray Tracing in One Weekend series ( https://raytracing.github.io/ ) is a great way to learn enough about ray tracing to implement it yourself.

I was reading through and noticed he does not normalize his vectors for (so far) things like ray direction or surface normals for lighting. He does give warnings but I'm curious what type of bugs or rendering issues will manifest from this decision?

Incorrect results will manifest. If you take the dot product of a surface normal and another vector and they aren't the same length, the dot product will be distorted by the lengths of the vectors.

Ray direction and ray length might be combined into one vector that just stretches from the origin for ray tracing, but using the direction with a surface normal for dot products, reflection vectors etc. is going to give artifacts.

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#17

On the topic of Ray tracing books: I'm currently at chapter 9 of The Ray Tracer Challenge and I have to say it's a wonderful book and the stellar reviews are well deserved. It handholds you all the way and that is such a breath of fresh air for someone like me, who's not a math guy, nor do I instantly 'get' modern graphics APIs, since there is a lot of prerequisite knowledge encoded in those APIs. I also like to unde…

I had a really fun time going through the ray tracer challenge recently! It really is an amazing introduction to ray tracing

I've since moved on to the pbr book[0] and finding myself getting much more lost in the math. I'm doing my best to brush up and/or learn all of it, but it's a bit daunting.

It's really telling how reassuring the tests are in the RTC. Right now I can re-implement something from the pbr-book, but I can't really say if I got it right other than by doing a render (and even then, it can be hard to tell).

My plan is to at least go through and write my own tests by doing the math by hand and trying to verify my implementations.

I really wish there were some intermediary book between the two.

[0] http://www.pbr-book.org/

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#18
post #17

On the topic of Ray tracing books: I'm currently at chapter 9 of The Ray Tracer Challenge and I have to say it's a wonderful book and the stellar reviews are well deserved. It handholds you all the way and that is such a breath of fresh air for someone like me, who's not a math guy, nor do I instantly 'get' modern graphics APIs, since there is a lot of prerequisite knowledge encoded in those APIs. I also like to unde…

I had a really fun time going through the ray tracer challenge recently! It really is an amazing introduction to ray tracing I've since moved on to the pbr book[0] and finding myself getting much more lost in the math. I'm doing my best to brush up and/or learn all of it, but it's a bit daunting. It's really telling how reassuring the tests are in the RTC. Right now I can re-implement something from the pbr-book, but…

I wholeheartedly agree with you. The tests do help a lot.

Funnily enough, I own PBR too (it's in my reading queue), and, having skimmed through it, it seems math heavy. I think I'll leave it for last. My current queue is:

- RTC (for fun),

- 3d Math primer for Graphics and Game Dev by Dunn (to solidify the math part)

- Foundations of Game Engine Dev - Mathematics, by Lengyel (because when it comes to math, overkill is underrated)

- CGPP (to get the basics down)

... not sure about the order for my other books, but then...

- OpenGL SuperBible (second time around, sadly)

- Real-Time Rendering

- PBR

For the math books, I was thinking to do the same thing as you: do the math by hand, and then translate them into tests.

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#19
post #6
post #4

Dear NVidia, While I and many others appreciate the quality of your video, in an age where people are distributing ray-tracing code on business cards, there’s not a ton of value in producing even more “Basics” or “Essentials” of ray tracing educational material. What would provide most of us with interest in ray tracing real value is expanding on the territory covered by the PBRT book, making the material it covers m…

Something like Ray Tracing Gems book they published last year? Or maybe CFP for Ray Tracing Gems II book they have right now?

To save others looking for it, a PDF version (CC BY-NC-ND 4.0) is available here (https://www.realtimerendering.com/raytracinggems/).

Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing

#20
post #17

On the topic of Ray tracing books: I'm currently at chapter 9 of The Ray Tracer Challenge and I have to say it's a wonderful book and the stellar reviews are well deserved. It handholds you all the way and that is such a breath of fresh air for someone like me, who's not a math guy, nor do I instantly 'get' modern graphics APIs, since there is a lot of prerequisite knowledge encoded in those APIs. I also like to unde…

I had a really fun time going through the ray tracer challenge recently! It really is an amazing introduction to ray tracing I've since moved on to the pbr book[0] and finding myself getting much more lost in the math. I'm doing my best to brush up and/or learn all of it, but it's a bit daunting. It's really telling how reassuring the tests are in the RTC. Right now I can re-implement something from the pbr-book, but…

Well, there is the book "Ray Tracing from the Ground Up" [1], which although a bit outdated (stemming from 2007), gives in-depth discussions on many of the topics. The author discusses possible pitfalls on the way as well. There are a few chapters, which are still math-heavy (the ones discussing the principles of stochastic ray tracing, a.k.a. Monte Carlo ray tracing).

A helpful resource for me, personally, was the educational ray tracer "Nori" [2], which came with 5 assignments covering fundamentals of a ray-tracing system (intersection acceleration, Monte Carlo sampling, basic and advanced integrators, BRDFs, even microfacet material models). Assignments gave hints on how to integrate those features in the ray tracer, plus they provided ways to validate ray-traced results. Currently, the assignments are removed from the Nori's website, but one can find them using the Wayback Machine.

[1] "Ray Tracing from the Ground Up", by Kevin Suffern, September 2007, http://www.raytracegroundup.com/

[2] Nori: an educational ray tracer, Dr. Wenzel Jakob, https://wjakob.github.io/nori/# (using Wayback machine to access assignments https://web.archive.org/web/20200110040505/https://wjakob.gi...)

Post reply on HN