Code-It-Yourself! 3D Graphics Engine Part #4 - Texturing & Depth Buffers

  Рет қаралды 189,082

javidx9

javidx9

Күн бұрын

Пікірлер: 389
@carlosaugustogurgel6887
@carlosaugustogurgel6887 6 жыл бұрын
It is mindblow how this is running like an real 3D API... but is an command prompt...
@Ruxify
@Ruxify 6 жыл бұрын
It's how it was done before we had those 3D APIs.
@72DerekB
@72DerekB 6 жыл бұрын
@@Ruxify I don't know if I ever saw anyone doing 3d with a character/attribute mode even back then, maybe the zx spectrum, I think that worked with a character/attribute display? Certainly can't think of anyone doing texture mapping on that platform though!
@javidx9
@javidx9 6 жыл бұрын
I've did try to implement my original FPS code on the BBC Micro B+ a few weeks ago. Man I forgot much you take 4GHz processors for granted :D
@spjewkes
@spjewkes 6 жыл бұрын
I was always in awe of the programmers of the 80s making solid 3d graphics on 8-bit home computers running at 1-4Mhz with no hardware floating point instructions in sight.
@Ruxify
@Ruxify 6 жыл бұрын
+Derek Burnheim I was talking about the software renderer implementation, not necessarily the console display itself.
@slayerpianoman
@slayerpianoman 6 жыл бұрын
You sir, are the grandest gem I have seen on KZbin. I have been searching for someone to explain how 3D engines are done FROM SCRATCH for years, and here you are giving us the Christmas gift of the ages for those of us interested in low graphics. Thanks for doing these, and don’t feel any negativity that your views are lower then some other programming channels, since you have command of the cool folks’ niche :D
@javidx9
@javidx9 6 жыл бұрын
Hi and thanks slayerpianoman! Its certainly a niche! XD It surprises me how many veterans enjoy this channel - I think its the retro look. Thanks again buddy!
@supersquare
@supersquare 5 жыл бұрын
@@javidx9 Don't underestimate the amount of intermediate coders like myself who didn't/don't have the opportunity to go to college but still yearn for this kind of knowledge. You are truly one of the most amazing resources for advanced learning on KZbin :)
@leoreleases
@leoreleases 4 жыл бұрын
Javid videos are much nice! ;D
@vinayaksharma8387
@vinayaksharma8387 4 жыл бұрын
Dude you don't even know how much power you have in your hands. In 44 minutes you can literally create an entirely different virtual universe wth. Mind Blown. Probably should have concentrated in my math classes
@knssoftware6018
@knssoftware6018 6 жыл бұрын
Your channel is seriously good, and you deserve the following you are generating. I kind of hope that once you have your stomach full of the excitement of the real word, and become a grey beard, that you put your great teaching style to its own good use, and teach professionally - you have a gift for it.
@javidx9
@javidx9 6 жыл бұрын
Hey Kns, I really appreciate your kind words! I did teach for a little while. I set up this channel because I believe those that are fortunate enough to have had a good education are obligated to share that education with those who may not have been. I really believe in this principle.
@adlf8
@adlf8 6 жыл бұрын
I saw this series 3 days ago. Watched first part then instantly subscribed. Last 10 years, I had really wondered how 3d engines work. Thanks a lot to you, now i know! Thanks for your efforts man! I admire you!
@javidx9
@javidx9 6 жыл бұрын
Hey thanks PıırRR! In a way though, some of the magic gets lost :(
@supersquare
@supersquare 5 жыл бұрын
You are truly one of the most amazing resources for advanced learning on KZbin :) Thank you so much for taking the time to produce these videos and for sharing your knowledge!
@javidx9
@javidx9 5 жыл бұрын
Hey my pleasure SquareB0t, and thank you!
@McShavey
@McShavey 3 жыл бұрын
This entire set of tutorials is fucking amazing. You are a true gentleman and a scholar. Seriously, I have not seen anything or anyone until now that could give me the insights or knowledge you have in easy to understand, simple and straightforward descriptions of what are doing and what you are coding. I've been looking for tutorials exactly like this because I am learning to use Leadwerks 3D engine, and I wanted to know what was going on under the hood so I could play with different things to learn the capabilities of it, and try to eek out as much performance from it as I could. This has been absolutely brilliant for understanding a multitude of things from rendering, to the difference between rasterising, perspective, and something as simple as understanding what is listed in an OBJ file and what it all means. I tip my hat to you and salute you. Really - thank you so much!
@javidx9
@javidx9 3 жыл бұрын
My pleasure!
@john314
@john314 6 жыл бұрын
Yes!!! Finally, this is more of a proper 3D engine that can be used for colourful games and such! Keep up the good work!
@javidx9
@javidx9 6 жыл бұрын
Thanks John, I think it would be fun to see some simple 3D games using this code
@quasa0
@quasa0 6 жыл бұрын
javidx9 you should create something like Reddit for subscribers submissions for you to review
@n_eve_r_again5860
@n_eve_r_again5860 2 ай бұрын
I want to thank you so much for this video series, I've been working on a doom / quake redering engine in unity for weeks, and your video is my savior !
@samuelsirois7455
@samuelsirois7455 4 жыл бұрын
As a person who likes to know every detail of a subject from scratch, I am very happy that you made this series of videos. I really hope more videos on the subject :)
@dudleyparkfmx336
@dudleyparkfmx336 4 жыл бұрын
Awesome video series, thank you Javid. I really liked the fact that you show problems, and, then how to fix them. The impossible perspective correction for textures was excellent. Well done.
@festiveFurry
@festiveFurry 4 жыл бұрын
You crazy man! Rendering 3D in command prompt! But that's exactly why we love you!
@VEGETADTX
@VEGETADTX 2 жыл бұрын
This is one of the most underrated channels in history of KZbin. Not only that his videos are very well put, informative and crazily useful for all the newcomers to 3D game engine creation, but also he seems like one of those dudes you'd like to have as a friend. Keep it up!
@FFA704
@FFA704 6 жыл бұрын
Holy shit I love you
@javidx9
@javidx9 6 жыл бұрын
XD - I said to wait!
@onuberonly7846
@onuberonly7846 6 жыл бұрын
hopefully one day i can be this good...not just using tools, but creating them; this is the pinnacle of programming!
@javidx9
@javidx9 6 жыл бұрын
Cheers, I believe problem solving is the harder part of programming, and it takes practice and patience!
@maxngoddard
@maxngoddard 6 жыл бұрын
Damn, Spyro nostalgia set me back.
@javidx9
@javidx9 6 жыл бұрын
Hits hard doesnt it? XD
@illoprin
@illoprin 11 ай бұрын
Thank you very much for these detailed explanations. I was familiar with rasterization algorithms before, but I had no understanding of how clipping and texturing works. I thought that this is a rabbit hole that I shouldn’t go into, having an OpenGL black box. However, it was very useful and interesting to learn how it works. I watched all 4 parts in one sitting. Thank you :)
@joaovitormeyer7817
@joaovitormeyer7817 Жыл бұрын
I'm just here to thank you! All thanks to you I was able to write an 3D engine that's decent. I started with what you did in your videos, but now I'm improving it bit by bit. I'm working on lighting/shadows now, then I plan to improve it's performance, but thanks to you I might some day make my own 3D game. For real, you are awsome, and I'm kinda hooked up in your videos now. Again, thank you so much!
@javidx9
@javidx9 Жыл бұрын
Hey cheers buddy! Get on the discord and post some pictures of your 3d engine!
@dibbelgaming
@dibbelgaming 5 жыл бұрын
I love this playlist so much please continue with this tipe of content, I've use these vids to make my own 3d engine in javascript
@CalBart42
@CalBart42 5 жыл бұрын
I really love your videos javid ... i knew i should have paid more attention to maths in school though ... i follow your logic when you explain it ... but it all breaks down in my head when i try to implement my own
@_srhenry
@_srhenry 3 жыл бұрын
This whole playlist of fundamentals of 3D engines implementation is pretty good, a lot of math involved in and the complexity isn't that high, besides it uses the most simple and replicable 2d shape a.k.a. triangles to draw everything. Triangles rocks!
@javidx9
@javidx9 3 жыл бұрын
Woooooo triangles |m|
@Sebastian-hx3kt
@Sebastian-hx3kt 5 жыл бұрын
Easiest subscription of my life, very rich and informative series. As my 2d rpg game in java is done Im looking to transition into 3d. This looks like a fun challenge, especially since I'll finally have some use for linear algebra in programming!
@daniloarndt3597
@daniloarndt3597 10 ай бұрын
I tried to create a perspective for the texture myself for a month and was almost desperate. After watching the video I was able to solve it in 2 minutes. Thank you. 🙏
@andrew_lim
@andrew_lim 2 жыл бұрын
Watched/read a lot of triangle texture mapping tutorials, and yours is the easiest to understand. Great work
@taylorswe
@taylorswe 5 жыл бұрын
DUDE! I have been using the unity game engine which is great for more high level game programming and texturing, but I have wondered how game engines work at a simplistic level. This is really cool! Thanks a ton! I would recommend this to any programmer serious about video game programming.
@alecberbudeau7835
@alecberbudeau7835 4 жыл бұрын
This was all along a really interesting series and I'm hoping you continue it
@javidx9
@javidx9 4 жыл бұрын
Well there isnt much more left without going into specific things such as lighting types. If I were to continue it it would likely be looking at how hardware actually does these things, but that would be quite a different series.
@alecberbudeau7835
@alecberbudeau7835 4 жыл бұрын
@@javidx9 correct me if I'm wrong, but the light in the engine is calculated for each triangle and not for each pixel so maybe you could implement a light algorithm wich takes some light equations and outputs how each pixel is illuminated. That would be a lot of calculation for the CPU though..
@coolzo2524
@coolzo2524 5 жыл бұрын
Very interesting. Could you make a part 5 explaining shading and going into different ambient occlusion techniques like even ray tracing?
@dynamagon
@dynamagon 2 жыл бұрын
He already did shading. Ray tracing requires expensive hardware. The whole point is to be 0 cost.
@halofreak1990
@halofreak1990 Жыл бұрын
@@dynamagon flat shading, yes. Smooth shading, no
@Red-di7zb
@Red-di7zb 3 жыл бұрын
Thank you Javid for these awesome tutorials. Finally I have finished making my own software renderer, starting from drawing pixels to bitmap and drawing lines 1.5 months ago to smooth shaded multithreaded textured 3D models with phong lighting now. Your tutorials are very usefull. Good luck to you Javid : )
@KrisArnott
@KrisArnott 5 жыл бұрын
The best was the line "thank you visual studio for making that look much better" that was just funny, your formatting was better.
@XeZrunner
@XeZrunner 4 жыл бұрын
19:43
@MrEtronic
@MrEtronic 5 жыл бұрын
look bro im going to level with you . i dont have 40 + min to sit through a very code focused topic .having said that i have subbed and i will like every video you post keep up the great job you have my support .
@javidx9
@javidx9 5 жыл бұрын
Thanks Elisha, much appreciated!
@jakubsebek
@jakubsebek 5 жыл бұрын
I am Watching this series for the second or third time now, starting to get it a little..
@javidx9
@javidx9 5 жыл бұрын
Good Stuff Jacob, 3D maths can be a bit tricky without some prior training but hopefully it'll sink in!
@codythompson9973
@codythompson9973 6 жыл бұрын
The biggest problem I have with these videos is myself. How come I haven't been watching these? I feel like I need to recommend you to my classmates as well.
@javidx9
@javidx9 6 жыл бұрын
lol, thanks Quarter Blazer :D
@glitchy_weasel
@glitchy_weasel 5 жыл бұрын
Amazing series, it really helped me understand the core concepts of 3D graphics and rendering. I think I may be ready to learn about rendering APIs such as OpenGL. Isn't it lovely how maths and computers merge together to project a rich virtual 3D world in front of our eyes ?
@miege90
@miege90 Жыл бұрын
I've implemented this in Javascript just for fun and to see how far I can push pure Javascript and I am truly surprised by how smooth it went so far. Up until the point where I started texture sampling, I've got some pretty stable 60 FPS on my passive cooled MacBook Air M2 with some additional caching. It is mindboggeling how fast CPUs are today and especially the M2. Even my core i9 from three years ago can't keep up. With the texture sampling the perfomance shatters, but that's because drawing single pixels on a canvas is stupid slow, the DOM updates eat up 90% of the calculation. Maybe I'll try to hardware accelerate this part, but I'm not sure how well this is going to go. I don't want to move larger parts of the implementation to WebGL. Thanks a ton for this great video series ❤
@GDevelopisquitenice-py9fj
@GDevelopisquitenice-py9fj 6 ай бұрын
You can try running it on the GPU - It will run a lot faster
@ryanben3988
@ryanben3988 Жыл бұрын
Just to show how amazing this series has been. I have been working on a distributed graphics engine (for my final BSc project) that moves some of the proccesses in the pipeline to a remote server, which could be a better approach than what is being implemented by platforms like Ge-force now. Mosts of the concepts are from this series, infact I learnt computer graphics from here (ps: they dont even teach this at my university, they were teaching us how LCDs work last semester😂). I used to watch Part #1 in my first year 2019 , and it was not for the sake of understanding....but I simply enjoyed watching you code, learning your coding patterns, and show the guys what type of code I wish to write in 15 years time, even though I did not know how to write any single line of code in C++. You and guys like CodingWithMitch, NeetCode and Mosh have made an impact more than any of the guys that teach us Computer Science at our university. Would love it if you would take a look at the project I am working on: github.com/rbryanben/CloudComputed3DGraphics
@tw7522
@tw7522 6 жыл бұрын
Mate! You've done a stellar job in this series! It's the most concise, clear and complete guide on the topic I've seen so far. I can't be thankful enough.
@kamran_aghlami
@kamran_aghlami 6 жыл бұрын
Just got to work and should start working but there is a notification telling there is a new @javidx9 video, well... work can wait. #goosebumps #spyro Thank YOU!
@javidx9
@javidx9 6 жыл бұрын
Lol Hey Kamran - dont get into trouble for watching at work!
@codythompson9973
@codythompson9973 6 жыл бұрын
Kamran Aghlami It may be dangerous posting stuff like this as well. Watch out mah dude.
@kamran_aghlami
@kamran_aghlami 6 жыл бұрын
I can see your point but I work for my self, so I think I can keep my job. :)
@codythompson9973
@codythompson9973 6 жыл бұрын
Kamran Aghlami Oh, lol, didn't know that.
@codythompson9973
@codythompson9973 6 жыл бұрын
Kamran Aghlami What do you do anyway? If you are programming this probably helps anyway since it is not a waste of time to learn some new tricks.
@nickbryan894
@nickbryan894 Жыл бұрын
Been studying 3d graphics for a while now everything in these videos made sense and a fantastic result, really helpful cheers!
@dynamagon
@dynamagon 2 жыл бұрын
I've done it, I completed all episodes completely in C. I even made it able to import textured meshes!
@matibi3843
@matibi3843 3 ай бұрын
what did u use to make texture ?
@mvvo7366
@mvvo7366 5 жыл бұрын
i dont have the faintest clue what you are talking about.i love it. keep it up
@XanCraft21
@XanCraft21 3 жыл бұрын
This is a very awesome video series. I’m trying to do this in arduino using a very strong and fast controller, and i’ve noticed it’s missing some functions used in the videos. I was able to fix some of them, and i’m still trying to work out other issues, but i can see this coming out to be very good when it’s done. I can’t wait until you make part 5. Thank you for this tutorial series, I wasn’t able to find anything else like this anywhere.
@luqnotperfect
@luqnotperfect 4 жыл бұрын
this is really amazing, new to the channel and im just super hyped about all this
@Obi1-KenBone-Me
@Obi1-KenBone-Me 11 ай бұрын
I wish there were more series like this on graphics, starting from A to Z, assuming i suck at math and explaining principles instead of plain computation and real time coding from the scratch, but a bit more thorough Its unbeliveble how little resources are available for graphics
@dehrk9024
@dehrk9024 10 ай бұрын
these videos are a fascinating combo of social/hangout vibe and actually doing & learning, this is really cool and unlike a lot of other coding tutorials, almost like hanging out with the java david himself, tho he doesnt respond, at least when i havnt taken my sleep meds ;;D
@mario7501
@mario7501 5 жыл бұрын
This video series is truly amazing! Probably one of the most educational video series I have seen on youtube. Is that pixellated look a consequence of the small colour palette of the console or some other artefacts?
@saiyamjain772
@saiyamjain772 4 жыл бұрын
Man u r great in pogramming and what you do is really different i recently discovered your channel and i m in love with it i m learning c now and after learning c++ the first thing i will do is see all your videos in code yourself series ✌
@LollygagDev
@LollygagDev 6 жыл бұрын
Great video
@javidx9
@javidx9 6 жыл бұрын
Thanks lollygag!
@BdR76
@BdR76 3 жыл бұрын
37:50 Spyro also had Level-Of-Detail rendering (LOD), meaning it would optimize by swapping in lower polygon models for far away structures, so was there any LOD data in the mesh?
@defaultdefault812
@defaultdefault812 3 жыл бұрын
Not for playstation 1?
@themeangene
@themeangene 2 жыл бұрын
I imagine how Spyro did that was loading in the most obvious vertices at camera distance greater than R and then when you got less than R more vertex information was displayed
@MarSiCreator
@MarSiCreator 4 жыл бұрын
Great job and tutorial of basic 3D graphics! You made code like OpenGL library manually in code :)
@ui6144
@ui6144 6 жыл бұрын
I wish this channel was already around 13 years ago before I bought Tricks of the 3D Game Programming Guru.
@72DerekB
@72DerekB 6 жыл бұрын
Lol the bad old days when a self taught programmer was limited to incomprehensible (to me at the time anyway) high brow texts like Foley and Van Dam at the Uni library, or eye wateringly expensive dross like tricks of the gurus! Kids today don't realise how good they've got it with everything so accessible via Google!
@javidx9
@javidx9 6 жыл бұрын
Its surprising the amount of retro coders that find this channel - us oldies just have a way of finding each other I guess :D
@SWAGCOWVIDEO
@SWAGCOWVIDEO 6 жыл бұрын
Loving this series! Glad I was able to find it.
@javidx9
@javidx9 6 жыл бұрын
Thanks SwagCow!
@carreiraize
@carreiraize 2 жыл бұрын
Amazing tutorial!!! great, great great job explaining de basics of 3d. Love the way you code the all thing. Very verbose, but fundamentally clear. Which you the best! Hope see u in youtube again soon! ♥
@Bolt6265
@Bolt6265 6 жыл бұрын
Thinkin about this and comparing it to how ray tracing would work for the same stuff its amazing how much simpler and intuitive ray tracing is compared to this traditional polygonal rasterization most modern real-time 3D engines use. (barring the need for an acceleration structure for ray casting anyway)
@grauwsaur
@grauwsaur 6 жыл бұрын
Great series, enjoyed watching it! I don’t think you’re hitting the limits of the console. The problem is that you’re writing every pixel multiple times, overwriting the previous pixel if the depth-buffer tells you to. Instead of drawing pixels directly to the console, set them into a buffer along with the depth, and then at the end draw that buffer once. Performance should be good again! Would be a nice to see a short update video because I’m curious to see ;).
@javidx9
@javidx9 6 жыл бұрын
Hi laurens, in this instance it is the console unfortunately. The ConsoleGameEngine does render to a buffer first. In my experiments what ive observed (and believe to be happening) is as windows is drawing out the characters, it checks to see if it needs to change its current brush. If the screen is only several different characters per line its very fast, and so i bias my algorithms to this sort of drawing. In the case where there is large variability per line, the performance tanks...
@grauwsaur
@grauwsaur 6 жыл бұрын
​@@javidx9 I see, that’s a shame, thanks for the explanation. Is random access fast? If so perhaps you could draw all the characters of each brush individually at once, before moving on to the next? You could also attempt to only draw those which have changed…
@javidx9
@javidx9 6 жыл бұрын
Hi Laurens - Difference rendering is exactly what I do for the SDL version of the library, and it does give great performance, unfortunately I cant make the command prompt in windows render in a manner different to how it already does :(
@theojones1526
@theojones1526 Жыл бұрын
Magnificent, absolutely magnificent
@ChildOnLine
@ChildOnLine 6 жыл бұрын
this is a seriously impressive series, can't wait for #5
@javidx9
@javidx9 6 жыл бұрын
Hmmm, I may need to do a part #5 now - thanks childonline :D
@johnvonhorn2942
@johnvonhorn2942 4 жыл бұрын
@19:15 "some of you will be thinking ahead ..." I'm thinking behind
@user-xs6vg
@user-xs6vg 6 жыл бұрын
You tutorial is amazing! Thanks for Your working, David!
@javidx9
@javidx9 6 жыл бұрын
Cheers Tex!
@Hunar1997
@Hunar1997 6 жыл бұрын
I finally understand what the opengl clear buffer code does
@rcookman
@rcookman 6 жыл бұрын
These are great tutorials.
@javidx9
@javidx9 6 жыл бұрын
Cheers buddy!
@72DerekB
@72DerekB 6 жыл бұрын
Fantastic video, really nice approach and exposition for the perspective correction for texturing. I need to go and work the maths myself now as it seems a different approach to the more traditional (?) interpolate 1/z, u/z and v/z method but clearly ends up in the same place. I got a kick from the "glitches" too, is that glitching to you rendering to a colour buffer or hardware rendering? Looks really nice and I couldn't decide watching on my phone if there's texture filtering going on?
@javidx9
@javidx9 6 жыл бұрын
Thanks Derek, lol, glitches?, What glitches?
@IT-vy7kx
@IT-vy7kx 5 жыл бұрын
I wish this was a course in my studies!
@dehrk9024
@dehrk9024 10 ай бұрын
I find it cool that david of java and direct x 9 explains so subtile and thought rich (not a lot of high quality 'teachers' like this)
@justinrichardsmusic
@justinrichardsmusic 6 жыл бұрын
This series is unbelievable... your knowledge and understanding of the subject matter is awe inspiring! OlcGameEngineGL? There is a GL version?? Is this publicly available and will it run any olc tutorial you've done up to this point? Ps. I don't comment on KZbin videos or subscribe to channels at all really but your content is incredible. I even downloaded the Discord app and got help from some friendly programmers on there a couple of days ago. Thank you for your efforts :-)
@javidx9
@javidx9 6 жыл бұрын
Hi Justin, Thanks a lot buddy! The OpenGL and SDL versions essentially emulate the windows command prompt, so you can use the code without modification. I did a video on this a few weeks ago where I talk about using the CGE on linux and other platforms. That said, I'm announcing something in my next video which may change things...
@justinrichardsmusic
@justinrichardsmusic 6 жыл бұрын
javidx9 Thanks for the reply... I probably skimmed over that Linux video because it had Linux in the title ;-) I'll wait and see what your announcement is next video. Cheers...
@AungWinHtutGH
@AungWinHtutGH 3 жыл бұрын
Thank you so much for your videos!
@TheDyingFox
@TheDyingFox 5 жыл бұрын
Sweet! All this series now need for more completion is bone animation! :D Also: 19:47 My thoughts exactly 🤣
@myrandonameggddfgkotdyhkds1606
@myrandonameggddfgkotdyhkds1606 5 жыл бұрын
I love 3D engine view, please make more ? :D
@jsflood
@jsflood 6 жыл бұрын
Excellent video! Thank you.
@javidx9
@javidx9 6 жыл бұрын
Why thank you John :D
@bihzftg4ztvalqbtre7z24
@bihzftg4ztvalqbtre7z24 5 жыл бұрын
I love your content BB
@dehrk9024
@dehrk9024 10 ай бұрын
Java David you are so smart, i wished i had some friends like you irl :D
@spjewkes
@spjewkes 6 жыл бұрын
Another great video, David. I was hoping for a texture mapped Vimto can to finish off with but I appreciate the limitations you had with the console game engine :)
@javidx9
@javidx9 6 жыл бұрын
Thanks Steve, lol, I actually tried to do this, but I could not find a suitable texture, and I felt its not worth doing If I can't do it right. As soon as I find a texture, I'll map it onto a can model for you :D
@ILGiullareDiCorte
@ILGiullareDiCorte 6 жыл бұрын
Amazing! Thanks again for your work!
@javidx9
@javidx9 6 жыл бұрын
Thanks buddy! No problem.
@jsonkody
@jsonkody 5 жыл бұрын
thats awesome work
@xablauhardcore3617
@xablauhardcore3617 3 жыл бұрын
I thought I didn't know english enough for listening. It isn't true, the fact is that some people just use so many informal expressions and spell in such piggy way that is almost impossible to understand. Dude, your pronounce is so correct! I can understand clearly every word. Are you british?
@kartune0832
@kartune0832 6 жыл бұрын
recently found your channel, really nice stuff here!, do you plan on making more tutorials about the 3d graphics engine?, it would be nice to learn about how lighting and shadows work, cheers
@javidx9
@javidx9 6 жыл бұрын
Hi Kartune, I probably will come back to it with some basic additions yes, but I dont know at which point next year. I didnt do them here because of the limitations I have with the command prompt output, but with the new olcPixelGameEngine, I have a full spectrum to play with, you may have spotted a few sneaky glimpses of it in this video.
@kartune0832
@kartune0832 6 жыл бұрын
@@javidx9 Nice, i only know how to program in game engines (started 2 years ago), in which we only have to worry about coding the game's logic, so i'm pretty much clueless about how a game engine works, so i'm not sure if should be watching the "Code-It-Yourself!" playlist first
@neurophobos2
@neurophobos2 4 жыл бұрын
Hello! How about an implementation of 64k demo? It would be the most interesting and obscure thing on yt I think. Keep going! This channel is a gem!
@dirtyblasion15
@dirtyblasion15 6 жыл бұрын
After you end this project, I hope I will see minecraft in one week, this time ran in console. Now in premiere I'm just joking, you can consider doing this, but again I was just joking.
@javidx9
@javidx9 6 жыл бұрын
smh
@dirtyblasion15
@dirtyblasion15 6 жыл бұрын
@@javidx9 after all it's just a joke, it would take enormous time and computing power(unless you use GPU for that) to bake something like that
@javidx9
@javidx9 6 жыл бұрын
lol, those damn cubes :D
@eggmeister6641
@eggmeister6641 5 жыл бұрын
Did you double-save your games as a child? I only ask because you seem quite insecure.
@okie9025
@okie9025 5 жыл бұрын
@@javidx9 why you hate minecraft so much lol
@maxart2007
@maxart2007 6 жыл бұрын
You've just boiled my brain)))
@javidx9
@javidx9 6 жыл бұрын
Sorry Maxim, I hope it didnt make a mess of your floor.
@illiasolohub3225
@illiasolohub3225 3 жыл бұрын
thanks, the ibformation you provided and job you have do are really cool
@bytenol
@bytenol 3 жыл бұрын
Hello javidx9, I started learning from your 3D tutorial series about 1.5yrs ago, i'm implementing the knowledge in web and I understood everything till texturing in less than a month.. However, I've been struggling with how depth buffer works for more than a year and fortunately I understand a little bit after rewatching this tutorial yesternigth but there's a confusion and I would want a clarification When using depth buffer, a separate array having the same size has the total pixels in the drawing board should be created, and each element in the depth buffer array should be a number indicating the z-value of it's corresponding pixels. Now the confusion is How do I determine z-value per pixels if every vertices in a triangle has different z values. This is the only thing left for me to complete this series after 1.5yrs and I hope I get a response
@javidx9
@javidx9 3 жыл бұрын
Your understanding of the z buffer is accurate. If you've understood perspective corrected texturing then you have in principle already implemented a depth buffer. Just as we interpolated colours when shading the triangle between vertices, we can also interpolate the depth coordinate (z) per screen pixel. And that's all there is to it!
@javidx9
@javidx9 3 жыл бұрын
Once the triangle is converted to screen space, the z component is still valid, so as you scan the triangle during raster, interpolate that z!
@JonnyRobbie
@JonnyRobbie 6 жыл бұрын
I was really waiting for you to finally multiply that texture with the shading you had before. It might give you less of a flat look.
@javidx9
@javidx9 6 жыл бұрын
I know and I tried it! It would be so easy to do in normal circumstances, but not in the console. I can fake it, but that would have made the video longer, and the end result doesnt look very good at all because of the limited colour palette.
@JonnyRobbie
@JonnyRobbie 6 жыл бұрын
I mean, it already operates with limited palette and you;re trying to texture it. I cannot be really sure, but I feel that adding shading might not be that much worse. Also, it might be interesting to implement some simple dithering. Nevertheless, I would really like for you to continue the series, incrementally implementing more features. Also, you mention that your console engine has limitations, why not try to use some different method of rendering the picture? I know the olc engine is your baby, but still, it might be time to move on in the context of this project.
@schrodingerscat1863
@schrodingerscat1863 2 жыл бұрын
The reason a lot of people say that perspective correction with textures needs hardware is because of the per pixel divides necessary. Back in the day that was a disaster for 3D rendering. There were lots of approximations and tricks used back then to make things look better but they were never pixel perfect like the implementation you have here with the per pixel divides.
@sergeymihaylov9012
@sergeymihaylov9012 2 жыл бұрын
You are Jedy master man, thank a lot for the greath tutorial !!!!
@creepercrafter9792
@creepercrafter9792 5 жыл бұрын
Part 5 on lights?
@joze838
@joze838 4 жыл бұрын
23:54 Why is it important to draw from small to big and not the other way arround?
@cheaterman49
@cheaterman49 5 жыл бұрын
Wow! Just wow! I suppose the lighting is gone now? It would be interesting to add it back :-D but I guess that's left as an exercise for the viewer until you find more other ideas to bundle it with and make an addendum video? :-3 one can always hope hahaha
@javidx9
@javidx9 5 жыл бұрын
Thanks man, the lighting got added back in for the CarCrimeCity videos.
@cheaterman49
@cheaterman49 5 жыл бұрын
@@javidx9 Excellent! I'm watching those already :-D thanks for your answer!
@NeilRoy
@NeilRoy 6 жыл бұрын
I think this could possibly run better if it wasn't one large object, but a world made up of smaller objects, possibly in a grid format so you could more easily cull out large portions. Also, for console, I would stick with a flat shaded world which could still have colour. I would imagine it would run much better. Very impressive work though. A proper pixel engine is better for this as Windows is moving A LOT of data in a console engine when you consider how many bytes each UNICODE character takes up, plus all the pixels it is drawing per character, that is much more work than a single pixel for a world this complex.
@javidx9
@javidx9 6 жыл бұрын
You are correct as usual - it was this series that made me make olcPixelGameEngine just to see how poor the windows rasterisation of fonts is. I did some tests and it was quite revealing how windows handles updating the console. It clearly does some runlength checking to see if it needs to change the brushes and pens etc, so a screen full of similar colours and characters renders very quickly, but varied characters quickly sap resources.
@aradarbel4579
@aradarbel4579 6 жыл бұрын
Just woke up and probably be late to school, oh wait there's a new video! I am WATCHING it right now!
@javidx9
@javidx9 6 жыл бұрын
lol, I better not get in trouble for making you late :D
@Madlion
@Madlion 2 жыл бұрын
these videos are amazing
@doglitbug
@doglitbug 2 жыл бұрын
Loved these videos!
@MrAndrewiphone1
@MrAndrewiphone1 3 жыл бұрын
Hi! I'm really enjoying this series, so I was wondering if this is the last episode, because I can´t find part 5 anywhere.
@DarxDev
@DarxDev 4 жыл бұрын
i like that pixel game engine Easter egg 1 week before actual release
@TheBypasser
@TheBypasser 5 жыл бұрын
Probably I missed it, but how did you make accumulative transforms (like "hold a key to rotate")? From the first glance it can be done by having an accumulator matrix that is multiplied by the new transform every frame, but in reality this matrix also has to also be re-normalized (as it tends to de-normalize after some time due to the floating point error), which seems sub-optimal, so in my 6DOF engine I switched to keeping and re-normalizing a quaternion instead. So, waiting for some more info about quats as they are somewhat non-popular (myself I was lazy so just used quaternion operations from XNA instead of digging deep into the subject).
@javidx9
@javidx9 5 жыл бұрын
Hi Bypasser, I've not discussed quats or floating point accumulation errors, I think the series so far has been complicated enough XD Though certainly for 6dof you are making life difficult for yourself by not using quats.
@TheBypasser
@TheBypasser 5 жыл бұрын
Hi :) So far having a quat accumulator being expanded into a full transform matrix prior to processing each frame for the absolute pitch, yaw and roll works nicely and feels like a correct way to go (though an accumulator matrix could suffice). All the rotation rates seem to be more practical to be stored as separate variables however, as it feels more logical to process the dampening on separate values in this one example (I use a variable force dampened model for both motion and rotation, as it is framerate-independent so can be kept synchronous with the rendering sequence, lovely as you can safely utilize the GPU for collisions etc without any multi-threading mess - though somewhat tricky when things come down to motor simulations and other stuff with a variable position-dependent force that needs solving some equations on the fly).
@Jkauppa
@Jkauppa 3 жыл бұрын
btw, if you assume your position to the triangles will not change radically, then you can maintain a dynamically updated distance buffer, only locally solving depth issues
@Jkauppa
@Jkauppa 3 жыл бұрын
only update the ones changing a breadth first grid cell
@Jkauppa
@Jkauppa 3 жыл бұрын
assume you have lights everywhere
@Jkauppa
@Jkauppa 3 жыл бұрын
just use reference-uv flat-painted pre-stage sphere-zbuffer everywhere
@Jkauppa
@Jkauppa 3 жыл бұрын
just use octree to handle logic, geometry, collisions, single-fill breadth first skip visibility
@Jkauppa
@Jkauppa 3 жыл бұрын
textures can be volume, to pic your colors from
@kricku
@kricku 6 жыл бұрын
Awesome! but now I really want to know how graphics APIs fit into this. Do you just give them a triangle and a texture and tell them to do the thing?
@javidx9
@javidx9 6 жыл бұрын
Hi Kricku, that's an excellent question and one I shall definitely make a video about this year. Its all very well knowing the theory behind the graphics, but it might just be worth seeing how this happens in reality. Let me think about this.
@soliderarmatang5664
@soliderarmatang5664 3 жыл бұрын
THANK YOU SO MUCH!!!!!
@AstralSnowstorm6157
@AstralSnowstorm6157 6 жыл бұрын
29:20 Exactly!
@lucs0091
@lucs0091 6 жыл бұрын
44:32 Are you going to do something else? I hope so. Godspeed
@javidx9
@javidx9 6 жыл бұрын
...maybe... :D
@RaposaCadela
@RaposaCadela 2 жыл бұрын
This series is amazing! How would you go about implementing collision? I'm trying but slopes are being a nightmare
@safrussalmus9056
@safrussalmus9056 5 жыл бұрын
The video is at a 783 like to dislike ratio, I totally understand why, it's amazing.
@javidx9
@javidx9 5 жыл бұрын
Hey cheers Safrus!
BIG PROJECT! Top Down City Based Car Crime Game #1
1:03:52
javidx9
Рет қаралды 112 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
The Math behind (most) 3D games - Perspective Projection
13:20
Brendan Galea
Рет қаралды 428 М.
olcPixelGameEngine
20:17
javidx9
Рет қаралды 164 М.
I built my own 3D Game Engine with Open-Source Tools
15:00
Modern Vintage Gamer
Рет қаралды 113 М.
3D Software Rendering Graphics Pipeline
18:29
pikuma
Рет қаралды 22 М.
10 Gamedev Libraries For 10 Needs (used by AAA companies)
11:33
Oskar Schramm
Рет қаралды 29 М.
I Made an Electronic Chessboard Without Turns
14:32
From Scratch
Рет қаралды 1 МЛН
I built the BEST AIR ENGINE (New Rotary Design)
18:58
Integza
Рет қаралды 826 М.
Let's Program Doom - Part 1
25:13
3DSage
Рет қаралды 459 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН