Dynamic Detail In Games

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 106

  • @csxcatgirl9896
    @csxcatgirl9896 2 роки тому +429

    maybe the real gpu optimization was the friends we made along the way

    • @saul8510
      @saul8510 2 роки тому +7

      or frustrum culling .

  • @NikolaZagorac
    @NikolaZagorac 2 роки тому +93

    As an og gamer, I remember flat trees suddenly becoming 3d when i approach them

    • @Roxor128
      @Roxor128 Рік тому +8

      I seem to recall that technique being called "billboarding" and the individual flat objects being called "impostors".

    • @FurryWrecker911
      @FurryWrecker911 Рік тому +7

      Just Cause 2 is probably the most memorable example I have seen. If you were up high enough in a plane, the tree cards would flip around to face you if you looked down as you flew overhead. If you were low enough, they shifted into 3d shapes.

    • @Suzuki_Hiakura
      @Suzuki_Hiakura 9 місяців тому

      @@FurryWrecker911 My only grip with Just Cause 2 is rather unrelated, about how it never saves my settings after closing and relaunching the game. It would always be blaring music with the resolution set to about half my screens base resolution. I never noticed the tree cards, which seems impressive as I figure I will have to look to see it, only knowing now what I am looking for lol. Plus, as I am mostly traveling on the water or road, I figure I wont really see it anyways.

  • @monkeysfromvenus
    @monkeysfromvenus 2 роки тому +118

    i love the editing and your way of talking in these vids, it's super comfy

  • @perplexedsnowmobile
    @perplexedsnowmobile 2 роки тому +31

    Vampires can't see themselves in a mirror because they're frustum culled

  • @cloudgaming927
    @cloudgaming927 2 роки тому +62

    I was so focused on the content of the video that it took me 8 minutes to realize you were using Huniepop music. Niche game dev topics are my new favorite side of this website, your channel is awesome.

  • @jameswaters95
    @jameswaters95 Рік тому +3

    really like your page, you answer a lot of questions I have in great but understandable detail

  • @clearskyy
    @clearskyy Рік тому +4

    I never thought I'd be learning something with the Huniepop BGM going on. My eyes widened at the realization.

  • @samuelkurz5814
    @samuelkurz5814 2 роки тому +8

    Love your videos. Stumbled across your channel yesterday and even tough I’m not a game dev myself I find your videos very interesting and entertaining.

  • @ashisharky
    @ashisharky 2 роки тому +7

    I have learned a ton about game development from your channel. You've somehow nailed both informative and easy to understand and entertaining

  • @dziarskilisek
    @dziarskilisek 2 роки тому +8

    Nicely explained. Thanks a lot.

  • @samuelgrahame3617
    @samuelgrahame3617 2 роки тому +5

    really love the way you explain stuff :)

  • @Cloud-Yo
    @Cloud-Yo Рік тому +1

    Acerola knew I would be watching this in the future and prepared for that contingency. 10/10...programming at its best.

  • @slimeinc.3822
    @slimeinc.3822 2 роки тому +1

    bro these videos are so good to watch while high fucking thank you

  • @sedativeman
    @sedativeman 2 роки тому +7

    You make fantastic videos bro. I'm just starting to learn UE5 and Blender, I can't wait to figure out how to actually put some of this information in use lol.

  • @Browsinghard
    @Browsinghard Рік тому +1

    I am watching this in the future and I appreciate you acknowledging me

  • @nguyenhoangminhtrung2779
    @nguyenhoangminhtrung2779 2 роки тому +2

    Nice video, to refresh what I learnt back in the OpenGL days.

  • @yummystuff238
    @yummystuff238 2 роки тому +6

    Seeing slime’s blender bit got me dying

  • @thebumblecrag61
    @thebumblecrag61 2 роки тому +1

    This is a good video, I feel better after watching it!!

  • @Nayckron
    @Nayckron 2 роки тому +1

    I have praised your videos several times & i have nothing new to say, just commenting to boost interaction.

  • @radicant7283
    @radicant7283 Рік тому +1

    Acerola I love you! 😩👌

  • @gameguy301
    @gameguy301 Рік тому +5

    would love a rundown on mesh shaders, they seem promising but Im not aware of any games that use them.

    • @Acerola_t
      @Acerola_t  Рік тому +3

      probably wont happen for a long time, I'd have to write my own engine to do it rn and I doubt unity will be adding mesh shader support anytime soon

    • @gameguy301
      @gameguy301 Рік тому +1

      @@Acerola_t unfortunate but understandable, thank you.

    • @gtsteel
      @gtsteel 8 місяців тому

      True mesh shaders (that can use barriers and control workgroup layout) don't have very good hardware support yet so they don't get a lot of use, as devs would have to include a fallback option. We can already get a lot of the benefits of mesh shaders by using a (near-universally-supported) pull-based pipeline layout, which disables the traditional vertex fetch and indexing stages and instead gives the vertex shaders full random access to the vertex data in storage buffers. This allows the vertex shader to use any data layout it wants interpreted however it wants to, which includes the ability to do custom tessellation without needing the (often inefficient) fixed-function tessellation and geometry shaders. There is a little bit of duplicated effort due to the lack of coordination between invocations (which can be minimized by the use of a compute shader prepass) but it is a very flexible way to render all sorts of geometry other than pre-baked meshes.

  • @SomeRandomPiggo
    @SomeRandomPiggo 2 роки тому +2

    i'm so glad youtube is pushing small channels into the almighty algorithm, i've found so many good channels lmao

  • @CaveyMoth
    @CaveyMoth 2 роки тому +2

    1:41 Aw, I expected The Devil is in the Details by Boards of Canada.

    • @Acerola_t
      @Acerola_t  2 роки тому +1

      For me, it's The Devil Is in the Details by The Chemical Brothers

  • @bartholemumk1437
    @bartholemumk1437 2 роки тому +2

    Looks good!

  • @AltamishM
    @AltamishM Рік тому +1

    Here from the future to say nice TVOTR reference

  • @Suzuki_Hiakura
    @Suzuki_Hiakura 9 місяців тому

    I created an amazing world map with the help of Blenders mesh Terrain addon... was upset I had to remove all the detail since I couldn't figure out LOD lmao. Also messed up setting up culling on a scene with a 3d printable Warhammer 40k Hive city... basically about 3k towers, each with about 50-100 vertices and a random number of bridges between them; I merged towers surrounding the center, which meant that the culling I was using in Unity would only cull the "groups" of towers that the camera didn't happen to look at.
    Its nice thinking back on how bad I was at world building. Even made a small room scene that put my 1070ti usage at a hard 70%, with a spike to 81% every time I moved the camera.

  • @spookiepoogie5139
    @spookiepoogie5139 Рік тому +1

    Anyone who has played a Bethesda game should be distinctly aware of LOD

  • @starplatinum3305
    @starplatinum3305 Рік тому +1

    Idk but, for example, theres the mountain right ?, and theres a lot of trees gameObj behind the moutain mesh, how can we frustum those ? Or frustum those vertices that we cant see but still inside our cams ?
    Like uhh, checking the depth texture, then render only the vertices that r visible in the depth texture 😔🤨🤔 sorry man im dumb ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

    • @Acerola_t
      @Acerola_t  Рік тому +2

      yeah that is called occlusion culling, it is a different topic.

    • @starplatinum3305
      @starplatinum3305 Рік тому

      @@Acerola_t can we "disable" those vertices with the occlusion culling collidee system ?

  • @cpab27
    @cpab27 Рік тому +1

    i think the example with the mountains is actually very easy to fix,what you have to do is bake a normal map of the high poly one,and make a very low poly one that capturas just the big and important stuff,than you put the baked normal map into the low poly mountains,and now it will look like the high poly one when is low poly.

  • @JinKee
    @JinKee Рік тому +1

    7:27 are we gonna talk about backface culling?

  • @oby1
    @oby1 2 роки тому +4

    Out of pure curiosity- think you'd be able to do non Euclidean spacial rendering?

    • @Acerola_t
      @Acerola_t  2 роки тому +3

      Yeah but I think CodeParade has done a great job covering that niche on his own lol

  • @danielfinley509
    @danielfinley509 Рік тому +1

    Learning about LOD when I started modding ruined my eyes.

  • @CranJ1213
    @CranJ1213 Рік тому

    I'm watching this in the future

  • @deltanine1591
    @deltanine1591 3 місяці тому

    Great vid

  • @johnlock807
    @johnlock807 2 роки тому

    "Performance police" 🤣 i cant stop rolling on the floor lmao

  • @Ragchomp
    @Ragchomp 2 роки тому +2

    I WILL NOT look at videogames the same way EVER again

    • @Acerola_t
      @Acerola_t  2 роки тому +5

      he really never looked at video games the same way ever again

  • @4.0.4
    @4.0.4 2 роки тому +2

    I don't get it. If the geometry shader runs after vertex shader / CPU bottleneck, how can it boost performance? It's not like the fragment shader has pixels to render outside the frustum.

  • @Dexef_
    @Dexef_ 2 роки тому

    Hey i'm watching this in the future :)

  • @funkyjug2107
    @funkyjug2107 2 роки тому

    insane

  • @ivanpirogov9373
    @ivanpirogov9373 2 роки тому +6

    Great videos! You explain everything in a simple and clear way. I have some old questions about lods. Is it possible to get rid of models jittering in the moment of the transition between different lods? Also in some games it is noticeable how abruptly the grass is loaded. Are there known solutions to these problems?

    • @Acerola_t
      @Acerola_t  2 роки тому +3

      Yeah, usually games will use dithering to fade between LODs or fade objects in/out of view.

    • @ivanpirogov9373
      @ivanpirogov9373 2 роки тому +1

      @@Acerola_t Thanks! Will try to search.

    • @Acerola_t
      @Acerola_t  2 роки тому +2

      @@ivanpirogov9373 Genshin impact is an example that comes to mind, if the camera is too close to the character then they dither the player model. It's the same technique.

  • @jacklaplante3184
    @jacklaplante3184 Рік тому +1

    I'm confused about what you mentioned about passing huge meshes into the gpu being expensive. without passing in a huge mesh, how will the terrain still have high LOD? i get that you are adding more verts but if you don't have the high LOD verts to begin with then wouldn't you just be dividing the polys from the low LOD mesh into flat planes that have more verts?

    • @Acerola_t
      @Acerola_t  Рік тому

      the tessellated triangles are created on the gpu, rather than being passed in. So you pass in a "low LOD" plane and then the gpu tessellates the triangles and then the terrain shader samples the terrain height map to displace the vertices, resulting in higher detail terrain.

    • @jacklaplante3184
      @jacklaplante3184 Рік тому

      @@Acerola_t ok but at the end of the day the GPU still needs the terrain heightmap data. so hopefully that data is smaller than the mesh would be. but probably wont be much less if it has the same resolution of detail as the high LOD mesh. btw I love your videos! not tryna argue just want to make sure i understand

    • @Acerola_t
      @Acerola_t  Рік тому +2

      @@jacklaplante3184 Yeah a height map texture is considerably less expensive than a really high resolution plane especially since this also allows you to control how detailed the plane is at runtime rather than always drawing the same amount of vertices.

  • @lclMetal
    @lclMetal 2 роки тому +1

    The fps was almost 3000 after the level of detail addition, but after applying frustum culling it's only ~150?

    • @Acerola_t
      @Acerola_t  2 роки тому +3

      I turned the tessellation to max so that you could actually see the fps increase when moving the camera away from the terrain hence the overall fps decrease, pretty sure I said this in the video on screen

    • @lclMetal
      @lclMetal 2 роки тому

      @@Acerola_t ah, I see, thanks. Yeah, I think you mentioned it in the video, I just misunderstood it somehow.

  • @TinchoX
    @TinchoX 2 роки тому

    Noice

  • @hoodio
    @hoodio Рік тому

    NANIIIIIIITE

  • @jeremymcarthur1930
    @jeremymcarthur1930 4 місяці тому

    How is there no dynamic LOD feature yet?

  • @panickal
    @panickal 2 роки тому

    How can I actually go about these with a simple shader or whatever in Unity?
    And with the Built in Render Pipeline? Thanks

    • @Acerola_t
      @Acerola_t  2 роки тому +1

      This vid is an adaptation of Jasper Flick's tutorial on the same subject, he goes over how to actually write the shader.
      catlikecoding.com/unity/tutorials/advanced-rendering/tessellation/

    • @panickal
      @panickal 2 роки тому

      @@Acerola_t Oh. This seems a little more complicated than I expected..
      I haven't had experience with writing shaders in the past. I was hoping there'd be a quick way to do frustum culling on meshes at least. I may need to get into this sometime.

  • @VladimirDev
    @VladimirDev Рік тому

    Hey acerola! You got a patreon or something? I'm a render programmer/tech artist myself and I enjoy brushing up my rendering knowledge looking at your stuff and I'd like to support your endeavor in the future!

    • @Acerola_t
      @Acerola_t  Рік тому +1

      I do!
      www.patreon.com/acerola_t
      Everything I make will always be freely available and open source so no need to worry about that, but I would appreciate any support!

  • @popogeejo
    @popogeejo 2 роки тому

    Weird to have found a computer graphics information channel directed by Akiyuki Shinbo...

  • @jansidlo
    @jansidlo 2 роки тому +1

    Hello from the future

  • @Smoah
    @Smoah 2 роки тому +3

    my poor, poor brain.

  • @cinderheart2720
    @cinderheart2720 2 роки тому +1

    So, how does this work for minecraft, which doesn't use levels of detail?

    • @Acerola_t
      @Acerola_t  2 роки тому +2

      Minecraft is a pretty unique problem and I dont know the specifics of how they render their chunks with more than 0 fps.
      It doesnt need level of detail though since the meshes are so low poly already.

    • @cinderheart2720
      @cinderheart2720 2 роки тому +2

      @@Acerola_t There's a mod that adds LoD to minecraft. With the right settings, it lets you see the entire world from high up enough without significant frame drops.
      Clearly the vanilla system is having some effect on performance, low poly or not.

    • @Aura42069
      @Aura42069 2 роки тому +4

      If I'm right, then
      Minecraft uses chunking (pretty obvious), chunks are removed with Frustum Culling, and, minecraft optimizes the rendering by NOT rendering any triangle that doesn't have air nearby, so, 4 blocks inside a grass plane are just 4 quads, instead of an entire cube.
      In short of this strange explanation I did: Cull chunks, draw only seen faces of the cube, add faces if there is no block nearby, so player won't see out of bounds
      And also, minecraft packs it's textures into an atlas at runtime, so it doesn't reload every texture every draw call.

    • @hyeve5319
      @hyeve5319 2 роки тому +1

      Minecraft has.. pretty garbage optimization and performance overall anyway, (though being written in Java really doesn't help), but the main technique used by the rendering is dynamic chunk caching.
      Whenever the blocks in a chunk are changed, the render pipeline re-builds a cache of the chunk data, which ONLY includes the exposed surfaces of blocks. The actual mesh data is essentially re-generated each time the chunk is altered, and then that cache is used to draw it each frame.
      Additionally, for exposed surfaces that are not currently visible - such as the insides of caves, while standing on the surface - there is an additional culling check done when rendering the cache each frame.

    • @hyeve5319
      @hyeve5319 2 роки тому +1

      Oh, and if I remember rightly, the chunk cache builders are threaded with usually 2-4 chunk worker threads at any time, which is why some kinds of changes to chunks can have a slight visual delay - player break/place actions normally never do, because they force a same-frame chunk rebuild, but a lot of things don't.

  • @gleetR
    @gleetR 2 роки тому

    came here from the grass rendering vid

  • @LonewolfeSlayer
    @LonewolfeSlayer 2 роки тому

    Is your intro a reference to something like your new intro and the Monogatari Series or is it something original?

    • @Acerola_t
      @Acerola_t  2 роки тому

      This intro was original, I swapped over to the monogatari title card intro in the newer vids cause it's better for watch retention and more fun to edit.

  • @OtesOtesOtes
    @OtesOtesOtes Рік тому

    TV on the Radio (finally being a hipster has paid off)
    Crazy you don't even cover lod in a 9:50 video (oh lod have mercy)

    • @Acerola_t
      @Acerola_t  Рік тому +1

      yeah cause lod is a more intentional thing where as this is about programmatic lodding with tessellation shaders

    • @OtesOtesOtes
      @OtesOtesOtes Рік тому

      @@Acerola_t I'm trolling you because u didn't use the acronym and everybody likes acronyms keep it up tho
      I had to keep with the theme of trolling bc tbh TV on the Radio dunno if they're a hipster band I was just being cringe to show my appreciation for content nobody else in the comments got the reference dunno if staring at the sun music video kinda has synthy equalizer pulsing vibes that looks like the geometries you're talking about or why u even made that reference pls explain

    • @Acerola_t
      @Acerola_t  Рік тому

      @@OtesOtesOtes lol it's just a song i like
      and oh i see what you mean, yeah I try to avoid jargon when I can to keep the vocab accessible.

  • @yrorysinger5313
    @yrorysinger5313 Рік тому

    1:28 Well, now I know that acerola is actually pronounced "asserola" instead of "ackerola," like I had thought.

    • @Acerola_t
      @Acerola_t  Рік тому +1

      it's technically pronounced like ah-say-ro-la but i say it like ace-rola like it's two words just cause it's my name and i can say it how i want

  • @hyeve5319
    @hyeve5319 2 роки тому +1

    UE5 and Nanite would like to contend with your addendum (;

    • @Acerola_t
      @Acerola_t  2 роки тому +1

      UE5 is the antichrist please do not fall for it

    • @hyeve5319
      @hyeve5319 2 роки тому +1

      @@Acerola_t Ehhh.. If you're talking about the fact that games can usually bake everything and don't need to care about realtime lighting, then that's certainly true to some extent, but Nanite specifically is ONLY a dynamic triangle-rendering-machine that actually does have pretty massive performance benefits, especially for rendering high-quality meshes on low-end platforms.
      Also dynamic lighting (lumen) is cool. Useful for games? Maybe less so. But still very cool. (im definitely biased haha, i write realtime 3D rendering in fragment shaders for fun. Speaking of, I was wondering - you ever heard of Shadertoy or dipped into SDFs and raymarching? Very fun graphics stuff.)

    • @Acerola_t
      @Acerola_t  2 роки тому +1

      @@hyeve5319 I'm mostly joking I just dislike Unreal's attempt to monopolize the engine market as proprietary engines are my favorite aspect of the industry
      Yeah I've done ray marching stuff, havent made any vids about it because everyone and their mom has made ray marching videos. Might make a vid on parallax mapping soon though which would mean I have to talk about ray marching.

    • @hyeve5319
      @hyeve5319 2 роки тому +2

      (also yes the code is golfed to hell, i do not and would never write any other kind of code anything like I do that, it's just fun to golf the essentially one-time-use shader code that never needs to be touched ever again)

    • @ali32bit42
      @ali32bit42 2 роки тому

      @@Acerola_t huh. same here and i thought i was alone. dont get me wrong i like their attempt of bringing good tools to masses but it also means less people will be learning the hard ways and we loose some creativity in the market . if everyone uses the exact same solution for a problem we might never find a better one. imagine if all games today were built with the quake1 engine and never improved on it by themselves and relied on id software to try and keep up . soo many amazing technologies would not have been possible if someone didnt try to find a new way to do something .

  • @Pockeywn
    @Pockeywn Рік тому

    why did I think the forza horizon 5 image was a goat simulator screenshot

  • @MrLordFireDragon
    @MrLordFireDragon 2 роки тому

    Genuine question: why do you always state things in terms of FPS? I understand that's the 'gamer metric', but given you're measuring the performance of a game, I'd have thought the time between frames (displayed to the right of the fps in unity) would be the more important, since as a developer you'll be layering effects, which will cause an additive linear effect on the time between frames (but a non-linear effect on the FPS).
    I mention this in particular because in one video you say that post-processing effects shouldn't take more than 3ms to execute, so sometimes you use that as a measure, but overwhelmingly you seem to use FPS.
    It might be just a habit or done in the name of being accessible, just interested to know what the reasoning is.

    • @Acerola_t
      @Acerola_t  2 роки тому +4

      Because I'm self taught and didnt realize that fps isnt as useful as ms when i was making this video so nowadays I use ms as a performance metric

  • @ADRENELINEDUDE
    @ADRENELINEDUDE Рік тому

    Is Nanite a one size fits all?

    • @Acerola_t
      @Acerola_t  Рік тому

      technically yeah, but nanite doesnt work on transparent materials.

  • @curtmack
    @curtmack Рік тому

    ...I was about to correct you, only to realize that "frustum" is correct and I've incorrectly been calling it "frustrum" for years.

    • @Acerola_t
      @Acerola_t  Рік тому

      lol i was calling it frustrum before i double checked for this vid

  • @imfine3792
    @imfine3792 Рік тому

    Bro made nanite terrain befor it existed. UE5 should set up there game💀💀

  • @beplh5242
    @beplh5242 Рік тому

    Hello from the future