3 ms·
Build a raytracer from scratch. It's a couple hundred lines of very straightforward C code, or much, much less with a higher level language. You will learn _a
by qbasic_forever 6y ago
Build a raytracer from scratch. It's a couple hundred lines of very straightforward C code, or much, much less with a higher level language. You will learn _a ton_ about the rendering pipeline, transformations, lighting, shading surfaces, etc. It is super satisfying the very first time you run and finally get some colorful shaded spheres floating in space--you'll remember that moment for a long time. This is just one of many resources to help get started with a raytracer: https://www.realtimerendering.com/raytracing/Ray%20Tracing%20in%20a%20Weekend.pdf https://www.realtimerendering.com/raytracing/Ray%20Tracing%2...
- d26900 6y agoPeter Shirley's one is nice too! But he has 2 more: https://gamephysicsweekend.github.io/ https://gamephysicsweekend.github.io/ And you can do a very simple one in much less than 30 lines in C. ;) Edit: Oops, it was the wrong one... This is the right one: https://raytracing.github.io/ https://raytracing.github.io/ Sorry!
- vineek 6y agoTo get a quick feel for ray tracing, I would also suggest https://rayground.com/ https://rayground.com/. It has a lot of ray tracing projects, ranging from basic samples to complicated scenes. They can all be run in your browser.
- jolmg 6y ago> It's a couple hundred lines of very straightforward C code Or a business card's worth of space: https://fabiensanglard.net/rayTracing_back_of_business_card/ https://fabiensanglard.net/rayTracing_back_of_business_card/