Code-It-Yourself! 3D Graphics Engine Part #1 - Triangles & Projection

  Рет қаралды 1,778,209

javidx9

javidx9

Күн бұрын

Пікірлер: 2 100
@kakkoiichris
@kakkoiichris 6 жыл бұрын
With Visual Studio 2017, the old project options window shows up when you choose the "Windows Desktop Wizard" option.
@Ageekything
@Ageekything 5 жыл бұрын
Nope same thing except now it throws an exception? Can I send you a screen shot?
@keilanknight8513
@keilanknight8513 5 жыл бұрын
@@Ageekything use the wizard and unselect "precompiled header", also select "empty project" this way you just need to add an item (cpp source file) then you're good to go. Just come across this video now and ran into these same problems after upgrading visual studio! There's something dirty about needing to use a wizard! :)
@franklemanschik_de
@franklemanschik_de 4 жыл бұрын
@@keilanknight8513 you do not even need to use such wizard I for example simply copy project folder structures into so called template projects then I can copy that folder rename it to my new project name and boom it works :D I can open it in any IDE
@vlazm1853
@vlazm1853 Жыл бұрын
I have tried coding rotating square once. Took me way more time I want to accept...
@taba1950
@taba1950 6 жыл бұрын
-"don't click stop just yet" -I'm here for the math
@javidx9
@javidx9 6 жыл бұрын
Lol thanks Almujtaba! Im pleased to hear some people are!
@fuzzycat3651
@fuzzycat3651 6 жыл бұрын
If you aren't I would wonder if you really should be here!
@aradarbel4579
@aradarbel4579 6 жыл бұрын
lol thats so true
@stanislavzoldak2198
@stanislavzoldak2198 6 жыл бұрын
Came to the comment section to say this exactly.
@Luffi98
@Luffi98 6 жыл бұрын
@@fuzzycat3651 I expected more literature but only found math, dissapointed :(
@MrBranh0913
@MrBranh0913 3 жыл бұрын
I’m a backend developer who has spent most of my career never dealing with anything related to games or graphics. But lately I’ve had a curiosity about the world of computer graphics. This is an awesome introduction. Not going to lie some of the matrix multiplication stuff requires a refresher for me, but this is super solid material. Despite coding for 20 years I feel like a total noob again learning programming for the first time.
@carloscepeda8663
@carloscepeda8663 2 жыл бұрын
Same here, lol. In my case I'm really bored of programming /maintaining enterprise applications or making API's and nothing else.
@symbioticparasite6268
@symbioticparasite6268 Жыл бұрын
Your only doing a good job in I.T if you're feeling like a n00b.... It's an infinite loop of knowledge my friend, from 0 to 1 and back again. Nobody knows all, that's why we specialise and collaborate!
@prtygrl5077
@prtygrl5077 Жыл бұрын
you don't need matrix calculations or transforms. he just makes it looks like difficult. Trust me it just takes 15 or less lines of code without any kind of special scenekits or anything. may be he's too d!mb to think. Our eyes only sees anything around us 360 degree any angle, rotated 2d and then rotated 3d. Same can be implemented with simple code.
@helloworld4872
@helloworld4872 Жыл бұрын
​@@prtygrl5077I am a noob, we don't need to learn vector and matrix transform for game development ?
@deathbyslime6725
@deathbyslime6725 Жыл бұрын
​@@prtygrl5077prove it
@iamthebubb
@iamthebubb 5 жыл бұрын
I once made a square that moved around using c++, it took me a week
@richarddukard8989
@richarddukard8989 4 жыл бұрын
Next stop, red dead redemption 2
@blatrump
@blatrump 4 жыл бұрын
@@username6338 So easy, that it's still the primary source of bugs in this language.
@obinator9065
@obinator9065 4 жыл бұрын
Tompas Trupp yah even with RAII and smart pointers around. I’ve created custom allocators for my Game Engine that handle these problems for chunk loading etc. I still have leaks from time to time. There‘ll be a point in advanced Game Engines where ‚new‘ just isn‘t fast enough. The answer to that is Placement New, bug dangerous for sure.
@Odin_Borson
@Odin_Borson 4 жыл бұрын
I csn do that in C with old graphics.h
@alalala132whyisthishandletaken
@alalala132whyisthishandletaken 4 жыл бұрын
well if you don't know c++/c with classes too well that's not unimpressive given how shattered your view of arrays and data structures becomes when you move onto it from JavaScript.
@Lennybird91
@Lennybird91 4 жыл бұрын
As a Junior software engineer whose coverage of graphics consisted of one course utilizing OpenGL in college, I'm very grateful for this series. Exploring the underlying theory devoid of simplifying libraries is exactly what I'm after. Thanks!
@الإسلامدينالحق-خ5ت
@الإسلامدينالحق-خ5ت 2 жыл бұрын
My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life kzbin.info/aero/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- kzbin.info/www/bejne/bZWUZ3amjNVgpc0
@Okuhno
@Okuhno 8 ай бұрын
I went through this series years ago, I ended up porting all the code in the series to lua, it legitimately broadend my horizons and general understanding of code and math, I just want to say thank you.
@javidx9
@javidx9 8 ай бұрын
I'm pleased you found it useful. Thanks!
@TheTukkia
@TheTukkia 6 жыл бұрын
those pespective equations are things that make so much sense, but you will never think of unless you break the whole problem down really well. Nice job man, you make my geometry classes actually worth something
@javidx9
@javidx9 6 жыл бұрын
lol thanks Talento, its surprising how much high-school maths has a practical value in programming!
@bonbonpony
@bonbonpony 5 жыл бұрын
Yup, it all boils down to simple geometry of similar triangles ;)
@yan-amar
@yan-amar 5 жыл бұрын
@@javidx9 What's surprising to me is how high school made all those useful maths uninteresting by not telling us it was actually useful somewhere in the real world.
@maythesciencebewithyou
@maythesciencebewithyou 5 жыл бұрын
@@yan-amar Be honest, you never cared to know back then.
@nich.1918
@nich.1918 4 жыл бұрын
@@maythesciencebewithyou that's literally what he's saying...
@thecakeredux
@thecakeredux 4 жыл бұрын
I coded a 3d engine from scratch this year, without external code examples. Huge headache, but I got it done. Can't wait to see the hundreds of things I did wrong.
@lookupverazhou8599
@lookupverazhou8599 2 жыл бұрын
That's one way to get good at something.
@tellahsage6477
@tellahsage6477 Жыл бұрын
Fucking cool man, wish i had the guts to do that. Most i've ever done was writing 2D platformers in pure C but never even wet my foot into 3D because bad at algebra and the like. I should pick up a math textbook and then try to do something like this after reading it, must be a rewarding experience once you actually see your code work.
@thecakeredux
@thecakeredux Жыл бұрын
@@tellahsage6477 It was amazing when it worked for the first time. I've tried it a couple times in the past and never got it working just right or only under very specific circumstances. Obviously this version bugged out dozens of times, but when it suddenly worked, I was really happy. The math isn't the difficult part about it, I'm pretty much a forklift driver, so I'm no math person by any stretch of the imagination.All you have to do is understand the individual steps, put them to code, abstract it away and you can forget about it forever. I couldn't explain to you vector maths or even do it on paper, but I can write code that does it, and I'm certain you can, too.
@prtygrl5077
@prtygrl5077 Жыл бұрын
yeah me too, I also made a 3d engine. This video su!ks though. he make it complex but it's not. Our eyes only sees anything around us 360 degree any angle, rotated 2d and then rotated 3d. Same can be implemented with simple code. just need cos tan and basic trigonometry.
@thecakeredux
@thecakeredux Жыл бұрын
@@prtygrl5077 No, that would cause constant gimbal locks.
@jeffreyg6850
@jeffreyg6850 5 жыл бұрын
When I die... I want to come back as a line of Javidx9's code...
@Ghost-gj1bx
@Ghost-gj1bx 4 жыл бұрын
@Lorem Ipsum r/unexpectedmonkeyspaw
@DaysOTerrorOfficial
@DaysOTerrorOfficial 4 жыл бұрын
I mean you don’t come Back but i still like what you would like to be 😂
@HalloGaming
@HalloGaming 3 жыл бұрын
Alright you come back as: using namespace std;
@samljer
@samljer 3 жыл бұрын
system("pause");
@tsraikage
@tsraikage 3 жыл бұрын
i lost track of how many times i've watched this video series. 3d engines are my favorite field to practice with. even though i'm never able to fully recreate code on all platforms, its still so satisfying to listen to somebody's explanation who for sure knows subject so good even dummy like me can understand
@wyleong4326
@wyleong4326 4 жыл бұрын
1 minute in and I’m already loving this; graphics, maths, programming and art.
@PinkeySuavo
@PinkeySuavo Жыл бұрын
1 minute in and im out, too dumb for this. Only forwarded for end results.
@hoax-games
@hoax-games 6 жыл бұрын
For the people that wonder about the z-values in the projection matrix: for linear scaling, to get z in the range 0 to 1 you need to: z'=(z-znear)/(zfar-znear). However it is recommended to have higher precision for lower z values (objects that are near to the camera) than for higher z values (objects that are far away). Therefore z' is multiplied by zfar and divided by z (== the given projection matrix z-values in the video just written differently). This is an important note to fully understand the math behind the projection matrix. Thx javidx9 for this awesome video. I for the first time finally understand how a projection matrix is constructed. Thx to you!
@javidx9
@javidx9 6 жыл бұрын
No problem Kreshnik!
@pingyboy3400
@pingyboy3400 Ай бұрын
THANK YOU, i spent the entire day trying to figure out why the z values were like this i could have never guessed that, thank you so much and thanks javidx9 for this amazing video.
@amalirfan
@amalirfan 3 жыл бұрын
I was trying to replicate this in python for past couple of hours, it finally worked.. That was soo satisfying 😄😄
@vilasd.chawan1769
@vilasd.chawan1769 3 жыл бұрын
But how did you do that
@emmettdja
@emmettdja 3 жыл бұрын
Im trying to replicate it in p5 js and I've almost got all the code transferred. Time to think about it as i sleep til tomorrow morning.
@vilasd.chawan1769
@vilasd.chawan1769 3 жыл бұрын
@@emmettdja how do you do that ?
@emmettdja
@emmettdja 3 жыл бұрын
@@vilasd.chawan1769 mainly the matrix multiplication is what is doing this. You can recreate this kind of math on almost anything.
@vilasd.chawan1769
@vilasd.chawan1769 3 жыл бұрын
@@emmettdja ohh , but I didn't get that , as I am new to programming , and I have now only learned python 3 , and made only 3 super simple games
@borkyborkborked
@borkyborkborked 4 жыл бұрын
Following along with this in java, and ive had no trouble keeping up so far. You're a great teacher. You're actually one of the only decent free teachers I've found. You're sitting down and telling me something in a language I've never even programmed in, and I understand it better than the guy using the same language as me and 15 more videos.
@viirtuose.official
@viirtuose.official 5 ай бұрын
Your channel is one of the internet’s gems. Thank you for your dedication, clarity, and passion. Far too many coding channels provide zero value according to Shannon's information theory-utterly predictable content-which is never the case with your videos. I always feel inspired simply watching you explore the infinite possibilities of programming. Many thanks, and cheers from France!
@javidx9
@javidx9 5 ай бұрын
Hey that's very kind of you! Keeps me going too, many thanks!
@OrangeDied
@OrangeDied 2 жыл бұрын
The thing I like about this tutorial is how Javid explains the actual math behind it in an easy to understand way, so you actually learn about how it works instead of blindly copying code. Great tutorial!
@TheGoldenriff
@TheGoldenriff 5 жыл бұрын
This actually gold. I have a degree in computer science and am employed in the field, always wanted to know deeply about graphics. This puts all the math I have taken into a realistic perspective and im finding myself going OHHH, I can take integrals and use trig identities to play around with the actual physics. I want to generate running water and I now have a new respect for the heavy game programmers!! Such a sick course this is man. Appreciate your effort! Im also glad this was theory based and not coupled with a bunch of assumptions!
@wanderingpalace
@wanderingpalace 3 жыл бұрын
this is cool i cant even get into university because i yeeted my entrance exam with a bit of depression now im trying to catch up with stuffs like linear algebra to make my own programs but it is particularly overwhelming after all the wasted years support you and looking forward to see your game
@nevanncopeland8093
@nevanncopeland8093 Жыл бұрын
@@wanderingpalace how'd it go. I hope you got into school and doing well.
@keppycs
@keppycs 2 ай бұрын
@@wanderingpalace hope you're triving now
@ChillBuilds
@ChillBuilds 4 жыл бұрын
I'm not sure how much preparation you put in to your videos, but I would guess it's quite a bit because your explanations are well organized and clear of cluttered language. I appreciate that. Well done.
@javidx9
@javidx9 4 жыл бұрын
Thanks Chill Builds!
@charlesdjones1
@charlesdjones1 Жыл бұрын
I agree. Now go watch a tutorial by King Gath if you want to see the exact opposite, it's impossible to follow along with anything he teaches with all the sidebar stuff.
@summer_xo
@summer_xo 3 жыл бұрын
javid invented computer science, video games, visual studio, 3d graphics and free world class tuition.
@javidx9
@javidx9 3 жыл бұрын
That's quite a list... I don't recall inventing all those things, but I do appreciate the thought and support. Thanks Shane!
@rikittu
@rikittu 3 жыл бұрын
I've always been fascinated how 3d graphics work but couldn't find a good video showing how to make it from scratch. I love that I found this video. Thanks for making it.
@SE45CX
@SE45CX 5 жыл бұрын
What I like about your style is that you present this in a general DIY approach. Without the annoying snobbish attitude what you see so often.
@andrewbhamilton
@andrewbhamilton 4 жыл бұрын
I have studied 3d maths for games and written a simple software renderer before I can safely say, that is the best explanation of the protection matrix I have ever seen. Extremely useful. Thank you javid
@CSPlayerDamon
@CSPlayerDamon 5 жыл бұрын
There is one thing I have to say.. AWESOME! Advanced material like this, presenting both the theory and implementation are quite hard to find. Thank you!
@darklaker
@darklaker 2 жыл бұрын
This is something I made myself during a computer graphics subject some years ago on my computer science degree and It was hard to make it work without help or a simple explanation, I could handle solid objects drawing with polygon shading using the normals but I didn't go further to use textures or other advanced lightning like phong shading or raytracing. Even if there are much more advanced libraries and 3D engines It's important to understand where all that come from and make it work from scratch is much more satisfying. A tutorial like this would be a life saver for me those years, I haven't seen something like this before. Thanks for sharing!
@nockieboy
@nockieboy 4 жыл бұрын
I'm looking to make a hardware 3D accelerator for my home-made 8-bit computer using an FPGA, and this channel is the first place I came to for details on the maths - and you did not disappoint!!
@javidx9
@javidx9 4 жыл бұрын
Sounds like a great project!
@nockieboy
@nockieboy 4 жыл бұрын
It's certainly testing my knowledge of programming and electronics! Keep up the great work - I'm learning loads! 👍
@codecoderr7495
@codecoderr7495 6 жыл бұрын
Now this is what I call old school math-rasterizer exercise. Brilliant because you have the talent to teach fluently. Same as I. Cheers fellow coder.
@javidx9
@javidx9 6 жыл бұрын
Thanks Code Coderr!
@vinniciusrosa8284
@vinniciusrosa8284 4 жыл бұрын
Things I have noticed here: 1) I have to study math 2) I have to watch this 500 times to understand the main idea. 3) I have to try it 20 times a day to get there. 4) Ok, it is hard, but this is amazing!
@DanielCoutoF
@DanielCoutoF 3 жыл бұрын
if u cant understand watching it three times, forget about it, your head isnt for programming, specially if u want to work in the field, your productivity will suffer a lot if you take too much time to grasp new concepts.
@vinniciusrosa8284
@vinniciusrosa8284 3 жыл бұрын
@@DanielCoutoF You are not a programmer. Maybe you feel like "I am the best of my class". I have worked on some big advanced systems that you cannot even imagine. I am talking about REALLY understand 3d. I know linear álgebra and a lot of complicated things. Please, get out. You didn't understand what I said.
@DanielCoutoF
@DanielCoutoF 3 жыл бұрын
@@vinniciusrosa8284 stop replying to comments and go watch the same video for the 100th time.
@javidx9
@javidx9 3 жыл бұрын
Hmmmm. The guy just said he didn't understand something. At least he can admit when he doesn't. That's an underestimated skill. So let's keep things a little calmer eh?
@nettoribeiro4267
@nettoribeiro4267 3 жыл бұрын
@@DanielCoutoF "if you can't understand it watching it three times, forget about it, your head isnt for programming" That's not how it works. That would be the same as telling a kid who just started to play piano to go and learn an entire symphony orchestra by himself. He wouldn't be able to do it, because he needs to learn the fundamentals about music and try simpler songs first. This applies to programming too, in the case of 3D, maybe your background in math is weak and you need to work on it. That said, rewatching the video is a good thing ,every time you watch it, you will see things in a new and clear way. Once you grasp a topic, your mind will be free to worry about the other ones you were to busy to care before.
@Kazdro009
@Kazdro009 6 жыл бұрын
11:49 Top 10 anime betrayals
@StarForgers
@StarForgers 6 жыл бұрын
LOL I guess that would be true for programmers!
@TheBypasser
@TheBypasser 5 жыл бұрын
Guess it should read "all I want is my program to become my own hell;", yet "using namespace std;" is shorter to type so they substituted it ;)
@TheBypasser
@TheBypasser 5 жыл бұрын
Tro Ivas, Not clear enough - should it be read as "no need to use global-scope #using", or, instead, "no reason to ignore it and keep typing std:: everywhere instead"? If the second option it is, then - think of it - it is just four(4!) damn letters, if it feels too much the next logical step is moving on to non-commented code with single-character variable names ;)
@Este44fr
@Este44fr 5 жыл бұрын
@@TheBypasser std::experimental::filesystem::path myPath; This is why you use "using namespace"
@TheBypasser
@TheBypasser 5 жыл бұрын
​@@Este44fr If used not on a single occasion, the secret spell: #define STD_EFS_PATH std::experimental::filesystem::path ;)
@JohnnyThund3r
@JohnnyThund3r 2 ай бұрын
I found the best way to learn the math is to just use code you don't understand at first to get something to work, like Lego blocks stacked one and then another. Then later on learn, go back and learn the Math behind it. So much more fun to learn Math this way and really imprints in your mind what functions are used to do what in a far more practical manner then staring at a chalkboard.
@renatobritto4096
@renatobritto4096 5 жыл бұрын
This is amazing. All that computational geometry being put to practice.
@BkSMedia
@BkSMedia 2 жыл бұрын
As a student in their 3rd year of a degree program, I'm so thankful that my poor knowledge of Calculus, but somewhat decent understanding of Object Oriented Programming is paying off. Lots of really familiar concepts that have clicked and made me go "ahhh so that's what the lecturer was getting at!". It helps that I also used to 3D model game assets as well. Love that you've really gone to the absolute basics which is what I needed!
@MuradBeybalaev
@MuradBeybalaev 4 жыл бұрын
21:51 "If I put some *imaginary numbers* next to this..." A mathematician gets excited. 21:56 Basic *integers* are drawn. The mathematician gets disappointed.
@youssef2366
@youssef2366 4 жыл бұрын
Well in all fairness he didnt say lateral numbers
@violenceisfun991
@violenceisfun991 3 жыл бұрын
"Pi is exactly 3!" Sorry. I couldn't help myself
@user-dh8oi2mk4f
@user-dh8oi2mk4f 3 жыл бұрын
@@violenceisfun991 that’s the fundamental theorem of engineering
@guacamolen
@guacamolen 6 жыл бұрын
I was trying to find something on how to do this a couple of months ago. I'm glad I subscribed! Nice treat to see it.
@javidx9
@javidx9 6 жыл бұрын
Good stuff! Thanks Michael
@mr_noodler
@mr_noodler Жыл бұрын
This guy is so awesome because the more I practice programming, every time I watch this I understand more and realize how much he really knows what he’s talking about. Javidx9 is well educated and experienced
@Agent56000
@Agent56000 8 ай бұрын
Any advice for a complete beginner
@reubenbridges
@reubenbridges Жыл бұрын
Feels like I just watched a classic PBS show on programming, late 80s early 90s. Excellent video.
@jamesw242
@jamesw242 6 жыл бұрын
You could charge for these vids.. But i appreciate you not doing. I'm on long term sick and your videos help me do something useful with my time and to better myself
@javidx9
@javidx9 6 жыл бұрын
Hi James, I really appreciate what you are saying, and it pleases me because youve captured the essence of my entire OneLoneCoder initiative in one personal example. Thank you!
@starinsky2873
@starinsky2873 6 жыл бұрын
@@javidx9 Thanks programmer! Matrix is useful though.
@bonbonpony
@bonbonpony 5 жыл бұрын
@@javidx9 Those who charge for their courses apparently forgot how they learnt their stuff in the first place (from freely available resources). If they had to pay for their knowledge, they would most likely not have it today. Spreading your knowledge for free means that one day someone else will give you their knowledge for free too. And that's how this world should work. Unfortunately, I see that it is heading in the very opposite direction more and more every day ;/ (because of money-induced greed).
@bonbonpony
@bonbonpony 5 жыл бұрын
@Trys10Studios You see, you fell into the same trap most people do, putting the cart before the horse, that is, money before the thing it is paid for. In a logical world, you would do something because you enjoy doing it, and if someone finds it useful, they reward you with some goods in return to support you and make sure you will do more of it. When you do it the other way around, that is, you demand money or else you won't lift a finger, you're planning your own disaster. Because then, if people don't want to pay you, you blame them for being unfair or ungrateful, or blame yourself / your product for not being good enough, etc. Money takes out all the fun from life, because now you're starting to "work for money", and if you don't get money, you start to think that it is pointless to do something that you would otherwise do with pleasure out of pure boredom :q If people worked that way all the time (that is, do nothing unless someone pays them), no one would ever invent anything, created any piece of art, etc. And if you think about it somewhat deeper and on a broader scale, who do we work for, really? We work for each other, exchanging money in circles. So why do we really need that money? Couldn't we just work for each other directly, without this additional burden? Well, we could. And we did, back then in the past, when barter was the only means of economy (as it is in nature in general). Originally, money was just another commodity that could be exchanged for other goods or services, because it had inherent value. But then the tricky banksters come up with an idea of forging fake money (bank notes) of no inherent value whatsoever and exchange them for real value on the market, draining all the goods from it and turning people into their clueless slaves. Now we don't really work for each other that much anymore - we work for THEM now, because when you track where all the currency (which is no longer true money) comes from, you will always end up in some bank. They created a system in which you HAVE TO work for them in order to get money for your life, otherwise they don't let you just live happily and do whatever you want.
@pubx2719
@pubx2719 5 жыл бұрын
@@javidx9 How to create a game like yourself
@spicytuna08
@spicytuna08 6 жыл бұрын
final result is awesome.
@AaronBowley
@AaronBowley 6 жыл бұрын
Seriously , this is the kind of content I yearn for . True fundamentals
@javidx9
@javidx9 6 жыл бұрын
Hey thanks Aaron!
@XoIoRouge
@XoIoRouge Жыл бұрын
I've been following other guides to make a rotating cube on screen using quads and a much simpler projection matrix - it only worked when no one actually looked at the math (a varied rotation to all thetas would be hard for a human to naturally track as "correct"); but when I wanted to give players control over the rotation, or interact with it more, it fell apart very fast. I'm going to restart my project from the ground up following THIS method, thank you so much for going more indepth into the math and the use of triangles instead of just points!
@arsnakehert
@arsnakehert 2 жыл бұрын
This is probably the best explanation of projection matrices I’ve seen on the internet
@Wjw129
@Wjw129 5 жыл бұрын
Finally, a programming tutorial where you cant hear the tutor’s saliva. Very helpful though so far, thanks so much.
@kenji1856
@kenji1856 5 жыл бұрын
yes, I too am no longer educating myself because the person trying to teach me produce saliva in their mouth, and apparently I can hear it.
@kristypolymath1359
@kristypolymath1359 4 жыл бұрын
Maybe if the teachers weren't buried in your lap....
@anisnej10
@anisnej10 4 жыл бұрын
@@kenji1856 poor attempt at a verbose meme.
@onesubscriberbeforechallenge
@onesubscriberbeforechallenge 4 жыл бұрын
no homo
@shadybandit7
@shadybandit7 4 жыл бұрын
and the damn music
@rightwingsafetysquad9872
@rightwingsafetysquad9872 4 жыл бұрын
Episode 2: moving the camera. Episode 3: Duke Nukem.
@johnjackson9767
@johnjackson9767 6 жыл бұрын
It'll be interesting to see how far you can get with a software renderer using your framework. It's also great that you're showing the math and concepts behind this - it's surprising to me ( and sad, frankly ) that even in industry there are devs who simply don't know this stuff.
@javidx9
@javidx9 6 жыл бұрын
Hi John, I agree - it's all very well copying code parrot fashion to get a job done, but when it goes wrong knowing how to fix it is where the real talent lies. There will of course be some topics I can't directly cover using a command prompt alone, and as my colour and texture resolutions are a bit low, some techniques we take for granted on GPUs will simply not be applicable.
@VS-rv5xh
@VS-rv5xh 5 жыл бұрын
thanks to you i finished my bachelor in IT since I really found my love for programming again
@adibattie9619
@adibattie9619 Жыл бұрын
5 years later and this video is still top notch. I followed along a few years ago and got it working in C++. I revisited this today because I wanted to try and get it working using my own programming language, which already has C++/SDL bindings. I wanted to get some 3D action happening but with OpenGL I would need to spend at least a week writing GL bindings, but with this approach I can get some basic 3D stuff happening using only the SDL API I've already written. Amazing stuff, thank you Javid!
@joshlovesfood
@joshlovesfood 3 жыл бұрын
This video is actually incredible, I am impressed with your skills, and you are a very strong & serious computer scientist
@manuellehmann267
@manuellehmann267 6 жыл бұрын
Oh, my god. He just opened pandoras box :-D 3D graphics is an interesting but sooooo complicated topic. Looking forward for upcoming episodes. :-)
@javidx9
@javidx9 6 жыл бұрын
Thanks donnerbrenn! It certainly does open up lots of opportunities for interesting videos
@starinsky2873
@starinsky2873 6 жыл бұрын
Next time when you play games you will think about furious developer.
@jax2059
@jax2059 5 жыл бұрын
Tro Ivas k
@jax2059
@jax2059 5 жыл бұрын
Tro Ivas ok
@bonbonpony
@bonbonpony 5 жыл бұрын
Well, it's good to know what's in the box if you're gonna use it.
@EximiusDux
@EximiusDux 6 жыл бұрын
Ah. thank you for the projection matrix and its explanation. I once made something similar to this, but i never wrapped my head around the Matrix system. meaning: i was staring myself blind at the concept of it.
@javidx9
@javidx9 6 жыл бұрын
No problem TriCore, glad it helped!
@Ryan-xq3kl
@Ryan-xq3kl 4 жыл бұрын
This is the kinda info we can use to make 3d game design more applicable to more varieties of programmers
@dudubroder
@dudubroder 4 жыл бұрын
Thank you so much! Omg I was so desperate in regards to learning C++ before watching this. You saved me! I know quite a lot of C# but never touched outside big game engines and C++. Now I watch your videos and everytime I have a doubt I stop it, open a tab and find the explanation before continuing. It is working great and also you are the programming bob ross
@uploadschedule
@uploadschedule 2 жыл бұрын
When he said that he will talk about the theory and the mathematical stuff at 1:06 i knew it was the right tutorial.
@robertelder6155
@robertelder6155 6 жыл бұрын
Really cool video. Thank you for taking the time to explain the concepts. The visual descriptions were nice and helped a lot. You also moved slowly and it was easier to keep up with your content and explanations. Keep up the good work!! Just started this series.
@javidx9
@javidx9 6 жыл бұрын
Hi Robert, great to hear, thanks for your support!
@josephmills1104
@josephmills1104 6 жыл бұрын
This is just incredible, man. Wow, thanks for this!
@javidx9
@javidx9 6 жыл бұрын
Thanks Joseph!
@dantheman1464
@dantheman1464 2 жыл бұрын
Finally someone presented this approach to 3D graphics in an approachable manner.
@fgarza
@fgarza 2 ай бұрын
This is what I was looking for, Just plan simple where does it all come from, the calculations, the formulas etc.. Amazing explaining, a bit far ahead than my understanding for coding but I was able to follow through. I'm using Three.js for graphics but I wanted to learn where everything comes from and this is exactly it. Thank you!
@astrahcat1212
@astrahcat1212 Жыл бұрын
“We’re just gonna paint a lil struct over here……..that’s right, just a lil happy struct…” 😂😂😂😂
@Hyperdelica-Xander
@Hyperdelica-Xander 6 жыл бұрын
This is incredible. You continue to amaze me.
@daviddawkins
@daviddawkins 5 жыл бұрын
Such a good explanation of the projection matrix. Thank you.
@TheDonaldskates
@TheDonaldskates 3 жыл бұрын
you explain this very well and you make it seem easy when in reality this takes a lot of patience
@javidx9
@javidx9 3 жыл бұрын
That's the curse of KZbin videos. Never assume anything I do on screen takes 30 minutes. Editing makes it look that way, but in reality it's much longer. The objective of my videos is to expose people to the things they may need to know about to achieve a specific goal.
@richardlincoln886
@richardlincoln886 2 жыл бұрын
38 years ago, 14-15 year old me would have loved this... Trying to work out 3d from first principles with no mentor was impossible - closest I got was some isometric style landscape plots on a BBC micro :)
@farazzaidi944
@farazzaidi944 5 жыл бұрын
Start of Video - "I'm gonna make a Game Engine myself!" After 15 mins - "Well, why waste the efforts of those who've already done this mathematics..."
@BlakeKane
@BlakeKane 5 жыл бұрын
It is a coding practice and a challenge.
@zephyr7
@zephyr7 4 жыл бұрын
@@BlakeKane he was making a joke
@marsireteng3574
@marsireteng3574 4 жыл бұрын
brah thats me right now
@madscientist7430
@madscientist7430 4 жыл бұрын
@@username6338 #ItsACodingPracticeAndAChallengeGang
@aleisterlavey9716
@aleisterlavey9716 4 жыл бұрын
"I wanna learn trough experience" perfect excuse for every fail you do.
@saeed6296
@saeed6296 4 жыл бұрын
I tried to do this projection in a lame way when I was in high school, this video brings back those memories 😭 you're awesome
@JimmyJohanes
@JimmyJohanes 4 жыл бұрын
can you imagine the source code complexity of program like 3ds max, blender ..
@javidx9
@javidx9 4 жыл бұрын
Well i believe blender is open source, so no need to imagine it! Go check it out!
@javidx9
@javidx9 4 жыл бұрын
github.com/blender/blender
@theslavegamer
@theslavegamer 3 жыл бұрын
@Christian Weissmuller like a 3rd of the program is managing the interface, there's so many hotkeys for re-ordering and hiding UI elements. I love blender
@Windeycastle
@Windeycastle 2 жыл бұрын
Thank you very much for this series! I'll happily code along and see where I end up
@duality4y
@duality4y 3 жыл бұрын
I love these videos i never just copy the code I watch the video and try to undestand the concepts and then develop my own solutions which often happen to end up looking like the ones in the videos!
@gettanned-foureyes2417
@gettanned-foureyes2417 6 жыл бұрын
This is What I acutually want to know ! Hope The Next Video will be Uploaded Tommorow .
@javidx9
@javidx9 6 жыл бұрын
lol, sadly it wont be tomorrow - but I hope to show quite a complete system by the end of the series.
@gettanned-foureyes2417
@gettanned-foureyes2417 6 жыл бұрын
Though it won't be tommorw , it can be uploaded 2 hours later ( exactly not tommorw but today ) . ... Sorry , What I wanna say is I like your videos as much as I think so . If I can push Like 3.14 times or 2.718 times ... But KZbin allow me to push it only once .
@peepwebdev575
@peepwebdev575 4 жыл бұрын
I have just starting watching OLC videos. i have been amateur coding for about 3 years with python and some JS. This is fascinating. I cannot grasp the mathematical concepts but i kind of get whats happening with the C++. I'm going to try and dissect this video series and hopefully come out the other side with a basic understanding.
@javidx9
@javidx9 4 жыл бұрын
Glad it was helpful!
@الإسلامدينالحق-خ5ت
@الإسلامدينالحق-خ5ت 2 жыл бұрын
My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life kzbin.info/aero/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- kzbin.info/www/bejne/bZWUZ3amjNVgpc0
@pendergastj
@pendergastj 6 жыл бұрын
Just what ive been waiting to see! Awesome!
@javidx9
@javidx9 6 жыл бұрын
Hi jamie i hope it lives up to expectation!
@londalecarter3482
@londalecarter3482 5 жыл бұрын
Ive read lots of 3d graphics books.....You summed all that shit up in like 20 mins! you are amazing sir! Youv'e made a lot of people happy including myself! Thanks! Usually books get into proofs that get explained horribly! Wow! This is a money vid!
@spaderkungskuk
@spaderkungskuk 4 жыл бұрын
I've seen this excellent tutorial 65 times, and the younger me wished that it was explained that the projection matrix is just one of many possible. It's not an universal matrix, nor the only one, a special case of a linear projection. And the "-1 to +1" scale is, I believe, because of how the OLC GameEngine draws stuff, so that part of the tutoral is also only valid for similar environments.
@mettaursp309
@mettaursp309 4 жыл бұрын
-1 to 1 for projections is a space called normalized device coordinates (NDC) that's been standardized for pretty much all hardware accelerated graphics for decades. Pretty much everything uses it.
@dynamagon
@dynamagon 2 жыл бұрын
Thanks for the video! You are a very great teacher, and especially great since this video is free. I'm following along in C with a 2D graphics pixel plotting engine I wrote from scratch!
@joaquimspeck
@joaquimspeck 6 жыл бұрын
This is awesome! Nicely presented!
@javidx9
@javidx9 6 жыл бұрын
Thanks joaquimspeck!
@alexanderhugestrand
@alexanderhugestrand 6 жыл бұрын
I liked this video without even watching, since this kind of programming is where I come from. An idea I've implemented myself: Skip the whole concept of a "near" plane for clipping the polygons and clip them against the view frustum instead. That way you can get infinitely close to a wall without seeing anything clipping. In the very unlikely case where the clipped polygon gets a point exactly at the origin, you can skip that polygon altogether to avoid division by zero - the player wouldn't see the polygon anyway, since the camera is exactly in its plane. If done right, so that you can trust the clipping algorithm, you'll be able to get rid of a bunch of if-statements in the inner rasterization loops (that's an optimization) where you normally would clip the projected triangle against the screen edges. Yet another idea to do all this but still render things on the GPU: Write the rasterization in OpenCL or CUDA.
@javidx9
@javidx9 6 жыл бұрын
Hi and thanks Alexander. I think there are several ways to interpret near plane clipping - I do move on to frustum clipping later in the series. I spent some time once rendering triangles with CUDA. The rendering bit is easy, but the scene partitioning bits to make sure the right warps/groups are accessing the right structural data is a real pain.
@stevenray8737
@stevenray8737 6 ай бұрын
Just spent the day going over your tutorial, using C and SDL, and its brilliant. The projection part reminds me of the code I was writting for a Raycasting demo, a few years ago.
@mojoofc9528
@mojoofc9528 5 жыл бұрын
I recently started learning the language, and this is my first language, this one video felt like 5 minutes, and I’ve learned soooo much. Going to the part two after the breakfast, I love you man
@fckyo333ujhjjkrrrr
@fckyo333ujhjjkrrrr 6 жыл бұрын
Thank you Javid, very cool
@mattstirling6317
@mattstirling6317 5 жыл бұрын
"Have a think about subscribing" I thunk, and I subbed.
@romanthegambler6966
@romanthegambler6966 4 жыл бұрын
*Thunk* \*A sound of bumping your head into subscription button\*
@furkanunsal5814
@furkanunsal5814 4 жыл бұрын
You Thunk?
@ithaca2076
@ithaca2076 3 жыл бұрын
@@furkanunsal5814 he thunk
@ILGiullareDiCorte
@ILGiullareDiCorte 6 жыл бұрын
Very thanks! I am a computer science student and i love all your projects but this, is awesome! Thanks for the time that you spend for share your knowledge!
@javidx9
@javidx9 6 жыл бұрын
No problem! Thanks for your kind words and support!
@thesageofwisdom3763
@thesageofwisdom3763 2 жыл бұрын
THANK YOU!!!!! you are a life saver. I'm learning nothing from school. your teachings is worth the 90K i dropped on my school
@zawadhyaa
@zawadhyaa Ай бұрын
Thanks a lot brother, this was frustrating yet so fun at the end when i finally made it work. You are a great teacher!
@masterride3604
@masterride3604 6 жыл бұрын
4:31 Here it is, a croissant XD
@gmodrules123456789
@gmodrules123456789 4 жыл бұрын
Minor but important detail. The matrix multiplication here is in row-major, but all of the matrices on Wikipedia are in column-major, so you will need to convert them before implementing them.
@mmiisshhaa
@mmiisshhaa Жыл бұрын
right??? I'm currently ending my first linear algebra course in uni, and I was quite stuck on what he was doing there... Do you know why he did this? isn't row more common?
@lucs0091
@lucs0091 6 жыл бұрын
I learned by heart all the algebra formulas to pass an exam, but never understood them... until now.
@javidx9
@javidx9 6 жыл бұрын
Good Stuff Lucas, i learn maths much quicker if I have a practical use for it.
@gamersunite9026
@gamersunite9026 3 жыл бұрын
jesus christ, i have basically no experience with this and im understanding all of it. great job dude, you're the best
@TrebleWing
@TrebleWing 5 жыл бұрын
Great presentation. All this kinda code is way above my head (at the moment) but you are entertaining enough to keep watching and absorbing. Thanks for making these.
@blacksage81
@blacksage81 5 жыл бұрын
If you really want to learn to code, pick a language, write the most basic of basic programs. "Hello World" I'd recommend C++ since its old and there should be tons of resources and sample code available.
@aradarbel4579
@aradarbel4579 6 жыл бұрын
just found your channel, and saw this video! this is exactly what I was looking for! You have a new sub ;D
@javidx9
@javidx9 6 жыл бұрын
Thanks buddy!
@3DSage
@3DSage 6 жыл бұрын
Ahh you beat me to it! Haha great video as always.
@Pridetoons
@Pridetoons 6 жыл бұрын
3DSage I wish you'd post some Gameboy Advance tutorials on your channel.
@Pridetoons
@Pridetoons 6 жыл бұрын
Also from watching your channel I heard you want to make a Game Console. I have two books to recommend to you. 1) The Black Book of Game Console Design from Andre LaMothe 2) The ZX Spectrum ULA Also check out the UZEbox.
@javidx9
@javidx9 6 жыл бұрын
Lol oh dear, thanks 3DSage, clues in the name though right? XD it would be interesting to see this done from a more embedded systems perspective.
@3DSage
@3DSage 6 жыл бұрын
Yes I will do that sometime!
@3DSage
@3DSage 6 жыл бұрын
Yes It would be a dream of mine to make my own game console. It would be incredibly simple but even that would be amazing to me. Thank you for the books!
@Levigumba
@Levigumba 5 жыл бұрын
"Now we won't get quite that far in this video..." *checks vid length* Oh boy do I have some catching up to do
@chikokishi7030
@chikokishi7030 4 жыл бұрын
I just found this series today. I instantly subscribed because ive been SO interested in this for years, and your videos seem very well made, thank you!
@الإسلامدينالحق-خ5ت
@الإسلامدينالحق-خ5ت 2 жыл бұрын
My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life kzbin.info/aero/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- kzbin.info/www/bejne/bZWUZ3amjNVgpc0
@manameisjeffie656
@manameisjeffie656 3 жыл бұрын
it was hard, really hard espacialy at the ending but it was intersting, definitly rewatching it when i will have more knowledge, thx for this great tutorial
@tsraikage
@tsraikage 3 жыл бұрын
Finally just finished it in python/TK. This is so cool. first for some reason i've got a flat cube rotating and it was hilarious, like train ran over the cube, it was 2D but was rotating in 3D. thank you
@javidx9
@javidx9 3 жыл бұрын
Lol sounds like you've had some fun. That's the part I love most, when the unexpected happens! Often a great way to learn something new. For example, you've flattened your cube, that's not a million miles away from how shadows get implemented.
@spjewkes
@spjewkes 6 жыл бұрын
Nicely done, David. I’m looking forward to the last episode of this series where you demonstrate a spinning, textured Vimto can :)
@javidx9
@javidx9 6 жыл бұрын
Lol Steve, you know what? Challenge accepted!
@AlienScribble
@AlienScribble 5 жыл бұрын
Very nice - makes sense!
@imshaunnurse
@imshaunnurse 4 жыл бұрын
How'd it go? You finish?
@Poeterish
@Poeterish 3 жыл бұрын
Pleeeeease never stop making videos on KZbin ! Thank you so much for your effort !
@RoboMarchello
@RoboMarchello Жыл бұрын
This tutorial is so helpful with your math explanations, so easy to understand 3d with your videos compared to others. Thank you so much!
@Waffles_Syrup
@Waffles_Syrup 4 жыл бұрын
I'm learning python, so I decided to try out this project using dataclasses in place of structs and opencv to draw the images. Got through it after 5 hours haha.
@catalinul5700
@catalinul5700 6 жыл бұрын
Amazing! :D
@javidx9
@javidx9 6 жыл бұрын
Thanks Cata!
@MacShrike
@MacShrike 6 жыл бұрын
Omg, thank you! I had made my own 3d projection algorithms, without to much math skills they were more like... heuristics =) Although they looked good at faking 3d I ran into lots of trouble later on. So again, thank you. I'll sit through this and soak it up. 30 years too late but this time I actually want to know. Hooray!
@BrisbaneStomp
@BrisbaneStomp 3 жыл бұрын
I've been thinking about this and other programmes you've made for a while but never thought anyone would be making these kind of programmes. So happy I stumbled across your channel, thanks a lot and keep up the good work mate
@Pedozzi
@Pedozzi 5 жыл бұрын
you are such a smart person. I studied industrial design, and i really appreciated this serie, even if i don't know how to code it is a great way to understand at least what 3d graphic (3D on 2D) engines do on a macro level. Thanks
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 100 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 41 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Part no 13 | How to make an Animated Website with React JS
29:37
I Created My Own Custom 3D Graphics Engine
26:29
Inkbox
Рет қаралды 118 М.
Coding Challenge #112: 3D Rendering with Rotation and Projection
33:13
The Coding Train
Рет қаралды 208 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 119 М.
What Is A Graphics Programmer?
30:21
Acerola
Рет қаралды 460 М.
Let's Program Doom - Part 1
25:13
3DSage
Рет қаралды 459 М.
The Math behind (most) 3D games - Perspective Projection
13:20
Brendan Galea
Рет қаралды 428 М.
Much bigger simulation, AIs learn Phalanx
29:13
Pezzza's Work
Рет қаралды 2,8 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 100 МЛН