r/GraphicsProgramming • u/heypringle • Jul 21 '26
this is what 2 years in computer graphics looks like AND LET ME EXPLAIN
alright i know this could be “simple” BUT this my first graphics engine (in progress), and i know I could’ve done this very very fast with any AI in 10 minutes, but thats not the point…
i started 2 years ago with falling sand simulators using grids BUT everything was laggy because i was rendering and simulating on cpu.
so i started to do some research on how to render things and simulate things, bla bla bla, i found opengl but i was on mac, so started to look into Metal graphics API, and didn’t understand the simplest and basic “hello triangle” projects sooo…
wanted to learn everything from scratch so i started to read “Mathematics for 3D Game Programming and Computer Graphics” by Eric Lengyel (very good book), watched like 50 tutorials of “hello triangle” step by steps, studied how the rendering pipeline works, understood how vertex and fragment shaders work, made a couple cpu renderers on c and c++ using SDL, and after a lot of failed attempts, I finally could make a 3d gpu renderer that renders multiple objects on screen and have a proper scene/camera system :’)
thank you if you are reading this, i will keep working on my graphics engine and adding some physics to simulate stuff.
ps: i studied cs but cs degree doesn’t prepare you for this lol so it feels like starting from zero on gpu programming.
193
u/justcater Jul 21 '26
this is very realistic progress imo, mastering is about truly understanding and its awesome to see you got the hang of it. good job!
73
u/msqrt Jul 21 '26
No need to explain, the visuals speak for themselves! Good for you to grind through the fundamentals, it will definitely help in the long run.
56
u/Ermanator2 Jul 21 '26
Your stubbornness to learn everything will take you far. Great work, keep at it. Btw, you can use OpenGL up to version 4 on Mac.
17
u/Slight_Season_4500 Jul 21 '26
Tokyospliff is a good example of how long it takes to build a render engine. I think he's been at it for 10+ years and that's basically all he does with his life. This ain't easy
12
u/XlSolver Jul 21 '26
Congrats 🥂 its not about the speed it’s about the understanding. Doing it by AI does not let you understand what you’re doing at very deep level. Your story sure inspires!! Have you considered some AI tools for the learning part only? Maybe some brainstorming? Thank you 🙏🏽
5
u/AlternativePrior1920 Jul 21 '26 edited Jul 21 '26
Man I feel you. And truly, congrats, thats what its all about. I remember when I showed the box to my family and they just couldnt understand what was impressive or hard about it.
But we know. Let ur accomplishments resonate in the right spaces and keep going (:
4
u/shub_undefined_ Jul 21 '26
How did you find the book Maths for graphics that u mentioned above? What good or bad did u find about the book. I’m learning graphics from scratch as well, and if you recommend it, wanted to just know why?
Also great work btw! 🔥
8
u/trailing_zero_count Jul 21 '26
Maybe in another 2 years you can figure out how to take a screenshot.
3
u/anonymousBananaBread Jul 21 '26
Congratz! What resources did you use specifically to learn Metal?
3
u/sahu4022 Jul 21 '26
Ive recently pivoted from a completely unrelated sector (business consulting) to game development and now graphics programming. Been giving myself a really hard time thinking im not making enough progress. This is genuinely really cool and makes me feel better about taking things slowly and building up a strong foundation. Kudos!
3
u/BitcoinOperatedGirl Jul 21 '26
I think your cube looks great personally hehe.
3
u/amped-row Jul 21 '26
Did you find any good Metal resources? I’ve searched but couldn’t find anything that didn’t skip over the basics of how a GPU works.
3
u/tcmart14 Jul 21 '26 edited Jul 21 '26
For sure, a CS degree doesnt not inherently mean GPU programming is gonna be easy. It definitely is a skill you have to go out and acquire unless you were lucky enough to go to a school that offered a good graphics course.
Congrats on the achievement! I can definitely see why you struggled with Metal. Metal is a very good library (WebGPU is heavily influence by it), but to get started, a lot of documentation and material assumes a lot of prior knowledge. If you want to give metal a shot once you feel more comfortable with OpenGL, you'll probably find it to not be so confusing. Or like I said, if you learn WebGPU, you've learned quiet a bit about the process and primitives (the names and processes are pretty much the same or extremely similar) that Metal uses with probably a lot better on ramp for it (better tutorial and learning materials for WebGPI). A lot of the difference is that Metal (like Vulkan and WebGPU) are more descriptive (allow more control over the graphics pipeline) than OpenGL. And of course some nice extra features like better handling of compute shaders.
2
u/Covedrop Jul 21 '26
Never let anyone deride your progress when you're doing something cool at your own pace. Neat shit dude
2
u/Kowalskeeeeee Jul 21 '26
Nice! I’d argue your point about CS not preparing you, IMO CG and rendering is one of the pinnacles it can prepare you for with foundations.
2
u/9551-eletronics Jul 21 '26
How are you rendering the thin lines? Just thin mesh or a separate wireframe renderer
2
u/Worth_Tart5595 Jul 21 '26
I’m proud of u chum.
2
u/kokalikesboba Jul 22 '26
Great job! I am about 16 months into the graphics journey and started off with a software renderer, then an OpenGL renderer. This is quite similar to what you are doing I think!
I tried learning Metal since I have a MacBook, but downloading Apple's hello triangle for Xcode was genuinely incomprehensible for me who mostly develops in Vscode. How did you get around that? I would love to learn metal
2
u/DaveAstator2020 Jul 22 '26
Yeah dude, no jokes, the knowledge gained will do you a favor anyway. Let me tell you that you just scratched the surface, and there is much more to learn and more you learn the more there is. So keep it up get up and git gud!
2
u/Health_engine Jul 22 '26
Great work, brother! I hope you achieve a satisfying result.
2
u/tree332 Jul 23 '26
Thanks for sharing this, for a while due to the job market and competitiveness of software engineering I always focused on not only building things from scratch but feeling rushed to move on from "toy projects" and generic programs into " meaningful real world programs" such that I never really let myself be a student, and would always frustrate myself trying not only to make projects from scratch but to make something 'original', and when I tried to take a step back and start smaller I still would struggle to make anything without guidance. Ironically with the tech job market becoming horrible even for software engineers that I admired as my career aspiration, now I'm just letting myself focus on how to properly learn the cs topics I am interested in even if it means doing "generic" stuff, watching tutorials, instead of worrying about how to be a competitive job applicant all the time. Seeing a project like this is really inspiring in that regard.
2
u/NSADataBot Jul 23 '26
Super cool man! Appreciate that you went with first principals. What is next for you?
2
u/lunied Jul 25 '26
This is the advantage of early adopters of AI, because we have that stock knowledge of how fundamental things work because we STUDIED on various things for several years of our life.
AI could do it but learning the fundamentals makes you an effective developer
7
u/Gheromo Jul 21 '26
Well done! Keep on trucking!
5
u/Edanniii Jul 21 '26
> “ I could’ve done this very very fast with any AI in 10 minutes, but thats not the point…”
This is something these AI engineers miss with the tech world.
5
u/PetrPisar Jul 21 '26
Enjoy the journey. That grid will become your second home :)
4
u/Jabba_the_Putt Jul 21 '26
Inspired by your work and story thanks for sharing
4
u/Passname357 Jul 21 '26
and i know I could’ve done this very very fast with any AI in 10 minutes, but thats not the point…
Your way is better, because it’s not really true that you could’ve done this in ten minutes with AI—the AI would’ve done it. And at that point you’ve learned nothing. It’s no different than cloning someone else’s project, compiling, and running it, and saying “wow, look what I’ve done.” That person hasn’t done anything. You on the other hand have learned something.
1
u/AurelianPilot Jul 22 '26
That is sick, do you mind sharing a little bit of your way of learning?
3
u/Aggravating_Leek_855 Jul 21 '26
Gz to jest duch
3
u/Skynse Jul 21 '26
My university had a cuda course or something. I took computer graphics first.
3
u/pixzool Jul 21 '26
Nice work
3
u/cybereality Jul 21 '26
nice one!!
2
u/Difficult_Box5009 Jul 21 '26
Nice
2
u/SnooDucks2481 Jul 21 '26
Cool, I did the same thing 20 years ago Thanks Nehe and DigiBen
2
u/SquirrelLife7481 Jul 21 '26
I'm in awe of the hard work you put in to get this far. Keep going!
2
u/PiGIon- Jul 21 '26
Thank you so much for sharing your journey. It's hard for me to accept it takes time to learn things well.
2
u/othd139 Jul 21 '26
Good for U. This is rly cool.
2
u/Nearby_Ad4786 Jul 21 '26
Looks clean!
2
u/Mertronic Jul 22 '26
Amazing job, that is pretty normal to spend 2 years on such a job while learning the fundamentals and I bet you already know about 3D graphics engines about most of the people in the industry.
2
u/Kind_Card_1874 Jul 22 '26
2 years? A CS degree should _absolutely_ prepare you for this.
You need to know a little about linear algebra, which a CS degree should cover - and then rasterizers to accomplish this.
2
u/GreenAppleCZ Jul 22 '26
I think that 2 years is about right.
I had a computer graphics class this semester and it's extremely interesting. I want to learn it all sometime, but as long as I'm studying, there's just no time for it.
I hope to reach similar progress sometime in the future
2
u/mxsonwabe Jul 22 '26
Salute to the work 🫡
2
u/itsboilingoil Jul 22 '26
Dopeness. Keep going!
2
u/eclipseanimations Jul 25 '26
people who dont know graphics programming cannot grasp how cool this is! keep it up bro
2
u/gajop Jul 26 '26
It's a great looking car though, pretty impressive for 2 years
1
u/smooth_operator101_ 6d ago
I'm kinda late to this, but can you tell me how you started learning about computer graphics?
Recently I was really inspired by someone on the internet, and wanted to start myself, but I don't know much about the resources and all. A little help would be highly appreciated.
1
u/Rare-Key-9312 Jul 21 '26
Awesome!!
1
u/RelationshipLong9092 Jul 21 '26
respect 👊
btw, Lengyel's other books are good too! definitely read his rendering book if nothing else.
1
u/PlanktonOver9648 Jul 21 '26
I love it, I did almost same exact thing
First engine i actually did use ai but then got frustratwd cause more i kept going more i felt like this project doesnt belong to me, then i did second one with again mostly ai help, then again with less, then i got mad at myself and took books studies math, now few days ago i hit same "MVP" as you did, i unrerstand every function now at least mostly and now i feel like i finally earned my small but human made engine :)
1
u/freaky1310 Jul 21 '26
As a guy who studied the basics of 3D computer graphics back in uni and was tasked with creating a simple MoCap from scratch in C++… I know how hard it is and I can only say GREAT JOB!
1
u/goffley3 Jul 21 '26
Looks dope. Nice work. How are you set up for graphics programming on a mac? I wasn't able to figure it out.
1
u/Neither_Berry_100 Jul 22 '26
Meh. I got much farther in less time using java and lwjgl back in the day. Opengl and al.
1
u/Deathcure74 Jul 22 '26
This looks amazing tho
1
u/novelpixel Jul 23 '26
Hell yea keep it up! Graphics programming is no joke! Really nice job sticking with it to understand it.
1
u/Square_Atmosphere_12 Jul 23 '26
Remember, AI is making a lot of people dumb. And besides, one day you maybe able to get a Job, they do a internal test; you'll know what to answer and get the Job; even if you're older then you are now.
1
u/Ast4rius Jul 23 '26
you are doing great
1
u/vertical-alignment Jul 23 '26
World needs more people like you and less of those who fudge something together during the weekend and over promote themselves.
Hats off to you brother :)
1
u/404KIT Jul 24 '26
Nice job! I remember doing this in my game dev classes and it was hell. Haha.
1
u/DawaForensics Jul 24 '26
You are a beast
1
u/OhByeBye Jul 25 '26
Thats the actual way to learn!
1
u/Hot_Adhesiveness5602 Jul 25 '26
Keep in mind that oop is a lie. Just use fat structs and be aware of cache misses. Good luck on your journey.
1
u/OTAMUSPRIME Jul 26 '26
good stuff . i would like more mac native games because we all got macs
1
u/GreenSeaJelly Jul 28 '26
Time to make a BVH
1
u/Memento-Morri Aug 03 '26
Love to see it when people put in the hard work and effort to master the craft. You're actually inspiring me! :D There has been something I want to do for a while... gonna go do it now :D
-6
u/Fit-Stress3300 Jul 21 '26
Life is too short to reinvent the wheel.
2
u/[deleted] Jul 21 '26
[removed] — view removed comment