15 comments

[ 6.5 ms ] story [ 46.0 ms ] thread
Wohoo, my name is in the contributors list! This helped me get in a computer graphics grad course at a top(?) school and certainly helped in further job applications.

If anyone else is interested in a graduate degree in this field, I recommend doing something similar - I simply made a few reasonable PRs to fix some issues that I found when following along the books.

It's a fun tutorial to try out new languages.

Here is the result of following the tutorial using Rhombus.

https://github.com/soegaard/miniray

Yes, I used as experiment for C++20 modules, C# SIMD instructions and Rust.
I strongly approve of this. Code snippets are nice, but with new languages⁰ it's rare to have an example of a self-contained but and complete application to get a holistic view. I think a raytracer (or its equivalent) should be a standard example.

0: Or is Rhombus a dialect? Or alternative writing system for an existing language? Or just an elaborate system of shrubs?

> Program files will include rtweekend.h first, so all other header files (where the bulk of our code will reside) can implicitly assume that rtweekend.h has already been included.

Not a great practice. Header files shouldn't assume anything from previous inclusions of other headers.

Sure, this works as a weekend hack, but it would be nice if book (article) would promote good conventions.

This is a normal practice for applications, and allows you to pre-compile that header for performance. I don't think it's a bad enough practice to warrant complaining, but it's good for people to know the advantages or disadvantages.
Headers should still be self contained, although precompiled headers are used. Those things are mostly orthogonal
I can also recommend this book when looking for something fun to implement while learning a new language. There is also the follow ups to this taking things a bit further:

https://raytracing.github.io/books/RayTracingTheNextWeek.htm... https://raytracing.github.io/books/RayTracingTheRestOfYourLi...

I did this ray tracing library in Rust inspired by these books: https://github.com/DanielPettersson/solstrale-rust

And also a small UI using the lib: https://github.com/DanielPettersson/solstrale-desktop-rust

Kind of not maintained anymore.. But fun way learning Rust..

(comment deleted)
One thing that's not directly related to ray-tracing proper, so makes no sense in this book series, but is still a pretty natural (and fun!) next step (or detour) is embedding e.g. a Lua interpreter so you can use that as a scene description language separate from the rendering engine proper.