Live data from Hacker News

Show HN: I wrote a C++ ray tracer from scratch without AI

github.com

61–67 of 67 posts

Re: Show HN: I wrote a C++ ray tracer from scratch without AI

#61
post #2

Hey HN, 5 years ago I was 17 and learning to code C/C++ in a coding bootcamp (42). One of the projects was a simple C ray tracer. I really enjoyed working on the project and always loved computer graphics, so I decided to create my own path tracer from scratch, in C++, without using any third-party libraries. I ended up working on it consistently for over a year, then sporadically when CG excitement hit me again. Rec…

How did you like 42? Would you recommend it? I worked some great devs who came out of 42. They all wanted to be game developers. The industry is notoriously unreliable. So they pivoted to writing business software where the client actually pays you for more features. LOL.

Re: Show HN: I wrote a C++ ray tracer from scratch without AI

#64

Earlier quoted context omitted.

Great work, the examples look fantastic. I will say, it's misleading to put "without AI" in the title for you to then comment on your submission that you have in fact used it. While it may only be in a trivial capacity, you've still used it.

I get your point. I consider it fair with the disclaimer because the "manual" version was very similar to current but missing some love

You think that an LLM provides "love"?

Re: Show HN: I wrote a C++ ray tracer from scratch without AI

#65
post #2

Hey HN, 5 years ago I was 17 and learning to code C/C++ in a coding bootcamp (42). One of the projects was a simple C ray tracer. I really enjoyed working on the project and always loved computer graphics, so I decided to create my own path tracer from scratch, in C++, without using any third-party libraries. I ended up working on it consistently for over a year, then sporadically when CG excitement hit me again. Rec…

JFYI: Your inverse ray direction calculation is not NaN-safe: if rays are completely axis-parallel in one dimension, so the direction value is 0.0 for that axis, you'll be doing the val / 0.0 which results in a NaN... Also, as you're using full double/f64-precision all the time, you're leaving a fair bit of performance on the table: transcendentals (sin(), cos(), etc) in particular - can be a lot slower than when usi…

Implemented this and the other improvements suggested on the thread. Performance up by 20%! Thanks for the feedback. https://github.com/themartiano/luz/pull/3

Re: Show HN: I wrote a C++ ray tracer from scratch without AI

#66

Earlier quoted context omitted.

I just launched the project, so can't say it helped me professionally yet. Almost all of the time invested in this was pre-AI. I agree it's harder to justify those deep dives but still worth it if you do it alongside AI IMO.

Even if the project didn't become popular. Have you been able to use it as part of your portfolio to get a job, or move into academia ? Perhaps what you learned in the project was useful in some other way ?

I have used it when applying to some jobs but no success so far. I think this project was useful because it allowed me to go deeper than I ever had in code. I had very though issues that required me to ask in forums etc. I had a bug with ray-triangle intersection that took me 3 months to find the cause. So it was good training and it's a great project to have on my portfolio. I'm sure it can help me if I apply for something related to computer graphics and maybe gaming.
Post reply on HN