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.
It is a great project for learning a new language. I used it to practice Rust. You get to implement vectors, with basic operations on them, this gives you a chance to practice some abstractions. It's also good to create some unit tests to ensure your vector operations are correct. There's also good reason to parallelize your code and perform benchmarks. Abstractions, unit tests, parallelism, benchmarks, you have an e…
Ray Tracing Essentials, Part 1: Basics of Ray Tracing
21–30 of 42 posts
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#22From 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?
In reality, pixels on the screen and camera sensor have an area. If you choose a random position on that area, you get anti-aliasing "for free" because there's going to be variation in the direction of rays that contribute to the same pixel.
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#23Earlier quoted context omitted.
Sweet. Didn’t see these come out. Thanks for the heads up.
There are previous GPU gems available for free as well: https://developer.nvidia.com/gpugems/gpugems/contributors
https://developer.download.nvidia.com/CgTutorial/cg_tutorial...
Granted, Cg is now just a curiousity in the context of shading languages, it is nevertheless interesting to read.
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#24Earlier quoted context omitted.
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…
I tried using the SuperBible in order to learn OpenGL a few years back, but it always seems to be a bit too dense for my taste. Since OpenGL itself is an API specification and usually you would learn the basics of 3D graphics before delving into it, I recommend using the fantastic Learn OpenGL site (https://learnopengl.com). It goes through the basics of OpenGL from ground-up and touches on more advanced techniques, such as shadow mapping and deferred shading. It is a fantastic site and a great resource for learning the API.
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#25Peter 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
#26On 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 really think the key thing for it clicking with me was to build up the math foundation via TDD. Sure I could have used C#'s Matrix4x4 and Vector classes and just browsed through the beginning of the book, but actually implementing my own tuples, vectors, points, and matrixes really helped me understand "here's what I'm trying to achieve" then "here's the math to implement it".
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#27From 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?
When you shoot a ray from camera perspective, you've already chosen which pixel it's going to contribute to. "Platonic" pixels are infinitesimally small. In reality, pixels on the screen and camera sensor have an area. If you choose a random position on that area, you get anti-aliasing "for free" because there's going to be variation in the direction of rays that contribute to the same pixel.
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#28Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#29Earlier quoted context omitted.
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 e…
Re: Ray Tracing Essentials, Part 1: Basics of Ray Tracing
#30From 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?
If you ray trace and shoot one ray in the center of the pixel then it will hit the white object, and no matter how many rays you spawn from that intersection point the part of the black object that's covering part of the pixel won't actually contribute to the final image. So with this technique the final pixel will be white.
With path tracing you shoot many initial rays at random sub-pixel positions, most miss the black object and hit the white one, but some hit the black one instead. So with this technique the final pixel will be gray, a mixture of the two objects' colors and therefore anti-aliased.