Тёмный

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

javidx9
Подписаться 313 тыс.
Просмотров 1,7 млн
50% 1

This video is part #1 of a new series where I construct a 3D graphics engine from scratch. I start at the beginning, setting up the project, then discuss vertices and triangles. Next a description of how 3D coordinates are converted into on-screen 2D coordinates using a projection matrix. This results in seeing a cube being rotated in 2-axis and translated.
Source: github.com/OneLoneCoder/Javid...
/ javidx9
/ discord
Blog: www.onelonecoder.com
Twitter: @javidx9
Twitch: javidx9

Наука

Опубликовано:

 

1 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2,1 тыс.   
@kakkoiichris
@kakkoiichris 5 лет назад
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 4 года назад
@@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! :)
@franklemanschik4862
@franklemanschik4862 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 9 месяцев назад
I have tried coding rotating square once. Took me way more time I want to accept...
@taba1950
@taba1950 5 лет назад
-"don't click stop just yet" -I'm here for the math
@javidx9
@javidx9 5 лет назад
Lol thanks Almujtaba! Im pleased to hear some people are!
@fuzzycat3651
@fuzzycat3651 5 лет назад
If you aren't I would wonder if you really should be here!
@aradarbel4579
@aradarbel4579 5 лет назад
lol thats so true
@stanislavzoldak2198
@stanislavzoldak2198 5 лет назад
Came to the comment section to say this exactly.
@Luffi98
@Luffi98 5 лет назад
@@fuzzycat3651 I expected more literature but only found math, dissapointed :(
@iamthebubb
@iamthebubb 4 года назад
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
@jebactychpolicjantow5497
@jebactychpolicjantow5497 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.
@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 Год назад
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 9 месяцев назад
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 9 месяцев назад
​@@prtygrl5077I am a noob, we don't need to learn vector and matrix transform for game development ?
@deathbyslime6725
@deathbyslime6725 6 месяцев назад
​@@prtygrl5077prove it
@Okuhno
@Okuhno Месяц назад
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 Месяц назад
I'm pleased you found it useful. Thanks!
@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
@felixmerz6229
@felixmerz6229 3 года назад
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.
@felixmerz6229
@felixmerz6229 Год назад
@@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 9 месяцев назад
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.
@felixmerz6229
@felixmerz6229 9 месяцев назад
@@prtygrl5077 No, that would cause constant gimbal locks.
@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!
@user-ri2ms2mm7w
@user-ri2ms2mm7w Год назад
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 ru-vid.com/group/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7d16CpWp-ok.html
@jeffreyg6850
@jeffreyg6850 4 года назад
When I die... I want to come back as a line of Javidx9's code...
@Ghost-gj1bx
@Ghost-gj1bx 4 года назад
@@MantasXVIII r/unexpectedmonkeyspaw
@officialsizzle5797
@officialsizzle5797 3 года назад
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 2 года назад
system("pause");
@hoax-games
@hoax-games 5 лет назад
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 5 лет назад
No problem Kreshnik!
@TheTukkia
@TheTukkia 5 лет назад
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 5 лет назад
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 4 года назад
@@yan-amar Be honest, you never cared to know back then.
@nich.1918
@nich.1918 4 года назад
@@maythesciencebewithyou that's literally what he's saying...
@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 3 года назад
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
@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 4 года назад
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
@lightbulb8888
@lightbulb8888 3 года назад
and the damn music
@jamesw242
@jamesw242 5 лет назад
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 5 лет назад
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 5 лет назад
@@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 4 года назад
@@javidx9 How to create a game like yourself
@wyleong4326
@wyleong4326 3 года назад
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.
@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.
@TheGoldenriff
@TheGoldenriff 4 года назад
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 2 года назад
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.
@Kazdro009
@Kazdro009 5 лет назад
11:49 Top 10 anime betrayals
@trevorthieme5157
@trevorthieme5157 5 лет назад
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 4 года назад
@@TheBypasser std::experimental::filesystem::path myPath; This is why you use "using namespace"
@TheBypasser
@TheBypasser 4 года назад
​@@Este44fr If used not on a single occasion, the secret spell: #define STD_EFS_PATH std::experimental::filesystem::path ;)
@summer_xo
@summer_xo 2 года назад
javid invented computer science, video games, visual studio, 3d graphics and free world class tuition.
@javidx9
@javidx9 2 года назад
That's quite a list... I don't recall inventing all those things, but I do appreciate the thought and support. Thanks Shane!
@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!
@tsraikage
@tsraikage 2 года назад
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
@Grandalf3004
@Grandalf3004 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.
@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!
@renatobritto4096
@renatobritto4096 5 лет назад
This is amazing. All that computational geometry being put to practice.
@ChillBuilds
@ChillBuilds 3 года назад
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 3 года назад
Thanks Chill Builds!
@charlesdjones1
@charlesdjones1 5 месяцев назад
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.
@rightwingsafetysquad9872
@rightwingsafetysquad9872 3 года назад
Episode 2: moving the camera. Episode 3: Duke Nukem.
@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.
@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!
@farazzaidi944
@farazzaidi944 4 года назад
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 4 года назад
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 3 года назад
@@username6338 #ItsACodingPracticeAndAChallengeGang
@aleisterlavey9716
@aleisterlavey9716 3 года назад
"I wanna learn trough experience" perfect excuse for every fail you do.
@codecoderr7495
@codecoderr7495 5 лет назад
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 5 лет назад
Thanks Code Coderr!
@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
@adibattie9619
@adibattie9619 10 месяцев назад
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!
@AaronBowley
@AaronBowley 5 лет назад
Seriously , this is the kind of content I yearn for . True fundamentals
@javidx9
@javidx9 5 лет назад
Hey thanks Aaron!
@manuellehmann267
@manuellehmann267 5 лет назад
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 5 лет назад
Thanks donnerbrenn! It certainly does open up lots of opportunities for interesting videos
@starinsky2873
@starinsky2873 5 лет назад
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.
@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
@darklaker
@darklaker Год назад
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!
@khrissxander
@khrissxander 5 лет назад
This is incredible. You continue to amaze me.
@uploadschedule
@uploadschedule Год назад
When he said that he will talk about the theory and the mathematical stuff at 1:06 i knew it was the right tutorial.
@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
@joshlovesfood
@joshlovesfood 3 года назад
This video is actually incredible, I am impressed with your skills, and you are a very strong & serious computer scientist
@JimmyJohanes
@JimmyJohanes 3 года назад
can you imagine the source code complexity of program like 3ds max, blender ..
@javidx9
@javidx9 3 года назад
Well i believe blender is open source, so no need to imagine it! Go check it out!
@javidx9
@javidx9 3 года назад
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
@guacamolen
@guacamolen 5 лет назад
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 5 лет назад
Good stuff! Thanks Michael
@XoIoRouge
@XoIoRouge 8 месяцев назад
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!
@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
@robertelder6155
@robertelder6155 5 лет назад
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 5 лет назад
Hi Robert, great to hear, thanks for your support!
@daviddawkins
@daviddawkins 4 года назад
Such a good explanation of the projection matrix. Thank you.
@fly7188
@fly7188 Год назад
thanks, your illustrations and explicit coding style really help illustrate the different components and concepts for this build. i learned much.
@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.
@EximiusDux
@EximiusDux 5 лет назад
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 5 лет назад
No problem TriCore, glad it helped!
@spicytuna08
@spicytuna08 5 лет назад
final result is awesome.
@Pedozzi
@Pedozzi 4 года назад
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
@christianmoss9196
@christianmoss9196 3 года назад
Just came across this and your channel, amazing stuff, as a modern day game dev even just watching the videos helps me understand what my abstracted game engine is doing under the hood
@astrahcat1212
@astrahcat1212 Год назад
“We’re just gonna paint a lil struct over here……..that’s right, just a lil happy struct…” 😂😂😂😂
@dynamagon
@dynamagon Год назад
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!
@vladisoc2866
@vladisoc2866 4 года назад
This is pure gold. Your explanation about projection is incredible simple to understand! Thanks for sharing the knowledge!
@VS-rv5xh
@VS-rv5xh 4 года назад
thanks to you i finished my bachelor in IT since I really found my love for programming again
@josephmills1104
@josephmills1104 5 лет назад
This is just incredible, man. Wow, thanks for this!
@javidx9
@javidx9 5 лет назад
Thanks Joseph!
@johnjackson9767
@johnjackson9767 5 лет назад
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 5 лет назад
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.
@canitbeapplied2500
@canitbeapplied2500 2 года назад
Awesome tutorial ! The amount of depth you go into with everything makes it easy to translate to other languages.
@Windeycastle
@Windeycastle Год назад
Thank you very much for this series! I'll happily code along and see where I end up
@joaquimspeck
@joaquimspeck 5 лет назад
This is awesome! Nicely presented!
@javidx9
@javidx9 5 лет назад
Thanks joaquimspeck!
@saeed6296
@saeed6296 3 года назад
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
@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!
@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.
@fckyo333ujhjjkrrrr
@fckyo333ujhjjkrrrr 5 лет назад
Thank you Javid, very cool
@gettanned-foureyes2417
@gettanned-foureyes2417 5 лет назад
This is What I acutually want to know ! Hope The Next Video will be Uploaded Tommorow .
@javidx9
@javidx9 5 лет назад
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 5 лет назад
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 RU-vid allow me to push it only once .
@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!
@user-ri2ms2mm7w
@user-ri2ms2mm7w Год назад
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 ru-vid.com/group/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7d16CpWp-ok.html
@harvymckiernan93
@harvymckiernan93 Месяц назад
Gosh! This takes me back to the early 1980's. I must admit, the mathematical principles havent really changed. I use to do a lot of technical illustration work, and I remember reverse engineering my geometric grids and inputting the formulae into a ZX spectrum 48k. There was no reference model, so a lot of trial and error, and a few issues with the Tan function reaching infinity. I remember saying to everyone, this will catch on one day!! They Laughed! Unfortunatey, the refresh rate,was increadibly slow after barely contructing a cube. But it was absolutely fascinating to rotate the cube just by inputting a key$. I was in my element!
@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!
@user-ri2ms2mm7w
@user-ri2ms2mm7w Год назад
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 ru-vid.com/group/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B- ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7d16CpWp-ok.html
@ankursharma4827
@ankursharma4827 5 лет назад
Did I ever tell you this, "You are just awesome, man!" :-)
@RoboMarchello
@RoboMarchello 10 месяцев назад
This tutorial is so helpful with your math explanations, so easy to understand 3d with your videos compared to others. Thank you so much!
@santichulito
@santichulito 4 года назад
Man i love you, your channel is everything i need and more, just starting to code but this is the stuff i'm most interest on, you have a lot of really good videos with very nice explanation to everything and i can't thank you enough for you work, love from Argentina!
@ILGiullareDiCorte
@ILGiullareDiCorte 5 лет назад
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 5 лет назад
No problem! Thanks for your kind words and support!
@alexanderhugestrand
@alexanderhugestrand 5 лет назад
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 5 лет назад
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.
@dz-
@dz- Год назад
Javidx9, your tutorials are fantastic! Thank you so much for them, and also for the magnificently documented olcPixelGameEngine.
@Genciak
@Genciak 4 года назад
I really enjoy this video and will watch through the entire series. Thank you for great job!
@aradarbel4579
@aradarbel4579 5 лет назад
just found your channel, and saw this video! this is exactly what I was looking for! You have a new sub ;D
@javidx9
@javidx9 5 лет назад
Thanks buddy!
@pendergastj
@pendergastj 5 лет назад
Just what ive been waiting to see! Awesome!
@javidx9
@javidx9 5 лет назад
Hi jamie i hope it lives up to expectation!
@reubenbridges
@reubenbridges Год назад
Feels like I just watched a classic PBS show on programming, late 80s early 90s. Excellent video.
@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 2 месяца назад
Any advice for a complete beginner
@lucs0091
@lucs0091 5 лет назад
I learned by heart all the algebra formulas to pass an exam, but never understood them... until now.
@javidx9
@javidx9 5 лет назад
Good Stuff Lucas, i learn maths much quicker if I have a practical use for it.
@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 6 месяцев назад
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?
@otacilioribeiro8944
@otacilioribeiro8944 4 года назад
this is awesome, you are a excellent at what you do and i love your way of explaining stuff; I spent some good time pondering about this video and i am amused. Thank you! By the way, i noticed that the comments of top and bottom triangles are switched, the bottom is actually the one initialized and drawn first
@ffabiang
@ffabiang Год назад
Thank you so much for this video, I have been learning more about how 3D engines work and this was just what I needed! Greetings from Peru!
@spjewkes
@spjewkes 5 лет назад
Nicely done, David. I’m looking forward to the last episode of this series where you demonstrate a spinning, textured Vimto can :)
@javidx9
@javidx9 5 лет назад
Lol Steve, you know what? Challenge accepted!
@ChenHuang
@ChenHuang 5 лет назад
Wish this was available when I was learning about software rendering myself, very good material
@javidx9
@javidx9 5 лет назад
Thanks Chen!
@arsnakehert
@arsnakehert Год назад
This is probably the best explanation of projection matrices I’ve seen on the internet
@Poeterish
@Poeterish 2 года назад
Pleeeeease never stop making videos on RU-vid ! Thank you so much for your effort !
@stewartzayat7526
@stewartzayat7526 5 лет назад
What a coincidence! I just started working on my own renderer too. I'm really looking forward to this series.
@javidx9
@javidx9 5 лет назад
Excellent Stewart - we should compare notes! :D
@catalinul5700
@catalinul5700 5 лет назад
Amazing! :D
@javidx9
@javidx9 5 лет назад
Thanks Cata!
@erickalvarez6899
@erickalvarez6899 5 лет назад
You're awesome!! Thanks for these series. I'm learning a lot watching them!!
@viperforty8450
@viperforty8450 Год назад
Thanks for the content my guy, watching your videos and getting ready to make a replica of an online childhood game in another game in lua, hope i will find strength to fully make it
@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
@progalt5816
@progalt5816 5 лет назад
Very Interesting!
@javidx9
@javidx9 5 лет назад
Thanks Progalt
@Ryan-xq3kl
@Ryan-xq3kl 3 года назад
This is the kinda info we can use to make 3d game design more applicable to more varieties of programmers
@nockieboy
@nockieboy 3 года назад
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 3 года назад
Sounds like a great project!
@nockieboy
@nockieboy 3 года назад
It's certainly testing my knowledge of programming and electronics! Keep up the great work - I'm learning loads! 👍
@kennyotsu4357
@kennyotsu4357 5 лет назад
I love ur videos, even when i totally cant understand what the heck is going on here, but i love ur videos :3
@javidx9
@javidx9 5 лет назад
lol, thanks Deku, if you get stuck shout out on the discord server, people willing to help on there!
@3DSage
@3DSage 5 лет назад
Ahh you beat me to it! Haha great video as always.
@Pridetoons
@Pridetoons 5 лет назад
3DSage I wish you'd post some Gameboy Advance tutorials on your channel.
@Pridetoons
@Pridetoons 5 лет назад
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 5 лет назад
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 5 лет назад
Yes I will do that sometime!
@3DSage
@3DSage 5 лет назад
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!
@rcherrycoke7322
@rcherrycoke7322 2 года назад
These series of videos are pure gold - thank you so much for the effort you put into them. Your presentation style is spot on - especially how you explain the maths.
@Waffles_Syrup
@Waffles_Syrup 3 года назад
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.
Далее
ЭТО ВООБЩЕ НЕ БОЛЬНО !
00:15
Просмотров 362 тыс.
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
Просмотров 4,9 млн
I Made a 3D Renderer with just redstone!
24:56
Просмотров 1,3 млн
Giving Personality to Procedural Animations using Math
15:30
Comparing C to machine language
10:02
Просмотров 5 млн
Forbidden C++
33:07
Просмотров 1 млн
Fast Inverse Square Root - A Quake III Algorithm
20:08