A Game Engine Built For Optimisation

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2024
  • Download the source code for the game engine and all my videos here: / vercidium
    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've compared 2 sunlight rendering methods and created a 3rd method that runs 70x faster.
    Music is Irradiant and Spirit by Disjoint Square
    disjointsquare.bandcamp.com
    Timestamps
    0:00 Intro
    0:22 Skybox Lighting
    0:57 Breaking the 4th Wall
    2:04 Among Trees
    2:28 Dynamic Beams
    3:40 Transform Readback
    5:00 Final Solution
    #gamedev #gamedevelopment #gameengine
  • เกม

ความคิดเห็น • 433

  • @SatisfiedOnion
    @SatisfiedOnion หลายเดือนก่อน +2557

    I can sleep well at night knowing that my TI-NSpire 84 calculator will always be able to run this man's games

    • @Stromoto
      @Stromoto หลายเดือนก่อน +55

      Maybe Vercidium will make sure that your TI-NSpire 84 calculator can finally play Sector's Edge in the future

    • @attilavs2
      @attilavs2 หลายเดือนก่อน +17

      "The Nspire 84 can't hurt you, it's not real"
      The nspire 84 :

    • @NoorquackerInd
      @NoorquackerInd 26 วันที่ผ่านมา +5

      Frick, as someone that got into embedded because of calculators, now I wanna port this to the Nspire

    • @cinderwolf32
      @cinderwolf32 25 วันที่ผ่านมา +4

      Aside from Nspire 84 not being a thing: I learned much of my initial programming knowledge on a TI-84 Plus Silver Edition, and I think that really taught me to value efficiency. Love seeing other people with similar stories!

    • @amir32806
      @amir32806 8 วันที่ผ่านมา

      You like modern AAA laggy games?

  • @bacon_with_brussels_sprout
    @bacon_with_brussels_sprout หลายเดือนก่อน +1497

    Jokes on you, my shitty laptop is still gonna find a way to lag from just rendering glorified pngs

    • @CharlesVanNoland
      @CharlesVanNoland หลายเดือนก่อน +85

      I'm a sucker for coding stuff to run on ancient hardware because I started coding when I was a preteen in the 90s, when you had to know how to get the most out of a computer or your game ran like unplayable garbage. Nowadays devs just do whatever and ignore performance and optimization because they just let their end-user's hardware go to waste. EDIT: Indie devs, for the most part, is who I was referring to, but also companies like Bethesda that build layercakes of flashy FX ontop of their ancient engine.

    • @cosy_sweater
      @cosy_sweater หลายเดือนก่อน +12

      I have a decent pc that can even run Cyberpunk 60fps. But for some unknown reason it freezes randomly even with no load. Like im experiencing 10 second freezes: on desktop; on lockscreen; opening explorer; randomly at any point. So even if the game can run at 10k fps on a calculator im still gonna have ~0.1fps

    • @pluralphilosophy6657
      @pluralphilosophy6657 หลายเดือนก่อน +11

      Jokes on you my shity laptop freezes when loading regular pngs

    • @alfiegordon9013
      @alfiegordon9013 หลายเดือนก่อน +17

      ​@@cosy_sweatermight wanna have a look at your power supply, if it's defective it could have random voltage drops on certain lines that would cause GPU issues

    • @theairacobra
      @theairacobra หลายเดือนก่อน +5

      @@cosy_sweater i've had a similar issue, it was my motherboard doing silly things to the RAM voltage which sometimes crashed my entire PC, what motherboard do you have?

  • @sharksandbananas
    @sharksandbananas หลายเดือนก่อน +616

    Amazing z-buffer visualization, never thought of the data in that way before!

  • @lf6914
    @lf6914 หลายเดือนก่อน +518

    There is also a much better way to render volumetric lighting. It's called "Froxels". It was first introduced in Assassin's Creed Black Flag and was later adopted by EA, Naughty Dogs, Rockstar and many more! And also it looks absolutely stunning!

    • @juliandurchholz
      @juliandurchholz หลายเดือนก่อน +106

      That's a state of the art approach, but what's "better" or "worse" really depends on your goals and target hardware ;)

    • @rednicstone3299
      @rednicstone3299 หลายเดือนก่อน +106

      @@juliandurchholz its not really state of the art, its close to 10 years old at this point. It ran great back then, and if you cant run foxels, you might as well give up running anything serious. Also it looks great in comparison with the nonsensical method proposed in this video.

    • @buzinaocara
      @buzinaocara หลายเดือนก่อน

      @@rednicstone3299 Yeah. they were first used in Assassin's Creed Black Flag for XBone and PS4 if I'm not mistaken.

    • @juliandurchholz
      @juliandurchholz หลายเดือนก่อน +19

      @@rednicstone3299 Well, RDR2 and Last of Us 2 use it, for instance. What more modern approaches would you say it's been succeeded by?

    • @SimonBuchanNz
      @SimonBuchanNz หลายเดือนก่อน +51

      ​@@juliandurchholz"state of the art" technically just means "what the people that know what they're doing use", but the common use is "just invented, best available way to do something".

  • @LimakPan
    @LimakPan หลายเดือนก่อน +48

    So it's not lighting, but god rays?

  • @buzinaocara
    @buzinaocara หลายเดือนก่อน +239

    This works somewhat ok for your specific scene because you expect a buch of sparesly scattered beams in that specific scenario. This will just look weird in a scene not covered with trees, becaue those few hundred beams will not average out into a homogeneus volume, and if you increased their amount to the point where they do, you will be running slower than aproach nº 2, and will be severely bottlenecked by fillrate.
    You also seem to be spawning the beams from the floor towards the sky and checking for the shadowmap at that position. That means a beam that is being occluded by a tree before it hits the floor gets faded out in its entirety: no beam after the tree NOR BEFORE IT. That too might not look so obviously wrong in that scene, but can look decidedly worse in scenarios with higher depth complexity.
    Its a clever hack, but with very limited aplicability.

    • @kabinet0
      @kabinet0 หลายเดือนก่อน +44

      I agree, it's certainly no volumetric light system. Definitely cool, but more a highly specific trick than anything else.
      Unrelatedly, the CPU readback being involved immediately makes me dislike the technique. It would be slightly less painful if they operated on the opacity data in a compute shader.
      Kind of does get me thinking about some kind of cached (perhaps voxel based) approach though.

    • @DireWolfAirstrike
      @DireWolfAirstrike หลายเดือนก่อน +8

      As long as the trees are also receiving shadows, I imagine you could do the same technique at the edges of those shadows.
      Looking at the window lighting that inspired this technique, I'd expect it to be one of those things like billboarding where it's "good enough" until you really pay attention to it.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +34

      Can you please elaborate on your second sentence about a few hundred beams and homogenous volumes?
      Great point about checking from the floor up. An enhancement could be to check the min and max shadow depth values of each sample, then render the beam between the highest position and the lowest position (using the same opacity formula)

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +24

      @kabinet0 persistent mapped buffers and fences allow the CPU readback to happen asynchronously. With 2048 beams that's 2048 * 6 floats * 4 bytes = 49kb of data, which isn't enough to cause a bottleneck

    • @buzinaocara
      @buzinaocara หลายเดือนก่อน +36

      @@Vercidium Your aproximation looks somewhat plausible in a scene with very spotty coverage such as bellow trees. A swiss cheese world would also apply hahaha. But try doing that in a wide open landscape. You will still have a bunch of randomly scattered beams instead of a homogeneous solid fog volume. The random beams will make no sense (what is dividing light up into small spot-light-like rays in an open sky?". It will look more like rain than fog in that context. I said "few hundred" out of guesswork. I dont know how many billboards you are actually spawning across the scene. But still, in reasonably consistent and robust implementations of god-rays the same fog that creates these small beams in some scenes, is the fog that creates a dense Z-buffer-fog-like effect in other contexts. Its all recreations of real-world light scatering and shadowing interacting.
      For good reference of how broad the effect is, take a look at a RDR2 presentation on their atmospherics system they show comparisons to real world and artistic depictions of the same phenomena. AC4:BF also has a description of their implementation in a graphics presentation of theirs, which I believe was the firsr shipping "Froxel" solution. TLoU2 also has an extensive presentation on myriad optimisations and quality improvements they did to it.
      All that said, what you came up with is still a clever little hack that can work in specific scenes. For a broader game you'll probably want some artist control over where billboards spawn and where they don't, so they are limited to places where they look plausible. If you have a clearing in the forest for example, you'd want to have no beams in the middle of it because then again, they'd lool like weird rain in that context instead of light.
      Even for a window, your solution might look inproper once you have dinamic objects. Since oclusion is checked from the floor, if a character steps in front of the window, not only will the beams be bocked from reaching the floor, they will misteriously not even hit the character either. A tall enough window and a short enough dynamic object can create a very visible effect of a moving object magically making the sun-rays disapear from the window as long as it passes over the sun-lit part of the floor.
      PS: I just rewatched the video and remembered your trick is to only draw beams "at the edge of light". Yeah, that reduces the occurance of the "light looking like rain" problem I described. Yet, the reality is that those wide open spaces should also have the volumetric light in them (including the ocean) just instead of scattered beams, it should be a larger volume. Your solution emulates the "feeling" of a subset of a light phonomena, rather than the real thing. Thats why I recomened looking up the RDR2 presentation, they really explain all the different cases where atmospheric scatering can influence a scene.

  • @magnomliman8114
    @magnomliman8114 หลายเดือนก่อน +189

    This optimization content is super interesting man.

  • @athithyaparamesh8251
    @athithyaparamesh8251 หลายเดือนก่อน +35

    NVIDIA hates this guy

    • @Ljoijij889
      @Ljoijij889 หลายเดือนก่อน +3

      😂😂😂😂

  • @digitalgh0stt
    @digitalgh0stt หลายเดือนก่อน +20

    It looks alright, but you can tell all the beams are the same size.
    I wonder if increasing their width with the decrease in opacity would help make the overall scene look better and less uniform. Kind of simulating the beams becoming blurrier.

  • @TileBitan
    @TileBitan หลายเดือนก่อน +121

    Maybe it's just me but the second approach still looks 100 times better than the last one. Last one makes it look like some early 2000s game

    • @trued7461
      @trued7461 หลายเดือนก่อน +27

      It does look better but 100 times better is pretty close to 70 times which his how much performance is saved, so tbh, worth it maybe?

    • @TileBitan
      @TileBitan หลายเดือนก่อน +10

      @@trued7461 there is probably a middle ground where you gain a little bit of performance and it actually looks the same. But from those images it ain't it chief

    • @trashtrash2169
      @trashtrash2169 หลายเดือนก่อน +3

      They could be made wider. Maybe dynamically. They're pencil thin. Maybe if they're full opacity they're also double width and you scale the same as opacity...

    • @muggzzzzz
      @muggzzzzz หลายเดือนก่อน

      It still could be useful for mobile game development.

    • @martinsanchez2395
      @martinsanchez2395 หลายเดือนก่อน +2

      For people with potato PC's is much better than disabling the effects all together

  • @nevintilch4962
    @nevintilch4962 หลายเดือนก่อน +118

    If you and acerola collaborated on a project, you would somehow manage to optimize something to render at the speed of light in a 360° POV with 4k resolution on every texture and also the game would do my homework and take me out to dinner

    • @farianderson168
      @farianderson168 หลายเดือนก่อน +4

      Hahahaha 😂

    • @divyamkhatri8501
      @divyamkhatri8501 23 วันที่ผ่านมา +4

      you forgot that to expect to run at calculator

  • @mz_eth
    @mz_eth หลายเดือนก่อน +10

    The editing on this is stunning 😍Also the fact that it was all about lighting had me instantly in love

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thanks Zeth! I agree, we need more videos about lighting

  • @alexm666
    @alexm666 หลายเดือนก่อน +9

    I don't know what's more precious in your videos - the insights to the amazing rendering tricks or the way you visualize them!

  • @cortanathelawless1848
    @cortanathelawless1848 25 วันที่ผ่านมา +5

    I love people who focus on optimisation because besides the truly impressive technical skills, you only get into optimisation out of two reasons: you cant run your own game/feedback from players, or and thats the reason i respect a lot because they want to make games more accessible. Games are art, more people should be able to enjoy art. Thank you!

  • @martin128
    @martin128 หลายเดือนก่อน +15

    I think the static 2d planes variant of god rays was used in multiple games in 00s. I think Hitman 2 has it and Freedom Fighters, both are from IO Interactive.

    • @Capewearer
      @Capewearer หลายเดือนก่อน +2

      Even Crysis 3 uses them, and still looks stunning. But such usage is limited to static scenes only. For dynamic things Crysis 3 uses screen-space Godrays effect. Works pretty well.

  • @knyght27
    @knyght27 หลายเดือนก่อน +6

    Very interesting! Always happy to see optimisation techniques explained in beginner-friendly terms

  • @sannyassi73
    @sannyassi73 27 วันที่ผ่านมา +3

    Very clever. I never got into the technical side of things but when I worked in CryEngine (2007-2015ish). I was the optimization guy in the editor- did most of the optimizations for Mechwarrior: Living Legends environments... Kagoshima (a MW:LL level I designed) took a lot of tricks to get to run reasonably. Making Levels for that game/mod are some of my best memories, and it's still alive today, 15 Years later!

  • @FrostyFortBoi
    @FrostyFortBoi 25 วันที่ผ่านมา +1

    this is really interesting. I look forward to see what you learn and achieve during your game engine development

  • @juliandurchholz
    @juliandurchholz หลายเดือนก่อน +27

    Hey there, good video! Certainly a decent way to fake light shafts, but I wouldn't say it "looks the same" as raymarched volumetric lighting. True single-scattering will always be the most convincing second to raytracing. Your technique appears more flat and is restricted to a fixed amount of random light shafts, which probably leads to scene-dependent artifacts.
    What's your hardware for the given benchmarks? Would be nice to have that included somewhere.
    The "first" approach (screen-space post process) can also be extended to somewhat work for off-screen light sources, to a degree. Are you sure using an intermediate texture with directional blur is superior to epipolar sampling with weight function, as per the traditional GPU Gems 3 solution?
    I wish your video was a bit longer to cover those details and nuances, go into more depth when comparing other techniques, so as to really give an impression of the tradeoffs.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +4

      I haven't heard of epipolar sampling, I'll check that out thank you!
      I have a 10700F CPU and an RTX 3070 GPU

    • @abhishekak9619
      @abhishekak9619 29 วันที่ผ่านมา +1

      @@Vercidium i dont know what both of you are talking about. the other person never said epipolar sampling. am i missing something?

    • @Vercidium
      @Vercidium  29 วันที่ผ่านมา +1

      @@abhishekak9619 epipolar sampling is in the 2nd last paragraph of the original comment here

    • @abhishekak9619
      @abhishekak9619 29 วันที่ผ่านมา

      @@Vercidium oh i see now.

  • @mrousavy
    @mrousavy หลายเดือนก่อน +2

    nice work! i love these kinds of videos

  • @RawFish2DChannel
    @RawFish2DChannel หลายเดือนก่อน +1

    Another banger video! I always find it very interesting when people find alternative ways of creating same visual effects but in much more optimized way.
    I also thought about optimizing one effect called SSR (Screen Space Reflections) and came up with a completely different way of doing it, but I haven't tested it yet.
    Also would be very interesting to see attempts of recreating ray tracing/path tracing with roughly same quality, but a lot more performance, since ray marching is very heavy task for a fragment shader. Would be very interesting to see alternative ways of doing it.

  • @kerduslegend2644
    @kerduslegend2644 5 ชั่วโมงที่ผ่านมา

    My god... You give one of the best explanation i could ever get, the video's awesome. Thankyou!

  • @nathanfranck5822
    @nathanfranck5822 หลายเดือนก่อน +16

    I had no idea a Feedback buffer was a thing! Thats cool

  • @mypaxa003
    @mypaxa003 หลายเดือนก่อน +34

    5:08
    "In this video on screen"
    Where? I dont see anything.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +17

      Just added it, thanks for letting me know!

  • @mezohx
    @mezohx หลายเดือนก่อน +11

    I learned more in 5 minutes by watching this video than I did in a week doing my own research. Wild

  • @zachbaldwin2925
    @zachbaldwin2925 หลายเดือนก่อน +2

    The dynamic beam approach was very interesting. I couldn't help but consider biasing the "dynamic beam" size/ density depending on distance to camera or splaying thebeam's mesh from the threshold of object and sky towards the ground, creating a trapezoid, to emulate penumbra.

  • @DdiiaabbllooBlanco
    @DdiiaabbllooBlanco 23 วันที่ผ่านมา

    >Sees video title that I'm interested in.
    >All I hear is static in my brain with the well put together information because I don't understand.
    >Nice video.

  • @fffrikkie1236
    @fffrikkie1236 หลายเดือนก่อน +9

    I like your content man, very well edited. Just wondering (and sorry if it's a stupid question), but do these optimizing techniques translate to other game engines or are they just specific to the one you're using?

    • @vexflorez6220
      @vexflorez6220 หลายเดือนก่อน

      If you want to, you can apply these optimization techniques yourself to other engines, though that means throwing away what the engine itself offers and writing things from scratch, while also building it in such a way that it works with all the other parts of the engine.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      This should be possible in any engine that supports shadows and vertex readback. For example Valheim uses a custom render pipeline within Unity, I reckon they could add beams of sunlight like this.

  • @brothermangaming
    @brothermangaming 29 วันที่ผ่านมา +2

    big fan of optimization, good shit mate will be keeping an eye on this

  • @fiffy6572
    @fiffy6572 หลายเดือนก่อน +3

    This is crazy
    This channel deserves so much more!!!
    Keep going with your amazing work! So inspirating for people like me who would love to make video games and also like the software engineering behind it!

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thanks so much!

    • @farianderson168
      @farianderson168 หลายเดือนก่อน +1

      Yeah, this channel is so much fun and inspiring for people like us who want to get involved in engine and optimization stuff.
      Probably not for those who think they know everything already, but great for me. I wish there was more contents and devlogs like this. It's like a light in the darkness.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      That means a lot to hear, thank you

  • @Skeffles
    @Skeffles หลายเดือนก่อน +1

    What a fantastic improvement!

  • @Tikai77
    @Tikai77 หลายเดือนก่อน

    I just discovered your channel and it's awesome!
    I wanted to know if you've ever thought about making videos where you explain how things work / how things are optimized in other video games? (for example RDR2 lighting / clouds etc...)
    It could be fun I think, anyway gg!

  • @williamabousharaf8980
    @williamabousharaf8980 หลายเดือนก่อน

    Nice work and nice presentation

  • @user-wg2eh3iy5r
    @user-wg2eh3iy5r หลายเดือนก่อน +1

    Very cool and you got a new sub.

  • @VaibhavShewale
    @VaibhavShewale 28 วันที่ผ่านมา +2

    ooh man this one is just mind blowing!

  • @callibor3119
    @callibor3119 หลายเดือนก่อน +2

    I think the best move is color your models and textures like if light actually hit and color it like if light didn’t.
    What’s going on from I am seeing is everything is completely singularly functioned and not programmed to act like how light should hit the environment.
    The light shouldn’t be faked, but how you color the textures and models can be faked to the point that it looks real.
    If you let the engine itself do all the work, you won’t get the performances with its default settings, so getting the models and textures early on in development to look like it is real-time before the game engine, can break the limits of the engine and you won’t see the work break itself.

  • @nolram
    @nolram หลายเดือนก่อน +6

    I don't think it's fair to say this looks the same as fully integrated volumetrics. Like, sure, in this one particular scenario in a forest where you want lots of small shafts this may work great, but what about other outside scenes where they aren't as closely occluded? What about local lights? What about generally open areas where the vast majority would be fog-filled? Generally this is a lovely technique for those very specific small beams of light, but I don't think this is anything even remotely close to volumetric scattering - hence why there aren't many games that use this particular method.
    Great video nonetheless, even if I would have hoped for a few more details about placement and transformation of the beams.

  • @cookietheory
    @cookietheory หลายเดือนก่อน +1

    Great video as always!

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thank you!

  • @user-di4vu2gl1p
    @user-di4vu2gl1p 24 วันที่ผ่านมา

    awesome ,thank you for a great job

  • @penial_
    @penial_ หลายเดือนก่อน +1

    Another wonderful video from sectors edge guys

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      Thank you :)

  • @SylvesterAshcroft88
    @SylvesterAshcroft88 หลายเดือนก่อน +1

    This is so incredibly clever!

  • @Jabjabs
    @Jabjabs หลายเดือนก่อน +1

    I would recommend folks look at the GDC talk for how light beams were handled for the game Abzu. Very cool. In that talk as well is a great summary of how to animate thousand of creatures simply via vertex offsets on the GPU - but that isn't so related to this.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      Thank you for the recommendation, I'll check it out

  • @terrylyn
    @terrylyn 27 วันที่ผ่านมา +1

    Cool algorithm, graphics programming is so much fun!

  • @omgnowairly
    @omgnowairly หลายเดือนก่อน +1

    These videos are brilliant.

  • @gordzen123
    @gordzen123 หลายเดือนก่อน +10

    Not only you're so good at optimizing and using shaders, you also make great videos, great content sir!

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thank you!

  • @OGPatriot03
    @OGPatriot03 หลายเดือนก่อน +2

    The end result isn't stunning to me visually, however the approach to get there is highly intriguing and gives me all sorts of ideas. These videos are great for getting the indie dev mind thinking.

  • @ka-uy8yh
    @ka-uy8yh หลายเดือนก่อน +3

    Vercidium; God emperor of Game Optimization and priest of frames per second
    love what you do

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      Hahaha thank you

  • @ExtraTrstl
    @ExtraTrstl หลายเดือนก่อน +1

    You’re doing divine work here.

  • @Exaspatial
    @Exaspatial วันที่ผ่านมา +1

    11 thounsand frames per second is just diabolical

  • @JMO-
    @JMO- หลายเดือนก่อน +2

    In an old game prototype I made, I had a lot of grass models placed around the world, but they were physical objects and would lag a lot when loading/unloading and area because of them. There is probably a way to use a shader instead of the grass actually being real while still giving me a way to control where the grass is and have the player model interact with it (I'm just not good enough at shaders to make it). That could be a cool video idea, I would love to see you render millions of blades of grass a few thousand times a second lol.

    • @kabinet0
      @kabinet0 หลายเดือนก่อน +3

      Take a look at Acerola's series on modern grass in video games, it's a really good watch and describes pretty much exactly what you're talking about.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +2

      ^ Acerola's video on grass is excellent. My grass rendering is still pretty naïve, I have a lot to learn about vegetation rendering

    • @farianderson168
      @farianderson168 หลายเดือนก่อน

      @@Vercidium i think Acerola's approach laks your way of optimising memory for meshes by using only vertex indices. Also you have your own engine and probably don't need to run a compute shader each frame just to have a vertex buffer filled (that's what DrawMeshInstancedIndirect does in unity i think).
      Would really love to see how you implement grass, probably in future videos

  • @omabang5002
    @omabang5002 หลายเดือนก่อน +1

    I have no idea what is this or why this video recommended to me but it's very cool!

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      Haha glad you liked it!

  • @milanst6385
    @milanst6385 หลายเดือนก่อน +2

    Beams of light in games is called god rays

  • @swagatggautam6630
    @swagatggautam6630 หลายเดือนก่อน +1

    This guy deserves a Nobel prize for Game Development.

    • @Vercidium
      @Vercidium  28 วันที่ผ่านมา

      Haha too kind!

  • @SSS333-AAA
    @SSS333-AAA หลายเดือนก่อน +1

    dude this is crazy, i'll rewatch when you translate this from smart to english.

    • @Vercidium
      @Vercidium  28 วันที่ผ่านมา

      Hahaha thanks

    • @SSS333-AAA
      @SSS333-AAA 28 วันที่ผ่านมา +1

      @@Vercidium why the fuck are you responding to me, there are genuine great questions down here you can read rather than read our shitpost.

  • @poggarzz
    @poggarzz หลายเดือนก่อน +1

    I may not understand everything but I surely can appreciate the beauty of it all.

  • @whitneysmiltank
    @whitneysmiltank หลายเดือนก่อน +3

    These are the best videos on youtube.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Too kind, thank you!

  • @Roxor128
    @Roxor128 26 วันที่ผ่านมา

    I wonder: what about a voxel map for where light goes?
    The map would be a 3D greyscale texture (you can tint it later). Initially fill it with all-white voxels, black out voxels where solid geometry exists, then do a directional blur away from the light sources (which would be a single direction for the sun, given it's far enough away that its rays can be considered parallel by the time they reach Earth), and repeat the black-out and blur steps a few times. When rendering, sample the voxel grid along the camera ray to get side-illumination data using a 3D texture sampler.
    You'd have to experiment to find how low a resolution you can get away with, but it could allow pre-calculating some of the lighting data, and as a bonus, you'd know ahead of time how many steps to take along the ray during rendering, just from the grid resolution and distance. If your swaying trees follow a predictable loop, you could calculate a few frames of voxel lighting data and select from the appropriate one, or even interpolate between them.
    I have no idea how fast this would be, and it absolutely would be memory-hungry, but by transforming the volumetric lighting to image-processing (just in 3D), it might be faster than doing the real thing. With luck, you could do it at load-time, or chunk-generation, rather than having to keep it on disk. Hell, you could probably do it in a compute shader on the GPU, so the CPU never needs to touch it. Now that I think about it, it sounds like it has a bit in common with Quake's lightmaps, except 3D and only concerned with direct illumination.

  • @Ronin03
    @Ronin03 27 วันที่ผ่านมา +1

    I always find it fascinating to see experts go ham in thier in their interests and listen in no matter how much i actually understand on the subject at hand 😂

  • @SirGilt
    @SirGilt 23 วันที่ผ่านมา +1

    if we like this, and get this to the front page of youtube, we may see better performance in games if we are lucky.

  • @JackTheOrangePumpkin
    @JackTheOrangePumpkin หลายเดือนก่อน +1

    Perfect i love it!!

  • @jordanfarr3157
    @jordanfarr3157 หลายเดือนก่อน +1

    Incredible!!

  • @sandwich2473
    @sandwich2473 หลายเดือนก่อน +1

    That's really really cool :O

  • @mild2616
    @mild2616 หลายเดือนก่อน +1

    Idk if this just common knowledge or if this man is just a genius but my god the game space is gonna be so much better from here on out if this guy is working on em. Great video!

  • @floschy_1
    @floschy_1 28 วันที่ผ่านมา +1

    1:19 I didnt know I need this visualisation in my life, but i do.

  • @JCMSimon_
    @JCMSimon_ 27 วันที่ผ่านมา +1

    Great video. Thats all i have to say tbh... which is why ill ask a off-topic-ish question instead,
    What did you use to create all the motion graphics like the diagrams and the code boxes?

    • @Vercidium
      @Vercidium  27 วันที่ผ่านมา

      Thank you, it’s all done using code and then screen recorded. I used C# and SkiaSharp for the diagrams, and RichTextKit for the syntax highlighting

  • @HypeLozerInc
    @HypeLozerInc หลายเดือนก่อน +7

    Legend

  • @solhsa
    @solhsa หลายเดือนก่อน +1

    Wow, someone actually found a use for transform feedback.

  • @Chris-op7yt
    @Chris-op7yt 28 วันที่ผ่านมา +1

    light is everywhere, except where there is shadows, which much attenuate it

  • @I2ed3ye
    @I2ed3ye หลายเดือนก่อน +1

    Now all my games run so well!

  • @askeladden450
    @askeladden450 หลายเดือนก่อน +38

    bro out here casually dropping absolute masterpieces every month

  • @IstyManame
    @IstyManame หลายเดือนก่อน +10

    Yea you definitely do not have adhd lol

    • @coreyscanlon1238
      @coreyscanlon1238 25 วันที่ผ่านมา

      Idk this seems like the video is a product of hyper focus and that outta the box thinking. ADHD all over it

    • @RagePower2000
      @RagePower2000 15 วันที่ผ่านมา

      ​@@coreyscanlon1238Yep!

  • @arhmichal
    @arhmichal หลายเดือนก่อน

    great effect !! even better optimization !!
    your beams are ancored to the ground, this looks unnatural when the sun is moving (4:53-4:58)
    the pivot point should be higher. i'm wondering how much optimization would that eat up ... to select points for the beams higher off the ground... or maybe already near the edges of terrain or objects and then find the spot on the ground the beam would hit to determine shadow density...
    food for thought ;)

  • @Aminsx_
    @Aminsx_ หลายเดือนก่อน +1

    The 3rd method in the first chapter of the video reminds me a lot of LIMBO

  • @darkfllame
    @darkfllame 25 วันที่ผ่านมา +1

    babe wake up Vercidium uploaded !

  • @LinguisticMirage
    @LinguisticMirage หลายเดือนก่อน +2

    that plane light thing is something from the early 2000's for example gta san andreas does that

  • @atunalamarinera
    @atunalamarinera 29 วันที่ผ่านมา +1

    Maybe it can't replace the second method but surely it will replace the first one, not only runs faster but also looks better.

  • @saemideluxe
    @saemideluxe หลายเดือนก่อน +1

    The visualization of the fragment shader output, with all the colored, positioned fragments, was amazing! Can you explain how you did that? Was it a simulation or is there a tool that helps with this?

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thank you! It's a simulation, I used GL_POINTS to render each pixel, using the colour from the final image. Each pixel was then positioned by sampling the depth buffer in the vertex shader, then re-creating its 3D position from the depth value.
      I don't fully understand the matrix math, but it's explained well here: stackoverflow.com/questions/32227283/getting-world-position-from-depth-buffer-value

    • @saemideluxe
      @saemideluxe 29 วันที่ผ่านมา +1

      @@Vercidium Wow, impressive. Thanks for the explanation.

  • @r2d2vader
    @r2d2vader หลายเดือนก่อน +11

    First
    Edit: Great video! But the end screen video doesn't seem to show up.

    • @6Eev
      @6Eev หลายเดือนก่อน +2

      beat me to it 😔

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +1

      Thank you! I've just added it

  • @jacktruong7151
    @jacktruong7151 29 วันที่ผ่านมา +1

    I've to rewatch this over and over for about 7 times just to catch up with wtf is going on lol
    Damn cool

    • @Vercidium
      @Vercidium  29 วันที่ผ่านมา

      Hahaha thank you

  • @BMRG14
    @BMRG14 หลายเดือนก่อน +13

    Perfect perfect video and info, with a very bad title. :(
    It's not even searchable really.

    • @AkshayKumarX
      @AkshayKumarX หลายเดือนก่อน +9

      This is the norm now with majority of youtube channels.
      Titles and thumbnails like these drive curiosity and get people to click on the video. Then the creator increases the viewer watchtime by being as vague as possible for the first minute or so to game the system and boost the video's popularity.
      The downside being that if you aren't staying up to date with every new video, old content is almost impossible to find via search.

    • @Vercidium
      @Vercidium  หลายเดือนก่อน +3

      Thank you :) I come up with 5-10 different titles and thumbnails for each video and test each of them, then leave it on the one that brought in the most views. It's all an algorithmic game

  • @raniem4368
    @raniem4368 21 วันที่ผ่านมา

    Just watched some of your older videos.
    I'm very impressed by the Raytraced Audio.
    Would it be possible to make a video on how you did it?
    Like your recent videos?
    Thank you
    -A Fan

  • @darkfllame
    @darkfllame 25 วันที่ผ่านมา +2

    not gonna lie, i'm developping a 2D automation game and i'll make so that it can run smoothly on the most shittiest laptop you've ever seen. 16 bits vertex data, instancing and more. And the maps could be HUGE, up to 2^70^2 tiles: by separating the world into regions split into chunks. All of that with not that much resources consumption (in theory).
    I haven't done the game yet and i hope i could share it to the world. god dammit i love game dev.
    Also everything will be done with opengl in zig ! I'll a devlogs when I finish the rendering stuff (at least some sort of good rendering)

  • @patty4449
    @patty4449 หลายเดือนก่อน +1

    Ok I can add on this...
    When the day passes less beams should be on screen...
    Beams should't be statics but move slightly over time...
    Great concept...
    But I still can't get dynamic snow done in this way as the sheer amount of vertex points saved is the problem... Im getting closer tho...

  • @miguelalexandre3203
    @miguelalexandre3203 27 วันที่ผ่านมา

    hey man, i have a question that are not about the video, but how do you edit these videos? the edit of your videos are just INCREDIBLES! it made to me want to watch more video of your channel

  • @bl4ckk
    @bl4ckk หลายเดือนก่อน +1

    I can't decide what's better, the split transitions, or the light rays

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      Haha thank you. I had to render it at half speed as my GPU couldn't render all 3 scenes at 60 FPS

  • @baronbacku9984
    @baronbacku9984 15 วันที่ผ่านมา

    god daaaamn, i'd have never came up with something like this

  • @nicklasfejersen4202
    @nicklasfejersen4202 หลายเดือนก่อน +1

    i can't wait for someone to implement this into a minecraft mod

  • @FelipeMendez
    @FelipeMendez หลายเดือนก่อน +2

    Id be curious to know if distance fields would help reduce the sample count while keeping good quality in approach 2

  • @deWolffff
    @deWolffff หลายเดือนก่อน +1

    Incredible.

  • @matthewboyd8689
    @matthewboyd8689 25 วันที่ผ่านมา +1

    Misread the title
    Thought it said gamers are for optimizing
    Started thinking about talk that a game developer said something about, gamers will optimize the fun out of a game. And I realized that in my own life and working life I've been optimizing things to work more efficiently as well. And to such degree that at one point I realized I was turning away experiences that I actually wanted to do just because it conflicted with my schedule that I made up and didn't have to follow.

    • @Vercidium
      @Vercidium  24 วันที่ผ่านมา

      That’s deep. I can relate to this

  • @SaenGaems
    @SaenGaems หลายเดือนก่อน +1

    would be cool to have the beams also move a little with the wind applied to the trees, looks just a little too static

    • @Vercidium
      @Vercidium  หลายเดือนก่อน

      That's a great idea! I could shift the beam towards the samples that are in the light

  • @scarecrow5848
    @scarecrow5848 9 วันที่ผ่านมา

    this would be SO good for VR.

  • @anzhel3268
    @anzhel3268 หลายเดือนก่อน +1

    cool, it's nice how a lot of problems get solved by just using quads in a smart way

  • @dmigul
    @dmigul หลายเดือนก่อน +1

    I'm thinking about giving a try for compute shaders to do averaging.

  • @Digiur
    @Digiur หลายเดือนก่อน +9

    Is that "optimized"? Or is it a completely different technique?

    • @perplexedon9834
      @perplexedon9834 25 วันที่ผ่านมา

      I think it's fair if the output looks comparable to the human eye. The thing that is being optimised is the graphical output, not the completion of a specific process. The fast inverse square Quake is a classic example. If someone replaced the true inverse square with the fast inverse square, I'd certainly consider that an optimisation even though it technically gives a slightly different output and technically isn't the inverse square.

    • @Digiur
      @Digiur 25 วันที่ผ่านมา

      @@perplexedon9834 Sure, sure. Some results different techniques. Not "optimization".

    • @survival_man7746
      @survival_man7746 22 วันที่ผ่านมา +1

      That's why it's much faster, it was reengineered. It is less acurate but still looks good like transforming a map into a grid for pathfinding

    • @Digiur
      @Digiur 22 วันที่ผ่านมา

      @@survival_man7746 I'm just being pedantic about the word "optimize"

  • @maksiksq
    @maksiksq 27 วันที่ผ่านมา +1

    Amazing

  • @kaleygoode1681
    @kaleygoode1681 หลายเดือนก่อน +1

    If it's through leaves, the flickering isn't necessarily wrong - just annoyingly flashy, as flickering leaves are in real life!
    But crepuscular rays through clouds shouldn't flicker, so this is great for those

  • @Greywander87
    @Greywander87 หลายเดือนก่อน +1

    The key to creating a simulation that is both accurate and fast is to forget about accuracy, cheat as much as possible, and tell no one.
    No but for real there will be times when relying on good old RNG gives a result that is only slightly worse than running an expensive simulation. The real key is finding shortcuts and approximations that get you that "good enough" result where no one can honestly tell it isn't 100% accurate without costing too many system resources. Creating an accurate simulation is only half the job, the other half is figuring out the tricks that let you run the simulation in real time.

  • @a6gitti
    @a6gitti หลายเดือนก่อน +1

    damn bro! i shall call you shadow man

  • @severinehedi
    @severinehedi 29 วันที่ผ่านมา +1

    This man will be optimizing GTA V to run at 5000 FPS on Thinkpad laptop