Live data from Hacker News

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

github.com

51–60 of 67 posts

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

#51
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…

Amazing. What happened with your professional career ? Did this exercise help you out professionally ?

One of my worries about AI is that doing these deep dives are a lot harder to justify.

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

#52
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…

Amazing. What happened with your professional career ? Did this exercise help you out professionally ? One of my worries about AI is that doing these deep dives are a lot harder to justify.

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.

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

#53

Earlier quoted context omitted.

> Also, as you're using full double/f64-precision all the time, you're leaving a fair bit of performance on the table There's another issue that popped up on my quick naive profiling run: std::shared_ptr in the HitRecord/HittableLightSample is assigned/copied and destroyed a lot, and somehow these refcount operations show up as half of all samples on my profile (presumably because even if there's no hit and the point…

Yeah, passing std::shared_ptr by value in a multi-threaded setup can have a lot over overhead due to them being copied and destroyed a lot, and the fact that the atomic ref count value modifications effectively cause a write back to cache and can cause contention. Should pass them by const refs really to avoid this.

[dead]

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

#54
post #24

Earlier quoted context omitted.

Indeed. Until it turns out not to be true: https://news.ycombinator.com/item?id=48541543

Bummer. I fell for clickbait as usual.

I just flagged this post. With AI i can write in 1 day, so what is the point here....?

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

#55
I think these kind of projects fail to impress these days, with or without AI.

You need a second order effect, like “I did X using this thing I built Y”, where X is the actual impressive part and the Y is just an implementation detail. Maybe like that Roman Empire Names thing.

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

#56
post #9

Earlier quoted context omitted.

> Btw this was initially coded without AI, but I've used it for the recent clean up and features Then it makes sense to update the submission title. To me it reads as if the project was written completely without the help of AI (which might be a quality badge to some), but it is not 100% true then. Anyhow, cool project ;)

Thanks! I get your point about AI, but I think it's fair to say it's almost 100% AI free. I worked on it for ~15 months, vs 1 week now with AI. Previous results were quite similar

My experience is 1 week of AI can = a year of by hand development.

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

#57

Me too, but in TS/WebGPU: https://github.com/ivanjermakov/moonlight Very fun! Packing data for GPU-side BVH was quite tricky.

Wow, pretty good. Why web?

why not web? 1000x easier than native and 1000x easier to share

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

#58

Earlier quoted context omitted.

Amazing. What happened with your professional career ? Did this exercise help you out professionally ? One of my worries about AI is that doing these deep dives are a lot harder to justify.

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 ?

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

#59
post #37

Earlier quoted context omitted.

Wow, I also wrote a game 8 years ago and have been using AI to rebuild upon it. I'm excited to tell people that I wrote it from scratch without AI! Love these new rules!

Look at the commit history. Out of 557 total commits in the repo, 510 have been done before the past 2 weeks. All those (minus 5 in 2023-2024) have been done on or before July 2022, months before ChatGPT had even launched. Out of the 47 commits in the last 2 weeks, 26 were README updates / CI / docs. The remaining 21 commits are clearly cleanups, speedups, bugfixes, and tangential features like Blender import/export.…

So… it has been written with AI?

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

#60
post #49

Earlier quoted context omitted.

Look at the commit history. Out of 557 total commits in the repo, 510 have been done before the past 2 weeks. All those (minus 5 in 2023-2024) have been done on or before July 2022, months before ChatGPT had even launched. Out of the 47 commits in the last 2 weeks, 26 were README updates / CI / docs. The remaining 21 commits are clearly cleanups, speedups, bugfixes, and tangential features like Blender import/export.…

I also wrote a huge chunk of my game by hand 8 years ago, but I wouldn't lead with 'it's built without AI' now because that would be disingenuous.

It all boils down to what each of you individually understands as "made with AI", which could be anything between using autocompletions and braindead vibecode.
Post reply on HN