Modern Foliage Rendering

Sdílet
Vložit
  • čas přidán 3. 07. 2024
  • While billboard grass is a performant, easy option for visualizing grass, modern games like Breath Of The Wild are able to utilize real geometry to get more interesting and appealing foliage. How can games nowadays afford to do so?
    Support me on Patreon!
    / acerola_t
    Twitter: / acerola_t
    Twitch: / acerola_t
    Discord: / discord
    Code: github.com/GarrettGunnell/Grass
    References:
    lodev.org/cgtutor/randomnoise...
    people.cs.pitt.edu/~bmills/do...
    developer.nvidia.com/gpugems/...
    Music:
    Gold Falls Casino - HuniePop OST
    Joy - Persona 3 OST
    Iwatodai Dorm - Persona 3 OST
    Bad Bully - Kizumonogatari OST
    The Path Is Open - Persona 3 OST
    Unavoidable Battle - Persona 3 OST
    Afternoon Break - Persona 3 OST
    Chapters:
    00:00 Intro
    01:18 Getting Started
    02:38 Coloring
    03:28 Animating
    06:10 Reality
    07:10 Scan And Compact
    09:59 Conclusion
    Thanks for watching!
    This video is dedicated to my friend, Alotryx.
    also please subscribe haha please man please just subscribe dude please just like one sub I swear I'm not addicted please man please just one sub please
    #acerola #gamedev #graphics #unity #indiegame #unity3d #madewithunity #indiedev #unity2d
  • Věda a technologie

Komentáře • 263

  • @maaz4354
    @maaz4354 Před rokem +403

    Can we just appreciate how the real life world just instantiates infinite grass every frame

    • @cvspvr
      @cvspvr Před 9 měsíci +20

      touch grass

    • @lih3391
      @lih3391 Před 9 měsíci +18

      It runs all of quantum mechanics and relativity too!

    • @tonyhakston536
      @tonyhakston536 Před 9 měsíci +17

      @@lih3391relativity is just lag, come on now.

    • @samuunn
      @samuunn Před 7 měsíci +4

      ​@@cvspvr it would have to calculate the physics and my hand collision (100% accurate) so idk it's too much power

    • @abdou.the.heretic
      @abdou.the.heretic Před 7 měsíci +3

      ​@@samuunnTianhe-2A can calculate the collision data of three of your next generation using its 33.86 PETAFLOPS. This is today's tech, I'm sure the gman simulating life got a beefier rig lmao

  • @swizzler
    @swizzler Před 2 lety +808

    The grass in Zelda is actually only 2 tris, also it turns into even simpler 1 sided billboards at a distance around the edge of the camera

    • @bbuskabuske
      @bbuskabuske Před 2 lety +49

      wait then how does each grass bend tho if they don't have any vertice to manipulate in between

    • @srqubit9480
      @srqubit9480 Před rokem +100

      @@bbuskabuske
      I guess they use shaders similar to gta, moves the bushes Using a 2d fisheye filter

    • @KingBobXVI
      @KingBobXVI Před rokem +40

      @@srqubit9480 - That, or the grass on the billboard is actually procedurally animated within its "texture"?

    • @srqubit9480
      @srqubit9480 Před rokem +28

      @@KingBobXVI I was talking about 3d grass
      For 2d grass if it can be animated for 3d it requires too many polygons which lags and a lot

    • @user-zn8fm8kw5v
      @user-zn8fm8kw5v Před rokem +9

      May I ask where you got this information? I would really move to read about how Breath of the Wild’s grass works!

  • @spore124
    @spore124 Před rokem +105

    Very well explained video. However, regarding the performance penalty, a 300x300 field has ~100 times the area of a 32x32 field so if that's what you had to do to get equivalent performance then it means this new method had a performance drop of 99%, not 90%. This just further pushes the importance of the culling method in the later section.

  • @zachcarter1116
    @zachcarter1116 Před 2 lety +268

    I have been watching your grass series and never realized you had less than 1,000 subscribers. You are totally underated! Great stuff!

    • @shebahammy
      @shebahammy Před rokem

      Damn

    • @KYL3R64
      @KYL3R64 Před rokem +5

      watching this 2 months after your comment, acerola now has 35.400 subscribers! :)

    • @TU7OV
      @TU7OV Před 8 měsíci +3

      @@KYL3R64 only a year after sitting at 110k lmao

    • @SkySentry7
      @SkySentry7 Před 7 měsíci +1

      136k @@TU7OV

    • @TU7OV
      @TU7OV Před 7 měsíci

      @@SkySentry7 137!

  • @BRiemann313
    @BRiemann313 Před rokem +103

    Very nice explanation and overall video👌🏻
    Only thing I would like to throw in, is that you should always at least consider using two noises/ sinewaves for the animation of the grass. One for the bigger movement and one that is the kind of detail layer. (With different scroll speeds obviously 😄) This way you don’t have this „on off“ feeling that it does have with only one and gives a way nicer feeling when looking longer at it

    • @Acerola_t
      @Acerola_t  Před rokem +31

      That's a great tip, I'll be sure to do that next time i redo the grass animation

  • @alecmackintosh2734
    @alecmackintosh2734 Před rokem +25

    I imagine using the billboard technique for far away grass would help get grass to appear far away since you won't notice it being a square.

  • @jbird4478
    @jbird4478 Před rokem +52

    That looks really good, and I like that you explain the reasoning instead of just telling people what to do. And on top of that we get a fun presentation style. You deserve way more views with this talent.

  • @jacobusburger
    @jacobusburger Před rokem +30

    Glad to find a fellow grass enjoyer. Excited to see more grass related content soon!

  • @carllowther1460
    @carllowther1460 Před 2 lety +27

    This looks really good! and I'm super excited to see more optimization techniques.

    • @Acerola_t
      @Acerola_t  Před 2 lety +7

      Thanks! Going to be testing several solutions in the next week to get proper area coverage without performance loss.

  • @rockhunterguy
    @rockhunterguy Před rokem +16

    A trick you can do to render the same amount of grass as the 300x300 plane is to replace the high quality grass with the lower quality grass at a distance. Because one of the most notable downsides of using png grass is when you look down, only rendering that grass at a distance makes that impossible to do. :)

  • @BlackMantisRed
    @BlackMantisRed Před rokem +58

    I cannot remember if you did this but to improve performance you could use lower LODs on grass which is further away

    • @Acerola_t
      @Acerola_t  Před rokem +53

      I do that in the next vid yeah, it doesnt actually give much of a performance boost surprisingly.

    • @kgaming7599
      @kgaming7599 Před rokem +6

      @@Acerola_t yes it does

    • @Acerola_t
      @Acerola_t  Před rokem +57

      @@kgaming7599 I literally made it so I know how much of a performance boost it gave

    • @kgaming7599
      @kgaming7599 Před rokem +37

      @@Acerola_t skill issue

    • @toao_rainys
      @toao_rainys Před rokem +15

      @@kgaming7599 ratio + lack of female companions + didn't ask + no one cares

  • @jonilo8792
    @jonilo8792 Před rokem +24

    I'm surprised this channel doesn't have more subscribers. Great content!

  • @msqrt
    @msqrt Před 8 měsíci +3

    An idea that's simpler and typically more performant than the vote+scan thing is to do an arena allocator using atomics. You initialize a global counter to zero, and for every thread that wants to put a grass in you say index = atomicAdd(counter, 1) -- and that's the output index. It does the same operation (well, not exactly since it doesn't preserve thread order). You can optimize this further by using ballot/subgroup-wide scan and only doing one global atomic add per warp/subgroup, and even further by also doing it for multiple elements at a time (so each thread loads and computes the culling for, say, 4 blades, then the subgroup does a scan, local indices are added to the global ones and out comes an index for each blade that wanted one). After all of this it's not really any simpler but it's pretty zoom zoom fast.

  • @Kimeters
    @Kimeters Před rokem +10

    After seeing this I watched a GDC on ghosts of tsushima wind and grass. It would use bezier curves rather than a defined mesh. I believe this has the fault of the arc length being hard to constrain so the grass would shrink and grow as it swayed in the wind, but subtle enough movements make this hard to notice.

  • @lucakassab4745
    @lucakassab4745 Před 2 lety +10

    hey dude great video!, i discovered your channel recently with the grass series, even though i'm a unreal engine developer i find all this stuff pretty intresting! cheers from Brasil!

  • @chimichuflis
    @chimichuflis Před rokem +2

    You definetly need more subs, thank you for the work you made!

  • @Ricky_Lauw
    @Ricky_Lauw Před rokem +11

    There is a great GDC talk on rendering grass in Ghost of Tsushima. That might provide you with some great insights. Also, I think you can get away with optimizing that blade of grass a bit more without losing visual fidelity too much.

  • @radivarig
    @radivarig Před rokem +3

    There's a thing called "Perspective Correction" that I've only seen so far in a Unity asset called "Stylized Grass". It stretches/rotates the grass mesh by some amount relative to the camera angle which camouflages the grass mesh quite well, up to a certain point when it's near perpendicular.

  • @jordonwaters9778
    @jordonwaters9778 Před rokem +4

    You are phenomenal. I would love some more in depth code explanations

  • @mariovelez578
    @mariovelez578 Před 2 lety +1

    Thanks, I learned a lot in this vid, keep up the good work!

  • @maribelmenese4845
    @maribelmenese4845 Před rokem +1

    Dude your seriously underrated
    Keep posting videos I love it a lot

  • @nguyenhoangminhtrung2779

    I can't get enough of your videos!

  • @TheComfy
    @TheComfy Před 2 lety +7

    ok you are so underrated

  • @ucankushincorporations1318

    I knew a youtuber about video game grass was what I needed.
    And now I finally found them.

  • @alyssafaden9443
    @alyssafaden9443 Před rokem +2

    This approach is so kookee ... no one else does it like this (the video, not the programming). At first I was all WHAT THE ACTUAL??? BUT IT IS AWESOME. I love it. so incredibly unique

  • @JohnTTA
    @JohnTTA Před rokem +5

    Learning grass programming in games with some John Lennon looking modafoca. Nice 👌

  • @Povilaz
    @Povilaz Před rokem +1

    Now that looks sick. Awesome job, nice grass.

  • @srqubit9480
    @srqubit9480 Před rokem +8

    I have an idea
    if you take the grass and create a version that is a single triangle
    This would be activated from a certain distance depending on the resolution There would be no way for you to realize that it is of worse quality
    Essentially a LOD system

  • @fr3ddyfr3sh
    @fr3ddyfr3sh Před rokem

    Excellent job sir. Unbelievable how complicated these 3d optimisations are

  • @mil0s251
    @mil0s251 Před rokem

    bro, don't know how did i find your channel, but it's great and it will blow up

  • @_zurr
    @_zurr Před 2 lety +1

    Absolutely rockin those shades man

  • @psuw
    @psuw Před rokem

    awesome stuff

  • @limo_was_here
    @limo_was_here Před rokem

    hey man, i really love that you did this and shared your code to boot. I'm currently busy trying to implement a similar thing within unreal (cause for some reason unreal engine cuts off density of grass using the in-engine available tools at 1000 per 10 m^2. which is not enough to get a similar effect going.) Learning C++ it is. Your code is a really good starting point though, and i'm glad it is there as a reference.

  • @timpani112
    @timpani112 Před rokem

    After looking at a few of your videos about grass in video games, I have to say that I'm deeply impressed by your videos. The delivery and overall presentation works really well, and it makes your videos a really unique watching experience. I'm not surprised to see that this channel is seemingly starting to take off for real, because all it really needs at this point is some luck; the quality of the content is already here.

  • @rodrigo.rebelatto
    @rodrigo.rebelatto Před 9 měsíci +1

    Man... I'm fighting this whole week to make a descent grass in my project. It's funny how something like "oh, all the heavy work is done, let's just put grass here" became a quest through gpu buffers and pipeline shaders... (come on I'm just a programmer...). But your video helped me a lot to understand the dimension of the problem that I'm gettin into :') thanks !

    • @Acerola_t
      @Acerola_t  Před 9 měsíci +1

      foliage is probably top 3 hardest problems in graphics lol

  • @Gilesone1989
    @Gilesone1989 Před rokem +1

    Ok now I have to see the complete serie about grass rendering.

  • @kh_y
    @kh_y Před 2 lety +12

    The frustum culling is really satisfying to look at in the scene view. Have you tried mesh LODs and fog? Looks like you can incur a ton of overlapping triangles at the sheer angles farther away. Anyway, cool video!

    • @Acerola_t
      @Acerola_t  Před 2 lety +2

      mesh LOD is going to be necessary for sure, just not sure how I want to implement it since I'll need to have an extra buffer for LOD grass positions. I'll be doing fog inevitably but I wanted it to be its own video.
      Thank you!

    • @EpicTonyBoi
      @EpicTonyBoi Před rokem

      What if you use the last video's method as a "LOD" type thing since it will look better at further distances and will not have a large performance cost

  • @Gameslinx
    @Gameslinx Před rokem +4

    Instead of using the scan and compact algorithm to copy the culled grass into a new buffer, it might be easier to just use an Append buffer to append the grass that survives the culling to an empty output buffer each frame. This means no scan or compact, however you do need a buffer the size of the worst case scenario which does have a larger memory impact

    • @Acerola_t
      @Acerola_t  Před rokem +1

      Someone else also brought up the append buffer, I'm not sure how I did a month of research and never read about it anywhere. I'm unsure how different the performance would be with an append buffer instead.

    • @Gameslinx
      @Gameslinx Před rokem +1

      @@Acerola_t Same thing happened to me, and I just discovered this short video series after I almost finished my implementation lol. Using an append buffer should improve performance slightly, since you won't need the SAC algorithm to manage culling - just append to your output buffer and pass that to your shader (or however you manage instancing).
      Append buffers require a fixed size, but use a counter to determine how many indices in that buffer are occupied. So, each frame, you set the counter to 0 and let it fill up again. If you had all the grass in view, then zoomed in so the amount of grass that survives culling is smaller than the last frame, there will be data still in that buffer since it was not overwritten (the buffer's counter is smaller). This is fine, and those extra items are not rendered because the instancing shader will only instance objects up to the counter.
      So overall, marginally greater performance, and depending on how you implemented the SAC algorithm, slightly higher memory usage

    • @Gameslinx
      @Gameslinx Před rokem +3

      Secondly, by "chunking" and using separate compute buffers for each chunk, you are increasing the amount of draw calls. On a large terrain with lots of chunks, you start to negate the benefits of instancing.
      Instead of using an append buffer for each chunk, I have a global buffer which holds every object. You can run the culling compute shader on every chunk and append the result into one buffer and send that buffer over to the shader which results in... One draw call :)
      Of course, with a LOT of objects you can fill the buffer, so it's probably more effective to create a list of buffers depending on how many objects can be rendered. For every X amount of chunks, create a new buffer and every subsequent chunk outputs into that one instead. That should minimize draw calls. Of course, more complex, and I don't know how far you're going with this project lol, but if anyone else is reading this it might help :)

  • @Idiot354
    @Idiot354 Před rokem

    underrated chanel ngl

  • @cineblazer
    @cineblazer Před rokem +1

    I didn't think I'd be watching John Lennon teach me about video game grass rendering techniques today, but I'm not mad.

  • @noahharden5894
    @noahharden5894 Před rokem

    I would’ve never expected to see slime in a video about 3d modeling grass but here we are

  • @CausticCatastrophe
    @CausticCatastrophe Před rokem

    i love that you not only present great info more generically, but also point out how youtube style game dev tutorials completely forget to talk about how its not optimal or even how to even approach optimizing.

  • @nickdevprod3667
    @nickdevprod3667 Před 2 lety +1

    underrated as hell

  • @lens3973
    @lens3973 Před rokem +1

    This content is very high quality.

  • @ro-ce8vg
    @ro-ce8vg Před rokem

    i really cant get enough of the grass ive watched this video like 5 times trying to implement my own

  • @TheMaykids
    @TheMaykids Před rokem

    Acerola is so Brazilian nickname. Love it.

  • @radicant7283
    @radicant7283 Před rokem +1

    Subscribe'd. This is the good shit. Actually good, pro level info with no flashy logos or click bait or algo pandering garbage. It's like if Dimitri Martin went into 3d graphics.

  • @luizfernandonoschang8298

    Nice video man!
    I know I'm a year late but, what about combining both techiques, this one and the one from the previous video?
    You could define a distance/radius of view, and everything inside this radius (near the camera) is rendered using the complex grass mesh, while everything outside the radius (far from camera) is rendered using the billboard textures.
    Then, as your player/camera moves the billboard textures get replaced by the meshes. It would work like some kind of custom LOD.

  • @Luna_Kobold
    @Luna_Kobold Před rokem

    those wind sound effects you use give me big naustalgia hits from dark cloud

  • @WinterAodh
    @WinterAodh Před rokem

    Had a project where grass had a centerpiece. Gave up on it so fast because it was just not worth the effort. I'm happy to see that this video just confirms my suspicions back then 🥴

  • @joachim4660
    @joachim4660 Před rokem

    really nice grass

  • @ramonoliveira1036
    @ramonoliveira1036 Před 10 měsíci

    First time I saw your video I thought "WHO IS THIS CLOWN?", but actually it turns out being a video with a funny/oiginal/intentionally cringe format, with very good content. Very nice.

  • @user-fv6vl8ho5s
    @user-fv6vl8ho5s Před 5 měsíci

    awesome

  • @elizabethduckchong
    @elizabethduckchong Před 11 měsíci

    Never thought I'd be lectured on grass by Adrien Brody but here we are

  • @CSPciccionsstibilepippons

    you could use the grass from this video near the player and the grass from the last video as lod.

  • @WKerrick
    @WKerrick Před rokem

    goddamn, that reveal at 6:00 is sick af

  • @remke5137
    @remke5137 Před rokem +1

    Persona 3 music. Very nice

  • @DemonDogAW
    @DemonDogAW Před rokem

    The best tradeoff between performance/fidelity would probably be a blend of basic billboard grass with a small radius of the per-blade rendering.

  • @ElusivePandaMan
    @ElusivePandaMan Před rokem

    you know this guy is sempai when he continually uses persona OST

  • @gustavosantos106
    @gustavosantos106 Před rokem +1

    Next step would be, instead of grass growing homogenously through the ground, make it so every 5 or so grasses share its position and extends in diferent directions forming a bush.
    And then add a static perlin texture to determine parts of the ground with more or less vegetation.

  • @zoa011
    @zoa011 Před 2 lety +1

    i know nothing about most of what your saying but the video was still dope :)

  • @icaroamorim3123
    @icaroamorim3123 Před 10 měsíci

    you could also propagate the index of the visible ones and the total number of visible Blades.Then you could renderer only the visible blades with drawindirect

  • @vaibhavjaiswal799
    @vaibhavjaiswal799 Před rokem +1

    Bro literally i just found your channel and i literally learned more in last 30 mins than past few months. I am a developer mainly work on gameplay elements and AI, still completely noob when gomes to graphic programming. I really like the way you teach everythingand i really wanna learn all these things. Is there any chance that you planned for tutorial series completely from scratch for graphic programming.

    • @Acerola_t
      @Acerola_t  Před rokem +1

      Probably won't do a tutorial series like that, if you're interested in a good "from scratch" tutorial series for Unity shaders then I really recommend Jasper's tutorial series on rendering which goes over recreating Unity's standard built-in uber shader.
      catlikecoding.com/unity/tutorials/rendering/

    • @vaibhavjaiswal799
      @vaibhavjaiswal799 Před rokem

      @@Acerola_t Thanks for this.
      Can you suggest more resources which teach graphic programming from scratch

  • @joziermaster3269
    @joziermaster3269 Před 2 lety +1

    I love these vids. Super informative and the whole stand-up and talk thing is legit lit.....but honestly I think like halfway through you should cut out more of the "you" and show more of the task doing.....just constructive criticism but you straight up lit bro...def got my sub ftw.

  • @AndreInfanteInc
    @AndreInfanteInc Před rokem +1

    I would think the next step is to set up an LOD switch after a few meters where you switch back to rendering the cheaper non-modelled grass.

  • @ethanevans8909
    @ethanevans8909 Před rokem +2

    Monogatari references follow me everywhere, no matter the subject. What a delight

    • @HilbertXVI
      @HilbertXVI Před rokem +1

      Where

    • @ethanevans8909
      @ethanevans8909 Před rokem

      @@HilbertXVI 8:15. Also im pretty sure the channel name (and maybe the intro at 1:07 but that might be stretching)

  • @NoxiusVI
    @NoxiusVI Před rokem +1

    "maybe i could eat blades of grass"
    -bill wurtz

  • @f11bot
    @f11bot Před rokem +1

    🤯

  • @untitledisdead
    @untitledisdead Před 3 měsíci

    could do a series of lower LOD blades using lower vertices dependent on distance to camera. The reason I say a series of rather than just having the lowest model at a further distance i think it would save comp cost by transitioning to lower details sooner yet more subtly like a gradient if that makes sense.

  • @Paledomain
    @Paledomain Před rokem +1

    what if you introduced distance based detail culling like you mentioned in the previous grass video, make the closer grass bits these new 3d ones, and the ones beyond the culling range billboard grass?

  • @Fabio-zc7bs
    @Fabio-zc7bs Před rokem

    Wouldn't this be more useful if we combined both techniques? I mean, you can still use billboards at distance as an LOD to save performance. Generally, I prefer to use only billboards but it comes with a cost. Overdraw
    I use unreal so the engine does part of the job like the culling by itself. What I generally do is to use a more dense billboard when the camera is close (like 4 to 5 planes with 2 or 3 loopcuts on it so it can bend with the wind) but as it goes further away I reduce the number of planes and loopcuts on the mesh. This way, you can bend the mesh by default on your 3d modelling tool so it doesn't look too straight when looking from above. The only thing that kinda remains a problem in this case is the overdraw as I said. But you can solve it by making a texture that covers most part of the mesh (or the oposite).

  • @fangliu125
    @fangliu125 Před 11 měsíci +3

    Thank you for an awesome video! But I found a bug about scan prefix calculation. At 8:56s, the scan array should be 0,0,1,2,2. This troubled me for a long time before I realized it was a small mistake in your video.

    • @Acerola_t
      @Acerola_t  Před 11 měsíci +4

      oops! Yeah these older vids i edited in one or two nights so some errors have slipped in.

  • @mckaygrange9053
    @mckaygrange9053 Před rokem +1

    why is john lennon teaching me about graphics processing

  • @Onaterdem
    @Onaterdem Před 9 měsíci

    The Huniepop soundtrack RULES

  • @Benjo69420lelol
    @Benjo69420lelol Před 3 měsíci +1

    my brother in Christ looks like AJ Jackson, the band leader of Saint Motel

  • @nyatalia
    @nyatalia Před 9 měsíci

    That vote-totalling culling method clicked like 0.5s after the end of the video, makes me feel like maybe I'm not a total fraud lol

  • @idkidk9204
    @idkidk9204 Před rokem +1

    Peak nerd programmer right there, good content

  • @theman7050
    @theman7050 Před 15 dny

    I would totally appreciate for you telling me how those 'marble' like textures at around 5:15 were formed by adding noise to those sin waves.
    Imho, The swirls are not possible with just the basic random hash function, yes? So something like perlin noise was used by you?
    Thanks and I love your content, man!!

  • @stuwustudio
    @stuwustudio Před 2 lety +2

    "If you look down on it from above, it's clearly just some squares."
    -> Finds a new way to render the grass
    -> Doesn't show the new result
    Nah I'm just joking, I know it looks ok-ish from the top because that's exaclty what I've done for my game lol.
    Btw let me know if you ever figure out how to make this grass run even faster. I'm planning to quadruple my map size in my new version, and I don't think It'll hold if I put anymore grass blades on the scene. I'm also starting to hit the memory limit with all these blades.

    • @Acerola_t
      @Acerola_t  Před 2 lety

      Haha when I was editing I realized I never showed the top down result, I can assure you it looks like the game Flower now since the base terrain blends with the AO color of the grass.
      My current plan to get it to run as fast as possible while covering an arbitrary area of terrain is with chunking and LOD, there is going to be a major memory cost to it but I calculated it out and the grass in this project only uses a few megabytes of data, this could also be optimized heavily with bitpacking and moving some calculations over to the shader. The scan buffers can be reused so each individual chunk of grass doesn't need its own scan buffers I think. Either way I'll figure it out by the time the next video comes out a week and a half from now.
      Thanks for watching!

    • @stuwustudio
      @stuwustudio Před 2 lety +1

      @@Acerola_t That's cool, I might be able to implement what you did in my own game if you succeed!

  • @bananaboy482
    @bananaboy482 Před 8 měsíci

    I would love to see a video where you do Fortnite style grass. Theirs is REALLY fast and all the animation is done in the texture itself based on wind speed. Cool stuff

  • @SkeleTonHammer
    @SkeleTonHammer Před rokem

    Since you're looking at the grass at about eye height in-game, the further out you go, the more you're looking at the distance at grazing angles (and taking up less overall proportion of the screen space).
    Because of this, grass becomes increasingly obscured by other grass as it becomes more distant, and therefore in all likelihood you could get away with reducing the density of the grass gradually as it becomes further from the camera with very little noticeable difference but potentially a huge performance boost.

    • @Acerola_t
      @Acerola_t  Před rokem

      It's hard to do that since the grass positions are pre-computed and not generated in real time.

    • @SkeleTonHammer
      @SkeleTonHammer Před rokem

      @@Acerola_t I will say as a 36 year-old 15+ year game dev Old Person, there are a few ways to accomplish this. I believe in you. ;)

  • @duke.
    @duke. Před rokem +3

    why is he john lennon

  • @dimensional7915
    @dimensional7915 Před rokem +1

    Guess I'm gonna go learn like 6 more levels of math then come back here later

  • @whydoineedausername1386
    @whydoineedausername1386 Před 5 měsíci

    >So how do we fix this?
    By using the expensive method up close and the cheap one farther away?

  • @LordYvain
    @LordYvain Před 5 měsíci

    You should take a loot at ghost of tsushima's grass

  • @abulak3477
    @abulak3477 Před 2 lety +1

    9:25 what is the difference between yours and *occlusion culling* ? does it perform better??

    • @Acerola_t
      @Acerola_t  Před 2 lety

      This implementation doesn't support occlusion culling, that's another thing that would have to be implemented manually with compute shaders. As far as I'm aware, in order to support occlusion culling you would also have to sort the position buffers each frame and that might be too costly.
      As for what the difference is, occlusion culling is when you don't render objects that are obscured by other objects in view. Frustum culling is when you don't render objects that are outside the camera view. Ideally you would have both.

  • @JG-nm9zk
    @JG-nm9zk Před rokem +3

    Why use Maya when you can use blender?
    You could have shown the grass from above to show how it compares with the bilboarded grass. Anyways great!

  • @JoeEnderman
    @JoeEnderman Před rokem +2

    Is there a way to decrease the amount of grass the further from the camera it is? Is there a way to render simpler grass when it is only a few pixels tall?

    • @Acerola_t
      @Acerola_t  Před rokem +1

      Yeah you could do that

    • @JoeEnderman
      @JoeEnderman Před rokem +1

      @@Acerola_t It would be tricky to implement, but could save on system resources in some scenarios.

  • @isaacbunsen5833
    @isaacbunsen5833 Před rokem

    How would you make a hybrid approach, or add more weed variety?

    • @Acerola_t
      @Acerola_t  Před rokem

      You'd have to decompose the position buffer into a variety of buffers that all contain positions for different types of foliage.

  • @thebutterflyking
    @thebutterflyking Před 4 měsíci

    "How do we fix this, well, with doctor thesis level algorithms of course" sent me 🤣🤣🤣😂😂😂🤣

  • @SkylerLinux
    @SkylerLinux Před rokem +1

    It's still pretty

  • @cvspvr
    @cvspvr Před 9 měsíci

    this might be a waste of time, but since the grass is so uniform (it's pretty much just a grid), you might be able to use the gpu to sort the individual blades in a way to reduce overdraw, and if that's too slow, you could instead rotate each tile of grass (by multiples of 90 degrees) so that the first triangles are always closer to the camera, then pull the actual blade positions from a texture. also, octagedral billboards are cool as fuck. they're like the flat billboards, but 3d

  • @chilli1472
    @chilli1472 Před rokem +1

    yo what kind of glasses are that? they're super badass

    • @Acerola_t
      @Acerola_t  Před rokem

      lmao they're random circular glasses off amazon for like $15

    • @chilli1472
      @chilli1472 Před rokem +1

      @@Acerola_t smart, don't fall for the designer scams

  • @JoJoboiWav
    @JoJoboiWav Před 2 lety +1

    Acerola Orion Heart Underblade

  • @krocodile55
    @krocodile55 Před 10 měsíci

    I actually like the billboard grass better stylistically. The only problem would be figuring out how to get it to work when you face down.

  • @OTadashi162
    @OTadashi162 Před rokem +1

    I didn't understand shit, but looks smart

  • @renatocesar9972
    @renatocesar9972 Před rokem +1

    Nice video, i wish he had more content in shaders and stuff like this. A hint for you, try to not cut your head out of the frame.

    • @Acerola_t
      @Acerola_t  Před rokem

      Yeah I didnt have the chance to re record so i just went with it lol

  • @INeatFreak
    @INeatFreak Před 2 lety +1

    9:43 Can we get higher resolution of this image? Thank you.

  • @maxximumb
    @maxximumb Před rokem +2

    I was just wondering why you chose Maya instead of Blender that doesn't require you to fib a little?

    • @Acerola_t
      @Acerola_t  Před rokem +1

      Cause Maya is industry standard there's really no other reason. I use blender too when I feel like it.

  • @leeow3n
    @leeow3n Před rokem

    how dare you not do a top down view of your new grass