When Your Game Is Bad But Your Optimisation Is Genius

2024 ж. 14 Мам.
1 357 498 Рет қаралды

The source code and demos are available here: / vercidium
An extra heightmap renderer is available here: github.com/vercidium-patreon/...
I spent the past 6 years creating a game engine, and I've been shocked at the things that can make or break performance.
I put together 3 simple optimisations that you can use to make your game run up to 10 times quicker.
Music is Orbit, Saturation, Abberations and Chroma-quay by Disjoint Square
disjointsquare.bandcamp.com
Timestamps
0:00 Intro
0:30 Triangles
0:56 Triangles In Practice
3:28 Triangle Results
4:01 Batches of Ice Cream
5:28 Batching Results
5:58 3 FPS is Enough Right?
6:26 Triangle Reduction
7:35 Sinking Illusion
7:57 Final Result
#gamedev #gamedevelopment #gameengine

Пікірлер
  • The terrain code + demos are available here: patreon.com/vercidium If you have any technical / game engine questions, ask them here!

    @Vercidium@Vercidium5 ай бұрын
    • Curious you said you're making a game engine, is it Open Source? Any chance I could get my stinking paws on it? I'd like to contribute if possible. If not, curious about what type of research you did beforehand, maybe see if you had any useful references for making an engine. It's something I'd like to give a try after my first game.

      @monkeyhorizon@monkeyhorizon5 ай бұрын
    • What LIBs/Tools do you use in game engine development?? I'm trying to dive deep and make developing Game Engines my entire focus in life, but I'm uncertain where to start, so I just been teaching myself Higher Maths while I try to find a starting point 😥

      @Prodby.Mvl7R@Prodby.Mvl7R5 ай бұрын
    • What do you use to make your videos? Is it Manim?

      @JustAPersonalUseBarb@JustAPersonalUseBarb5 ай бұрын
    • ⁠​⁠@@monkeyhorizon hey it’s not open source currently but I have a few blog posts up and a GitHub account with accompanying code (it’s super old though) I plan to open source parts of the engine (terrain, vegetation lazy multithreading, particle engine, voxel destruction, skeletal animation, networking, importing models, UI, postprocessing, etc) and make videos + blogs about them I created this engine mostly through trial and error and a lot of time haha, unfortunately other engines are very closed-off, or only have vague talks and presentations about them. learnopengl.com taught me nearly everything I know about OpenGL, and my goal is for these videos to cover all the other aspects of creating a game engine

      @Vercidium@Vercidium5 ай бұрын
    • ⁠​⁠@@Prodby.Mvl7R all of the code is custom, but if I were to start again I would use Silk .NET as it handles all the boring stuff for you (window creation, keyboard and mouse input, OpenGL setup), so you can focus on the cool 3D rendering side of things My maths knowledge and skills is terrible, I’ve made it a surprisingly long way without fully understanding how quaternions, matrices and lines/vectors work! I recommend jumping in and starting experimenting with 3D rendering with OpenGL. learnopengl.com taught me so much and was a great starting point

      @Vercidium@Vercidium5 ай бұрын
  • As someone wise said once upon a time, "The real programming starts when you run out of memory".

    @muggzzzzz@muggzzzzz5 ай бұрын
    • That is a great quote

      @Vercidium@Vercidium5 ай бұрын
    • This is actually true in my experience

      @cadcad-jm3pf@cadcad-jm3pf5 ай бұрын
    • So true. Sql to c++

      @MyMattinthehat@MyMattinthehat5 ай бұрын
    • @@Vercidiumit is , Imagine if JS had a hard limit of 2MB of RAM per page. Then maybe it would be real programming and would stop being a toy.

      @monad_tcp@monad_tcp5 ай бұрын
    • …that’s pretty much the reason why I deliberately target the Raspberry Pi 3 for development. If it runs well on that, it will run very well almost anywhere.

      @Comeyd@Comeyd5 ай бұрын
  • Didn't realize how deep you can get with optimizing your environments, I've always kept a consistent LOD with my environments without realizing how much memory i was wasting. Thanks for the video it was very informative!

    @Poly_Knight@Poly_Knight5 ай бұрын
    • My mission is to reduce memory usage across the globe, so I'm glad this was helpful!

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium Considering the choices the GPU vendors are making concerning the amount of memory on their cards, that's a great mission to have in life! :p Will help reduce the need for these extremely expensive cards, which I think would be a good thing. Now that I think of it, kind of a environmentally friendly thing too!

      @perhapsyes2493@perhapsyes24935 ай бұрын
    • @@perhapsyes2493 yep it’s very easy to forget about all the gamers that use older hardware, not everyone has the latest tech. Lower specs means the game is more accessible too, it’s a win win

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium That is also a deed in the mission of climate change. Unoptimised games are like gas guzzling cars. Use a lot of energy without getting anywhere.

      @antman7673@antman76735 ай бұрын
    • Now let's plot the power draw of the system for the optimized vs unoptimized version. This is how we'll stop global warming...@@Vercidium

      @potato8236@potato82365 ай бұрын
  • optimization enables the potential of modern tech, if we optimize badly it's like optimizing well on worse tech. So this is really damn important.

    @Anduardus@Anduardus5 ай бұрын
    • Exactly, leaning on raw compute power as a crutch is anti-innovative

      @Epic501@Epic5015 ай бұрын
    • If we had to graph it out: it seems as though hardware is rising, but software is becoming a straight line (or worse, declining) in performance and efficiency. Optimization can bring a whole lot more out of modern computers, and we don't even have to do unrealistic amounts of it to get much better results.

      @XeZrunner@XeZrunner5 ай бұрын
    • @@XeZrunner software is absolutely declining.

      @user-mn8lz7gf6d@user-mn8lz7gf6d5 ай бұрын
    • Yeah. I think it's a good thing that with modern tech programming is very accessible, and almost anyone can easily learn to write a working program. But the problem is that this also generates a lot of laziness in programming, since you no longer need to optimize to have your program run at all (or run well), so people just don't bother. And optimization is pretty much only done by people who personally care about it. I think that this won't stop things improving for as long as technology keeps improving. But it's holding us back at least a few years in progress.

      @MaskedDeath_@MaskedDeath_5 ай бұрын
    • @@XeZrunner can't agree more than that

      @dynamicfield@dynamicfield5 ай бұрын
  • As an alternative to pitch/yaw for compressing normals, you can also use GL_INT_2_10_10_10_REV which also lets you store the 3 vector components in 4 bytes at a lower precision.

    @stillww@stillww5 ай бұрын
    • That's a great alternative and avoids using sin and cos in the vertex shader

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium What sort of percentage increase in FPS would you presume to see from rewriting that portion?

      @aidanm5578@aidanm55785 ай бұрын
    • @@aidanm5578 it depends if the vertex shader is the bottleneck. If it isn’t, the FPS won’t change at all, but if it is maybe 5% faster? I can’t imagine the sin and cos being that expensive

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium Fair enough. It's good to see you doing what the gaming industry seems to prioritise least. Keep it up mate, love from Perth.

      @aidanm5578@aidanm55785 ай бұрын
    • @@aidanm5578 Honestly, I think those professional AAA programmers very much prioritize this because it's so basic. Their games are just so complex (especially with graphics) that they need very large teams and still lack manpower.

      @tachobrenner@tachobrenner5 ай бұрын
  • This is some incredible production value. Very nice visuals to go alongside your explanations!

    @Bananenbauer123@Bananenbauer1235 ай бұрын
    • Thank you! I spent a bit too long on these animations so I’m glad they help

      @Vercidium@Vercidium5 ай бұрын
    • This is insane, amazing quality video, thank you

      @koool56@koool565 ай бұрын
    • @@Vercidium I don't think you did. I feel like the engagement regarding the animations just brought the video to my recommended. Thanks!

      @TobiasJohansenMusic@TobiasJohansenMusic5 ай бұрын
    • @@Vercidium The work you did on the animations is by no means wasted. They were very aesthetically pleasing and helped the presentation of the video immensely. Amazing job on this video!

      @Music-nn9mi@Music-nn9mi5 ай бұрын
    • coding version of 3Blue1Brown

      @yurilopes420@yurilopes4205 ай бұрын
  • I feel like there should be a definitive list of optimizations devs should just go through whenever making games, I've seen some really bad optimized games from AAA devs and I wonder how it's so bad sometimes.

    @ghostl337@ghostl3375 ай бұрын
    • But if all games were optimized, you wouldn't buy new hardware every few months / years.

      @Torekk@Torekk5 ай бұрын
    • A) Dev time. You can optimize everything to a close to infinity time. More time = less achieved... because the more optimized, the less you gain. B) You have a game to release, you focus on making... well... the game.. and the QA team is not seeing any major issues, so it is fine... This one is more down to there exists infinite amount of hardware combinations... your game will hate some of those... period...

      @SioxerNikita@SioxerNikita5 ай бұрын
    • @@SioxerNikita And i'll add: An unreleased game is a money black hole. The earlier you can get it out, the better (to reduce the costs of making it). But of course, too early and it'll flop, not recovering the huge sums of money already put into it in its development time. You can never know for sure how much a game will make, so you can never know for sure for how long you can keep developing it and still be worth it.

      @besknighter@besknighter5 ай бұрын
    • @@Torekk What? Are you saying game developers are in cahoots with nvidia to make games bad on purpose so nvidia can sell more GPUs?

      @psst4849@psst48495 ай бұрын
    • @@besknighter Yeap

      @SioxerNikita@SioxerNikita5 ай бұрын
  • As an artist who doesn't know code.....I had no idea you could reduce the data on terrain like that! Always amazes me what can be done when you reeeaallly know how to manipulate the 1's and 0's

    @jixal@jixal5 ай бұрын
    • Might I recommend kishimisu's intro to shader art. I'm a coder, one of my favorite ways to recreate.

      @GRAYgauss@GRAYgauss5 ай бұрын
  • I am not a game developer, but a video game enthusiast. Never dived behind the scenes like this and it's beautiful seeing you explain everything on how to optimize and make something run quicker. That, and the presentation and music choise were top notch! Thanks for this entertaining video!

    @Rhodoran@Rhodoran5 ай бұрын
  • THE NON-ANIMATED ANIMATIONS ❤

    @SatisfiedOnion@SatisfiedOnion5 ай бұрын
    • What do you mean? Can you give an example?

      @jsmith108@jsmith1085 ай бұрын
    • ?

      @U20E0@U20E05 ай бұрын
    • I have a little insight into how Vercidium creates these videos. The "animations" you see in his videos are not animated in any traditional sense. They're animated using code, which I think is so cool. Vercidium isn't animating anything (in the traditional sense), it's all just code!

      @SatisfiedOnion@SatisfiedOnion5 ай бұрын
    • ​@@SatisfiedOnionits called procedural animation,moving bones from code

      @glocksigma@glocksigma5 ай бұрын
    • @@SatisfiedOnion Probably not everything, that intro would take 100x less time to make in something like After Effects

      @phir9255@phir92555 ай бұрын
  • Also, culling triangles and using sprites can help a lot. Shamus Young has a project where he could generate the texture for the terrain at full detail, then cull triangles, then when rendered, looks full detail but runs way faster. OLC demonstrates that relying on sprites, even transforming them all, can be blazingly fast with insane numbers of sprites.

    @SomeoneElse-fr8yu@SomeoneElse-fr8yu5 ай бұрын
    • Absolutely, I would love to experiment with that! Is that where distant terrain and trees get converted to billboards (sprites) that always face the player?

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium Afaik, culling is usually skipping rendering of triangles, when they are outside the camera's view cone or sometimes even when they are occluded by other non-transparent triangles. I think what @SomoneElse-fr8yu is referring to is baking details from high resolution meshes into lower resolution meshes + displacement maps. This works best on details that the player can't see at sharp angles, so mostly flat floors or walls with details such as bricks and so on. Not sure what the process of converting mesh detail into displacement maps is called though.

      @InDieTasten@InDieTasten5 ай бұрын
    • @@Vercidium You should look at WARNO from Eugen Systems, the Iris Zoom engine does this and more when it comes to drawing the terrain and the trees ;)

      @mad_tic@mad_tic5 ай бұрын
    • @@InDieTasten as a normal person... best guess is parallax mapping

      @ThatWhichObserves@ThatWhichObserves5 ай бұрын
    • @@Vercidium Something else interesting to mess with related to bill boarding is drawing lines using sprites. It's very interesting, you can position a sprite between two points then scale it according to the length of the line between the two points, in 2d this will look terrible, but in 3d it works surprisingly well mostly because where one sprite fails another one will kick in to take its place. It's entirely possible to make a game with nothing but bill-boarded sprites and it can look very good even though it lacks the textured triangles so often used.

      @flameofthephoenix8395@flameofthephoenix83955 ай бұрын
  • wait.. it's all... triangles?

    @SomeOne-sq7ir@SomeOne-sq7ir3 ай бұрын
    • I don't see them anymore, all I see is blonde, brunette... ;)

      @vertigoz@vertigozАй бұрын
    • 🔫 Always has been

      @Gibreelkhan@Gibreelkhan23 күн бұрын
    • … Always has been

      @benedict_cruel_8@benedict_cruel_87 күн бұрын
  • I just finished my bachelors in game development this september, and I have been really losing interest in coding etc.. But watching this video reminded me of how cool i used to think it was, and I actually feel extremely motivated to get back to it, Its insane what you were able to accomplish and I cannot wait for more on this. Please keep posting blogs on this topic or anything related to it !!! I genuinely feel like I've had my eyes reopened to coding. Despite not being the best at coding nor remembering how to do things properly, I can't wait to see more and get back into the swing of things!

    @goldenknight1756@goldenknight17565 ай бұрын
    • is college really that worth it

      @LavaCreeperPeople@LavaCreeperPeople5 ай бұрын
    • @@LavaCreeperPeople For game development? Unless you have spent years teaching yourself and developing games before reaching college age and wanting to get into the industry, absolutely. Otherwise, you are starting from scratch and you will not get a game dev job for years. Even if you teach yourself for years straight, there is a lot you will not learn without college, including how to properly work with teams and what the industry is like. I highly recommend Champlain College. They have degrees for each industry discipline and you worth together as teams of designers, programmers, artists, and producers for multiple years. It simulates an industry environment.

      @802Garage@802Garage5 ай бұрын
    • @@LavaCreeperPeople yes for anything

      @anonymousperson26223@anonymousperson262235 ай бұрын
    • @@anonymousperson26223 trade school?

      @LavaCreeperPeople@LavaCreeperPeople5 ай бұрын
    • ​@@anonymousperson26223heavily depends on the country, degree, specific college and your self study skills for example in quite a few countries you can find a job with skills and or work experience even without a college degree, in others you can't do anything without a degree then there's the issue of study discipline and motivation, I've met quite a few junior devs with a college degree that are barely able to write a solution to a fizz-buzz type problem

      @uhrguhrguhrg@uhrguhrguhrg5 ай бұрын
  • These dev videos are really high quality and interesting to watch.

    @potatovonepicus@potatovonepicus5 ай бұрын
    • yeah

      @LavaCreeperPeople@LavaCreeperPeople5 ай бұрын
  • "It's likely every game you've played is just a bunch of triangles moving around." Minecraft: Triangle? What's that?

    @J-pr9ve@J-pr9ve5 ай бұрын
  • The visuals are INSANE! You really put a lot of effort into it! Good Job!

    @anzhel3268@anzhel32685 ай бұрын
  • I was astonished by the performance of Sector's edge on laptop integrated graphics Also, I've never seen such short loading times on an HDD, kinda reminiscent of old Source Games/Battlefield/Early Minecraft where It's basically just click and play Hope this gets the recognition it deserves some day

    @zipsexe@zipsexe5 ай бұрын
    • In a similar vein, I've been playing well optimized old games on newer hardware, and the experience is glorious. It can actually be a little annoying, because now I don't get to read the cool load screens anymore.

      @TheSpecialJ11@TheSpecialJ11Ай бұрын
  • if only devs could watch youtube videos...

    @magnomliman8114@magnomliman81145 ай бұрын
  • The first optimization technique has one drawback: GPUs calculate texture mip mapping levels by screen space partial derivatives. That means: There will be visible seams for fragments where the UVs wrap (i.e. where a u or v component suddenly changes from 1 to 0 or from 0 to 1). Ben Golus has a very good article about that issue titled "Distinctive Derivative Differences".

    @BrightBitGAMES@BrightBitGAMES4 ай бұрын
    • I’ll check it out thank you. If the same values are being passed to the texture sample call, what would cause the seams?

      @Vercidium@Vercidium3 ай бұрын
    • @Vercidium You're welcome. I'm not sure what you mean by "same values". Let's assume a uv coordinate where one fragment has uv.x == 1 and its neighboring fragment has uv.x == 0. In this case the GPU basically "thinks" that the whole texture is used between these two fragments and uses the smallest mip mapping level. That's what causes the seams as the color of the lowest mip mapping level will probably be different from the "correct" one. With "real" uvs that only happens if the texture actually is between those two fragments, e.g. a textured model only occupying one pixel on a screen. But since you are calculating the UVs based on the position, it will always happen where the UVs wrap as mentioned above. Ben Golus has some solutions in his article as well. Hope that helps. :)

      @BrightBitGAMES@BrightBitGAMES3 ай бұрын
    • ​@@BrightBitGAMES As far as I can tell, the Ben Golus article and associated woes only apply to equirectangular projection textures onto a sphere. The reason the GPU assumes the whole texture must be present within the discontinuity is because the texture is being projected onto a single contiguous sphere mesh; the fragment shader sees a discontinuity within the same mesh and freaks out. This terrain generation code is not doing that: it is chunking the terrain into separate square meshes and composing them together into one scene, so there shouldn't be any visible seam. Caveat emptor: I'm a CUDA compute shader guy, not an OpenGL graphics shader guy, so I may be wrong.

      @james-s-smith@james-s-smith27 күн бұрын
  • Insanely high quality and easy to digest, this video made me subscribe. I don't code to this level but love to see optimizations done. Well done!

    @EliteSparklz@EliteSparklz5 ай бұрын
  • I recently got you recommended to me and am I happy that it happened. I love learning about optimization!!! Keep up the great work!

    @yanec2501@yanec25015 ай бұрын
  • Wow those animations are clean. Nice stuff, this is very high quality and interesting!

    @Finding_Fortune@Finding_Fortune5 ай бұрын
    • When I first learned graphics programming, I was tricked into thinking instancing was the same as batching hah, so I'm glad you went over that. I had to rewrite all my rendering at the time 😥 Nice going over modern GL too, like multiDraw and SSBOs

      @Finding_Fortune@Finding_Fortune5 ай бұрын
    • @@Finding_Fortune I avoided modern OpenGL for so long because I thought it would increase the specs for the game. But I realised I can check the OpenGL version, and only use newer functions if they’re supported

      @Vercidium@Vercidium5 ай бұрын
  • This is really clever! Looking forward to seeing more.

    @kevinfischer4869@kevinfischer48695 ай бұрын
  • I was glued in for the whole video. Excellently done!

    @InkDrop.@InkDrop.3 ай бұрын
  • Highly informative and extremely well edited video! Massive kudos.

    @sircomesizeman@sircomesizeman4 ай бұрын
  • I am so happy I clicked on this video Awesome, high quality and thoughtful content. 100% subscribing, thank you!

    @dethswurl117@dethswurl1175 ай бұрын
    • That means so much, thank you! I hope it’s useful for your games

      @Vercidium@Vercidium5 ай бұрын
  • Amazing Video! Nice Animations and super clear explanation. Keep up the good work!

    @pixobit5882@pixobit58825 ай бұрын
  • This is absolutely fascinating stuff. I'll have to watch it a few times to grasp all of it, but brilliant work, mate. Some extremely clever solutions here.

    @onerimeuse@onerimeuse5 ай бұрын
  • Incredible job explaining and visualising these concepts. Thanks so much for sharing!

    @AltamishM@AltamishM5 ай бұрын
  • I know nothing about game developing nor do I have any plans to do game developing but this was still very entertaining and educational to watch because optimization just feels good :D It's sad to see that computing power has grown so much but we're not taking full advantage of it in games because so much is spent on skipping the optimization that was previously obligatory to make any game run well.

    @The_GuyWhoNeverUploadsAnything@The_GuyWhoNeverUploadsAnything5 ай бұрын
    • If people optimized code the same amount as they used to, then games would take so long to develop that they would already be outdated by the time they were released. Modern games are much, much bigger than old games were, and it's simply unfeasible to spend the same amount of effort optimizing each individual feature when there are 1000x more features than there used to be.

      @asdfqwerty14587@asdfqwerty145873 ай бұрын
  • Damn! That was an insane amount of quality in both the visuals AND explanation!

    @DetectivePoofPoof@DetectivePoofPoof5 ай бұрын
  • Amazing video and really good choice of background music! - It fits the theme of the video so good!

    @jum-lee@jum-lee5 ай бұрын
  • That's an insanely well-edited video. Great job!

    @dsgda153@dsgda1535 ай бұрын
  • Great video! Definitely gonna start writing my 12 friends' ice cream orders on a piece of paper and passing it to the ice cream guy now 😂 My only comment would be it was harder to see the difference between the levels of detail of terrain than in previous example clips you've posted for some reason.

    @r2d2vader@r2d2vader5 ай бұрын
    • Get those orders ready! Thank you for the feedback

      @Vercidium@Vercidium5 ай бұрын
  • Didn't know about the sinking terrain trick! Nice one. It seems much easier than having to stitch vertices together where the LOD changes (as in only render LOD 1 outside of LOD 0's area).

    @gakman@gakman5 ай бұрын
  • I don't do any development but your graphics are super clean and intuitive and get your point across perfectly. Your production value is genuinely good enough for a channel a thousand times the size.

    @creaturedanaaaaa@creaturedanaaaaa5 ай бұрын
  • The visuals alone were an instant subscribe for me. The great explanations confirmed it was the right choice! Looking forward to more videos like this

    @dylancope@dylancope5 ай бұрын
  • The video editing is so crisp and on point.

    @jordanvegas3999@jordanvegas39995 ай бұрын
  • This video is absurdly well made.

    @Pikminiman@Pikminiman5 ай бұрын
  • Man I love exactly this type of video, nice visuals, easy to understand but still kinda deep

    @kipchickensout@kipchickensout4 ай бұрын
  • I'm glad this found its way to my recommended. Great video!

    @roeldejeu6456@roeldejeu64565 ай бұрын
  • that was awesome, cant believe you got to render 16000 times more terrain with 5x more fps than at the start

    @kxhu@kxhu5 ай бұрын
  • High quality videos! Thanks for your effort

    @franzj4040@franzj40405 ай бұрын
  • Instantly subscribed. Looking forward to see what you’ll release next!

    @ZeBabyseason2@ZeBabyseason25 ай бұрын
  • Great video. You ver thoroughly explained the steps required to optimize a game. I'm currently working on my own one, and this video will certainly come in handy, once I'll be optimizing it.

    @tapeplayer_@tapeplayer_3 ай бұрын
  • I am now a proud subcriber. You crammed so much technical detail into a short and simple explianation that was easy to understgand as a noobie

    @zeldaandTwink@zeldaandTwink5 ай бұрын
  • Yes, a well optimized game gives me instant appretiation for it. Especially nowadays where slightly different shadows and reflections (ray tracing) are somehow seen as some huge graphical improvement that is worth leaving a huge amount of players behind for (they don't have the latest, most expensive cards). Also, unfinished games.

    @DesenhoBoy@DesenhoBoy5 ай бұрын
    • Raytraced shadows while having a considerable performance penalty they also allow more features like: -longer shadow draw distance (effectively infinite) -no need for shadow cascades (the parts where shadows transition to better or worse quality ones for optimization reasons) -dynamic soft shadows -better shadows for dynamic lights (like a spotlight during the day) You could have these features with NO raytracing but it will have a higher performance cost

      @xXDeiviDXx@xXDeiviDXx5 ай бұрын
    • I also LOOVE the modern trend of just ignoring optimization in favor of scaling like FSR or DLSS

      @defendrr_ru@defendrr_ru5 ай бұрын
    • For ray tracing, it's more about being able to do it in certain ways very quickly that wasn't able to be done quickly prior without specialized hardware, so it just opens up a lot of new potential optimizations for the future. Ray tracing itself isn't a new thing (in more limited uses, ray tracing can be pretty quick actually, and has been used in games for a while) it's the hardware accelerated side of it that's new. I'd say this stuff is a pretty worthwhile graphical leap, just will take time to be fully utilized.

      @magicalchicken5667@magicalchicken56674 ай бұрын
    • Ray traced lighting can be a pretty dramatic improvement in areas where rasterized techniques couldn't mimic realistic lighting very well, particularly dynamic global illumination. Recently developers have been getting a bit better at optimizing it, though most early executions were terribly optimized for the small benefits.

      @Chicky_Lumps@Chicky_Lumps3 ай бұрын
  • That is absolutely crazy and so cool to see. Thanks for sharing

    @jaygee94@jaygee945 ай бұрын
  • Amazing production value. Seriously high quality stuff.. good job.

    @berengamble1882@berengamble18825 ай бұрын
  • You're a genius, not just because you figured this out, but the way you presented it as well

    @apoteosi_co@apoteosi_co5 ай бұрын
  • I don’t do game dev (sadly), just programming. A lot of this was very interesting to see, especially how you grouped your triangles!

    @scaper12123@scaper121235 ай бұрын
  • this is a beautiful presentation of these concepts! very accessible.

    @scezumin@scezumin5 ай бұрын
  • Superb video - excellent presentation and really effective memory management, thanks for sharing!

    @cman8269@cman82695 ай бұрын
  • Omg this is such a good video, im loving it, tysm for making these

    @dinodubin9241@dinodubin92415 ай бұрын
  • I had 1 time where I collaborated with my friend on a game development for our college project. Bro's a genius at programming since highschool, I knew a bit of game dev and how the basic works but I mostly works as designer and making sprites, fixing animations and enhancing models he made before. He said that in game development, programming was never the hard part of it, optimization is. Apparently making games nowadays have gotten so easy with all these popular game engine like unity or UE, so game dev is 20% programming, 40% graphic design and 40% optimization. That's why you have to get everything organized properly, as efficient as possible. "If you can't optimize your game, it's already a failed project, so it's better to start a new and fix everything"

    @monke4044@monke40445 ай бұрын
  • Thanks so much for the demonstration, this makes LOD and batching really easy to understand!

    @JoeFilms5420@JoeFilms54202 ай бұрын
  • Fascinating approach. I might use it some day.

    @WilFredWave@WilFredWave4 ай бұрын
  • Awesome video btw. I recently started my own little gamedev journey. Found this very enlightening from a programmer's stand point. Looking forward to your current and future content!

    @ToniJabroni42@ToniJabroni425 ай бұрын
    • Welcome to the game dev life! Thank you, I hope these videos will make your journey a smooth one

      @Vercidium@Vercidium5 ай бұрын
  • I feel like the freshman who accidentally walked into a 300 level graphics class.

    @Klipik12@Klipik125 ай бұрын
  • Fascinating stuff. Wish you all the luck with your engine, hopefully some big devs pick it up - even if just for a trial run.

    @TheBazino@TheBazino3 ай бұрын
  • Great video :) Saving it to my game dev playlist so I can rewatch it later. I'm not sure I ever would have thought to using sinking instead of culling if I were adding terrain to a game engine.

    @livipup@livipup5 ай бұрын
  • this is obscenely fantastic. Clear explanations paired with gorgeous animations which make the explanations intuitive? On the topic of coding for games, but that in a very concrete manner? Solving tangible problems? So many different and incredible notes were hit. I just had to subscribe. I _must_ see more from you.

    @m-yday@m-yday5 ай бұрын
    • This comment has made all the effort I put into this video worth it. My goal is to help other devs solve problems that had me stumped for months, and I hope my future videos have the same effect!

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium I’m so glad I could voice something that could inspire you to keep going. Seriously, I’ve been looking for someone like you a while. Understanding where to start and where to go in coding is difficult. Having these tangible points explained so well has given intuitive guidance that I haven’t seen elsewhere

      @m-yday@m-yday5 ай бұрын
  • This video is just amazing! The visuals explaining the sinking illusion are just perfect. Sub

    @Zizaco@Zizaco5 ай бұрын
  • Nicely explained. The animations are absolutely mesmerizing!

    @Visstnok@Visstnok4 ай бұрын
  • My heard filled with joy when you mentioned Triangle Trip, It became my main weapon for Performance when I was learning to create terrains.

    @ashwanishahrawat4607@ashwanishahrawat46073 ай бұрын
  • Amazing, such good visuals. Even as someone that knows nothing about programming and game dev, I could understand the concepts intuitively. Very cool, looking forward to what you put out in the future!

    @Blackdiamond2@Blackdiamond25 ай бұрын
    • That is great to hear, thank you!

      @Vercidium@Vercidium5 ай бұрын
  • Fantastic video and masterfully explained with those cleeeean graphics!

    @coderized@coderized5 ай бұрын
    • Thank you! Making the animations was the most enjoyable part

      @Vercidium@Vercidium5 ай бұрын
  • Never been so decisive on liking a video before, beautifully well done!!

    @floflorean@floflorean5 ай бұрын
  • I love videos like this, subbed I hope to see more cool stuff!

    @damianlost@damianlost4 ай бұрын
  • this dude started creating such crazy genius videos, bro needs more subs

    @starplatinum3305@starplatinum33055 ай бұрын
    • Thank you! Could say this video was 6 years in the making… and I have many more to share!

      @Vercidium@Vercidium5 ай бұрын
    • he didnt exactly invent any of these ideas...

      @masterhacker7065@masterhacker70655 ай бұрын
    • @@masterhacker7065 i didnt say he invented, but he is making good videos about compute shaders

      @starplatinum3305@starplatinum33055 ай бұрын
  • Just a gamer here, thought it was a free FPS trick video😅, such a good explanation. Hope all the talented game devs in the comment section put all these optimisations techniques and much more and help us the people who still use the good old gtx 1050ti to enjoy good games without the need to make the games look almost as a distorted water painting to make it playable.

    @rahulvpoojari905@rahulvpoojari9055 ай бұрын
  • This is incredible- Like, borderline revolutionary techniques level addition to the scene. I can't believe this stuff is just on KZhead to stumble across randomly.

    @kainuipenaloza9395@kainuipenaloza93955 ай бұрын
  • this is awesome, your videos are crazy good, i hope i can implement optimization this cool in my engine

    @mobslicer1529@mobslicer1529Ай бұрын
    • Thanks so much! Glad you liked them, happy to answer any questions

      @Vercidium@VercidiumАй бұрын
  • I have not the slightest understanding of programming or game (engine) development. Yet, I found myself intrigued by this video and feel like I understand the basic concepts you are explaining. That is some top shelf teaching right there!

    @TheKroesar@TheKroesar5 ай бұрын
    • Woah thank you! Presenting and teaching are both skills I want to improve so this comment means a lot

      @Vercidium@Vercidium5 ай бұрын
  • Just found you in my recommended. You are an absolutely underrated game dev KZhead channel, and I hope your channel will blow up one day! :)

    @DuskfoxOfficial@DuskfoxOfficial5 ай бұрын
    • Thank you very much!

      @Vercidium@Vercidium5 ай бұрын
  • Brilliant! Great work on the visuals! Keep up the good work. Subscribed.

    @antonioganea@antonioganea5 ай бұрын
  • Great content and smooth animations, well done!

    @skope2055@skope20555 ай бұрын
  • As a cheap gamer I really appreciate optimization, and I notice the most when it is not there, I swear most games never try to optimize, and if they did console games could suddenly run on mobile devices easily, it is amazing how much they miss out on

    @tankiadam4967@tankiadam49675 ай бұрын
  • Your videos are great. Hoping for a shader course from you some day.

    @ENZO-xu4sn@ENZO-xu4sn5 ай бұрын
    • Thank you! I would love to make one, shaders are pretty fun to muck around with

      @Vercidium@Vercidium5 ай бұрын
  • This is truly awesome! Congratulations, this is art! Loved every bit of this video.

    @horseyddtank424@horseyddtank4245 ай бұрын
  • this video is insane man, genuine thanks for posting

    @Tripleblyet@Tripleblyet5 ай бұрын
  • You can compress the vertex data even further by storing the height in a GL_R32F texture and rendering without any vertex data at all. Having the height in a texture means that you can access the height of neighboring vertices and therefore calculate the normal using finite differences. Another thing you can do is replace your 8x8 grid with a 1x1 grid (6 vertices) and then use the tesselation shader to tesselate it again. By calculating the tesselation factors using distance to the camera (or even the view frustrum) you get levels of detail "for free". At least in theory. In practice you'd have to benchmark this approach to see if it's actually faster.

    @drachedeswassers@drachedeswassers5 ай бұрын
  • I don’t make games, but you’re very clear and informative.

    @oxybrightdark8765@oxybrightdark87655 ай бұрын
  • thank you for this, as still begginer dev just seeing what can be done is great, and you explain it very well

    @ondrejeder8816@ondrejeder88165 ай бұрын
  • This can really be abstracted into an ultimate balance of RAM vs flops. As cores getting more efficient in the future, with MLSS and other techs, more and more things will be inferred from even less information. It is exciting to experience this transition in our lifetime.

    @_vicary@_vicary5 ай бұрын
  • Very nice. I thought I might have to stitch the low and high levels of detail together. I never thought about sinking. I also need to upgrade my heightmap terrain to be more robust so that I can handle tunnels, natural bridges, overhangs, and underground caverns.

    @kilroy987@kilroy9875 ай бұрын
    • Battlefield uses stitching to connect their LODs together, where they modify the edge of the higher-detailed mesh to match the lower-detailed mesh I tried this but it meant high quality terrain pops in when moving around the map, whereas with sinking it appears gradually

      @Vercidium@Vercidium5 ай бұрын
    • @@VercidiumSo the method that requires less coding also looks better. Double win.

      @kilroy987@kilroy9875 ай бұрын
  • Glad to see the work you're doing these days Verc, excited to see where this new project goes.

    @daxtron2@daxtron25 ай бұрын
    • Thank you, it does feel exciting to move on to something new

      @Vercidium@Vercidium5 ай бұрын
  • This is like those oddly satisfying videos but for your brain. Great breakdown and ridiculously good visualizations. 👏

    @ZedEdge@ZedEdge3 ай бұрын
  • I'm no expert at games, but a way to only talk to someone once instead of 12 times sounds great to an introvert like me

    @joe-d2795@joe-d27955 ай бұрын
  • Ahh, I've noticed a couple of places in Tears of the Kingdom, and a few other modern games where terrain just kind of melted away. I knew it had something to do with LOD, but I just thought low quality meshes were transforming to higher quality meshes, and vertices were repositioning accordingly. I didn't consider the much more sensible conclusion that the terrain was just sinking below the higher quality mesh to be hidden.

    @JackBond1234@JackBond12345 ай бұрын
    • This is one way of doing it, there's a few different techniques. You can also use quadtrees or clip maps, which are both very optimized ways of sorting your detail.

      @aerostorm_@aerostorm_5 ай бұрын
  • Great explanations and _fantastic_ animation. I don't even do game dev but heck, subscribing.

    @be12@be125 ай бұрын
  • I think it is important to state in the beginning that all of this is valid only in context of static geometry (i.e. landscapes). For moving meshes, you cannot just use polar coordinates with integer degrees, as it would make many modifications of vertice positions (Affine matrixes, quaternions etc) more complicated, and limit the overall transformations. Radians cannot be represented in integers, and any trigonometric function accepts radians in computations - at very least, it would severely degrade precision if radians are shrinked to only 16-bits (1 degree in radians is 0.0174 - so you need at least 4 digital positions to describe 1/360 of full rotation). Also, triangle stripts are noticeably better than unindexed triangle lists - but only marginally better than indexed triangle lists. So if we talk about something which is not landscape meshes (where strips would have most advantages - for big uninterrupted convex non-selfintersecting meshes, without backface rendering), there can be more optimal choises depending on situation. Also, very important to mention that these are, I assume, based on general OpenGL API. So if using DirectX API it can be very different, i.e. having more internal optimizations, or shader conveyer being implemented differently, vertex shaders having some buffer-related differences, etc etc. And most importantly (especially for non-professional viewers) - specify what "memory" is refered in those calculations. I figured out it is about specifically RAM (kilobytes for vertices etc) only at the halfway point of the video - it was not explicitly stated anywhere before.

    @Sornemus@Sornemus5 ай бұрын
  • great visualizations! the last technique was particularly novel to me

    @nohost_dev@nohost_dev5 ай бұрын
  • 7:41 instead of lowering terrain you can use pixel shader to hide close terrain

    @borsukk@borsukk5 ай бұрын
  • I got into blender not too long ago and it´s amazing how I can actually understand stuff like that now (to a certain degree) when it would have made absolute no sense like half a year ago. That really shows what climbing the learning curve does for you, even when you might don´t see it when getting stuck at a new concept again.

    @Mightydoggo@Mightydoggo3 ай бұрын
  • I got pissed just watching the intro of your game freezing, gets me tilted real quick. Love the videos!

    @JamesYoung99811@JamesYoung998115 ай бұрын
  • These are fun! Can you make a series where you explain from scratch about how to make games? It doesn't have to be deep, you can use simple examples that are more tailored to beginners who are discovering the programming world of games

    @69k_gold@69k_gold5 ай бұрын
    • I will add that to my list of videos to create, will do!

      @Vercidium@Vercidium5 ай бұрын
    • yeah. something that is kind of from the start. I mean, anybody can install Unity and follow a couple tutorials. I did that, for a mechanical design course. the goal was just to get our models into a VR environment, but we did learn how to make said environment with buttons and moving stuff... what I'm saying, is that I don't know where to even begin, if I had to code from scratch

      @Klaevin@Klaevin5 ай бұрын
    • ​@@Klaevinyou begin with... Google. there's a guy named TheCherno, he has a great series on opengl and c++ for beginners

      @anon1963@anon19634 ай бұрын
  • Oh i like this format!

    @beshkekart3909@beshkekart39095 ай бұрын
  • This is one of the most gorgeous videos i've seen on KZhead. The pace, the presentation - wow! Crystal clear explanation with rock solid supporting visuals. Amazing work!

    @yrussq@yrussq5 ай бұрын
    • That is awesome to hear, thank you so much!

      @Vercidium@Vercidium5 ай бұрын
    • @@Vercidium Keep them coming, man! I hope your dedication and your effort will make you big. Cheers!

      @yrussq@yrussq5 ай бұрын
  • Epic video, great work. I hope more videos come soon.

    @viniciusnoyoutube@viniciusnoyoutube5 ай бұрын
KZhead