Can we just appreciate how the real life world just instantiates infinite grass every frame
@cvspvr Жыл бұрын
touch grass
@lih3391 Жыл бұрын
It runs all of quantum mechanics and relativity too!
@tonyhakston536 Жыл бұрын
@@lih3391relativity is just lag, come on now.
@samuunn Жыл бұрын
@@cvspvr it would have to calculate the physics and my hand collision (100% accurate) so idk it's too much power
@abdou.the.heretic Жыл бұрын
@@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
@swizzler2 жыл бұрын
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
@bbuskabuske2 жыл бұрын
wait then how does each grass bend tho if they don't have any vertice to manipulate in between
@srqubit94802 жыл бұрын
@@bbuskabuske I guess they use shaders similar to gta, moves the bushes Using a 2d fisheye filter
@KingBobXVI2 жыл бұрын
@@srqubit9480 - That, or the grass on the billboard is actually procedurally animated within its "texture"?
@srqubit94802 жыл бұрын
@@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
@Person5385-w4s2 жыл бұрын
May I ask where you got this information? I would really move to read about how Breath of the Wild’s grass works!
@zachcarter11162 жыл бұрын
I have been watching your grass series and never realized you had less than 1,000 subscribers. You are totally underated! Great stuff!
@shebahammy2 жыл бұрын
Damn
@KYL3R642 жыл бұрын
watching this 2 months after your comment, acerola now has 35.400 subscribers! :)
@TU7OV Жыл бұрын
@@KYL3R64 only a year after sitting at 110k lmao
@perelium-x Жыл бұрын
136k @@TU7OV
@TU7OV Жыл бұрын
@@perelium-x 137!
@jacobusburger2 жыл бұрын
Glad to find a fellow grass enjoyer. Excited to see more grass related content soon!
@spore1242 жыл бұрын
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.
@carl146023 жыл бұрын
This looks really good! and I'm super excited to see more optimization techniques.
@Acerola_t3 жыл бұрын
Thanks! Going to be testing several solutions in the next week to get proper area coverage without performance loss.
@BRiemann3132 жыл бұрын
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_t2 жыл бұрын
That's a great tip, I'll be sure to do that next time i redo the grass animation
@jonilo87922 жыл бұрын
I'm surprised this channel doesn't have more subscribers. Great content!
@alecmackintosh27342 жыл бұрын
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.
@msqrt Жыл бұрын
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.
@lucakassab47452 жыл бұрын
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!
@ucankushincorporations13182 жыл бұрын
I knew a youtuber about video game grass was what I needed. And now I finally found them.
@alyssafaden94432 жыл бұрын
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
@rockhunterguy2 жыл бұрын
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. :)
@chimichuflis2 жыл бұрын
You definetly need more subs, thank you for the work you made!
@BlackMantisRed2 жыл бұрын
I cannot remember if you did this but to improve performance you could use lower LODs on grass which is further away
@Acerola_t2 жыл бұрын
I do that in the next vid yeah, it doesnt actually give much of a performance boost surprisingly.
@kgaming75992 жыл бұрын
@@Acerola_t yes it does
@Acerola_t2 жыл бұрын
@@kgaming7599 I literally made it so I know how much of a performance boost it gave
@kgaming75992 жыл бұрын
@@Acerola_t skill issue
@toao_rainys2 жыл бұрын
@@kgaming7599 ratio + lack of female companions + didn't ask + no one cares
@Kimeters2 жыл бұрын
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.
@jordonwaters97782 жыл бұрын
You are phenomenal. I would love some more in depth code explanations
@radivarig2 жыл бұрын
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.
@Acerola_t2 жыл бұрын
That's called parallax
@maribelmenese48452 жыл бұрын
Dude your seriously underrated Keep posting videos I love it a lot
@Ricky_Lauw2 жыл бұрын
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.
@kh_y3 жыл бұрын
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_t3 жыл бұрын
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!
@EpicTonyBoi2 жыл бұрын
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
@mil0s2512 жыл бұрын
bro, don't know how did i find your channel, but it's great and it will blow up
@Gameslinx2 жыл бұрын
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_t2 жыл бұрын
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.
@Gameslinx2 жыл бұрын
@@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
@Gameslinx2 жыл бұрын
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 :)
@ComfieDev3 жыл бұрын
ok you are so underrated
@Acerola_t3 жыл бұрын
B)
@CausticCatastrophe2 жыл бұрын
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.
@Povilaz2 жыл бұрын
Now that looks sick. Awesome job, nice grass.
@JohnTTA2 жыл бұрын
Learning grass programming in games with some John Lennon looking modafoca. Nice 👌
@fr3ddyfr3sh2 жыл бұрын
Excellent job sir. Unbelievable how complicated these 3d optimisations are
@Gilesone19892 жыл бұрын
Ok now I have to see the complete serie about grass rendering.
@_zurr2 жыл бұрын
Absolutely rockin those shades man
@rodrigo.rebelatto Жыл бұрын
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 Жыл бұрын
foliage is probably top 3 hardest problems in graphics lol
@timpani1122 жыл бұрын
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.
@Acerola_t2 жыл бұрын
Thanks!
@noahharden58942 жыл бұрын
I would’ve never expected to see slime in a video about 3d modeling grass but here we are
@limo_was_here2 жыл бұрын
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.
@cineblazer Жыл бұрын
I didn't think I'd be watching John Lennon teach me about video game grass rendering techniques today, but I'm not mad.
@mariovelez5782 жыл бұрын
Thanks, I learned a lot in this vid, keep up the good work!
@srqubit94802 жыл бұрын
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
@ramonoliveira1036 Жыл бұрын
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.
@duke.2 жыл бұрын
why is he john lennon
@ro-ce8vg2 жыл бұрын
i really cant get enough of the grass ive watched this video like 5 times trying to implement my own
@nguyenhoangminhtrung27792 жыл бұрын
I can't get enough of your videos!
@Blurgert4 ай бұрын
1:40 Pro tip: B L E N D E R
@icaroamorim3123 Жыл бұрын
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
@nickdevprod36672 жыл бұрын
underrated as hell
@fangliu125 Жыл бұрын
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 Жыл бұрын
oops! Yeah these older vids i edited in one or two nights so some errors have slipped in.
@WinterAodh2 жыл бұрын
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 🥴
@TheMaykids2 жыл бұрын
Acerola is so Brazilian nickname. Love it.
@lens39732 жыл бұрын
This content is very high quality.
@Luna_Kobold Жыл бұрын
those wind sound effects you use give me big naustalgia hits from dark cloud
@luizfernandonoschang82982 жыл бұрын
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.
@WKerrick2 жыл бұрын
goddamn, that reveal at 6:00 is sick af
@vaibhavjaiswal7992 жыл бұрын
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_t2 жыл бұрын
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/
@vaibhavjaiswal7992 жыл бұрын
@@Acerola_t Thanks for this. Can you suggest more resources which teach graphic programming from scratch
@gustavosantos1062 жыл бұрын
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.
@radicant72832 жыл бұрын
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.
@DemonDogAW2 жыл бұрын
The best tradeoff between performance/fidelity would probably be a blend of basic billboard grass with a small radius of the per-blade rendering.
@CSPciccionsstibilepippons2 жыл бұрын
you could use the grass from this video near the player and the grass from the last video as lod.
@ethanevans89092 жыл бұрын
Monogatari references follow me everywhere, no matter the subject. What a delight
@HilbertXVI2 жыл бұрын
Where
@ethanevans89092 жыл бұрын
@@HilbertXVI 8:15. Also im pretty sure the channel name (and maybe the intro at 1:07 but that might be stretching)
@elizabethduckchong Жыл бұрын
Never thought I'd be lectured on grass by Adrien Brody but here we are
@theman70507 ай бұрын
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!!
@illusionsofnothing10 ай бұрын
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.
@AndreInfanteInc2 жыл бұрын
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.
@SkeleTonHammer2 жыл бұрын
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_t2 жыл бұрын
It's hard to do that since the grass positions are pre-computed and not generated in real time.
@SkeleTonHammer2 жыл бұрын
@@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. ;)
@zoa0113 жыл бұрын
i know nothing about most of what your saying but the video was still dope :)
@Acerola_t3 жыл бұрын
Thanks!
@remke51372 жыл бұрын
Persona 3 music. Very nice
@ElusivePandaMan2 жыл бұрын
you know this guy is sempai when he continually uses persona OST
@mckaygrange9053 Жыл бұрын
why is john lennon teaching me about graphics processing
@joziermaster32692 жыл бұрын
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.
@NoxiusVI2 жыл бұрын
"maybe i could eat blades of grass" -bill wurtz
@stuwustudio3 жыл бұрын
"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_t3 жыл бұрын
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!
@stuwustudio3 жыл бұрын
@@Acerola_t That's cool, I might be able to implement what you did in my own game if you succeed!
@Fabio-zc7bs2 жыл бұрын
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).
@Paledomain2 жыл бұрын
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?
@psuw2 жыл бұрын
awesome stuff
@abulak34772 жыл бұрын
9:25 what is the difference between yours and *occlusion culling* ? does it perform better??
@Acerola_t2 жыл бұрын
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.
@JoeEnderman2 жыл бұрын
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_t2 жыл бұрын
Yeah you could do that
@JoeEnderman2 жыл бұрын
@@Acerola_t It would be tricky to implement, but could save on system resources in some scenarios.
@whydoineedausername1386 Жыл бұрын
>So how do we fix this? By using the expensive method up close and the cheap one farther away?
@bananaboy482 Жыл бұрын
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
@joachim46602 жыл бұрын
really nice grass
@chilli14722 жыл бұрын
yo what kind of glasses are that? they're super badass
@Acerola_t2 жыл бұрын
lmao they're random circular glasses off amazon for like $15
@chilli14722 жыл бұрын
@@Acerola_t smart, don't fall for the designer scams
@KingBobXVI2 жыл бұрын
Looking at the source for the scan/compact method, I really like the elegance of the solution, but not sure if I completely understand it, so let me explain it and tell me if I'm wrong, lol: First pass is simple, just create the true/false buffer with 1's and 0's using the GPU, one value for each grass position. Second pass, I think your visual is incorrect. The value of each position should be the sum of the values in the first pass up to that index in the buffer, so with a T/F buffer of: [0, 1, 1, 0, 1] the scan buffer should be: [0, 0, 1, 2, 2] rather than [0, 0, 1, 1, 2], which I think you just took from the notes (for a different input). Each index counts the number of T values in the T/F buffer before the current index. Third pass uses the first and second buffers to determine what values to copy and where, with logic that can be run in parallel thanks to that data, simply: if (tf_buffer[i] == 0) return; else { compact_index = scan_buffer[i]; compact_positions[compact_index] = position[i]; } What I don't quite get still is in step two, is the scan done on the CPU or the GPU? Because it seems like the most efficient way to do it would be to iterate through the T/F array and do something like "scan_buffer[i] = counter; if (tf_buffer[i]) ++counter;" but it _sounds_ like it's trying to do everything on the GPU in parallel, but that would mean that for each calculation in the scan_buffer it would have to iterate from [0 -> n) on the tf_buffer, which would be incredibly slow for later elements, especially with millions of grass blades. But to do the scan on the CPU it would first have to copy the TF buffer into CPU memory, and then the resulting scan buffer back into GPU memory, which maybe isn't really much of a problem? I supposed I could actually look at your code but that would be effort.
@Acerola_t2 жыл бұрын
You are correct my example output for the scan was wrong. This is all done on the gpu, the vote/scan/compact is all done in parallel with optimal thread groups to distribute up the work accordingly. In order to do the scan on the cpu it would require copying all the memory back to the cpu as you said, which would defeat the point of the compute shader culling. Parallel prefix scan is a tough problem and a lot of work has gone into optimizing it which is funny cause it's extremely trivial to do on the cpu.
@KingBobXVI2 жыл бұрын
@@Acerola_t - where in your code is the prefix scan actually happening? I did end up taking a look but can't find anything that looks like the scan/compact logic in the compute shader code. I'd like to see how it's actually being done because I still don't really see how it's getting calculated in parallel, haha.
@@Acerola_t - Oh, the first file in the directory - I'll maintain that it didn't exist and you snuck it in there, editing git's history :P Thanks for the link! e: wow, this makes very little sense, lol - looks like I'll be taking a look at GPU Gems.
@nyatalia Жыл бұрын
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
@bdenix19972 жыл бұрын
Hey acerola. i dont want everywhere to be grassy. i want some paths etc. using a heightmap, lets say if the grayscale of the pixel is more than .5 . in that case i can just alter the height or the whole position for that id, of the buffer right? that moves that grass outta way right? yeah. but it still renders it on that position. i made like if its not gonna be spawned, i set the position to 0,0,0. doing this ended up, every unwanted grass to pile up on 1 coordinate, and if you look at it, it lags. like fps goes down to 0. so i kind of tried to make a uint buffer that is the last id of the last ok position, then i would just increment that id if its a successful spawn, then i would use that lastID, instead of doing id.y * radius + id.x you know. was a nice idea at first. set the buffer 0 from the start, incremented it every kernel execution, then i did getdata on C# . when i output the id thing, it is always different by a little bit. i dont know what causes this. and i'm searching for an exact number of the successful tries. so that maybe i can manage to not render those unwanted grass.
@bdenix19972 жыл бұрын
and if i use that id as an index to the buffer, i get incredibly low amound of grass. definetely something is not right there. the output number is very low too.
@Acerola_t2 жыл бұрын
You can make a texture that acts as a mask during position generation. Sample the mask texture and if it's white or whatever then keep the position otherwise discard it. It's not a very simple problem though and you'll end up with a lot of wasted memory if you aren't careful about it.
@bdenix19972 жыл бұрын
@@Acerola_t just learned that there was an append type of compute buffer which you can append to the buffer. its just what i wanted.
@JG-nm9zk2 жыл бұрын
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!
@maxximumb2 жыл бұрын
I was just wondering why you chose Maya instead of Blender that doesn't require you to fib a little?
@Acerola_t2 жыл бұрын
Cause Maya is industry standard there's really no other reason. I use blender too when I feel like it.
@krocodile55 Жыл бұрын
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.
@cvspvr Жыл бұрын
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
@idkidk92042 жыл бұрын
Peak nerd programmer right there, good content
@f11bot2 жыл бұрын
🤯
@deltanine15916 ай бұрын
Awesome
@isaacbunsen58332 жыл бұрын
How would you make a hybrid approach, or add more weed variety?
@Acerola_t2 жыл бұрын
You'd have to decompose the position buffer into a variety of buffers that all contain positions for different types of foliage.
@renatocesar99722 жыл бұрын
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_t2 жыл бұрын
Yeah I didnt have the chance to re record so i just went with it lol
@保护大自然我们 Жыл бұрын
awesome
@JoJoboiWav2 жыл бұрын
Acerola Orion Heart Underblade
@Acerola_t2 жыл бұрын
That is where the name comes from ye
@JoJoboiWav2 жыл бұрын
@@Acerola_t W
@Peter-qn7qx2 жыл бұрын
how can i create a heightmap complatible with this? thx
@Acerola_t2 жыл бұрын
idk look into fractional brownian motion for terrain height map generation
@Peter-qn7qx2 жыл бұрын
But when i tried usind a “traditional” black and white height map, it didnt work. What do you store in the r g b chanels? Do i have to use them?
@Peter-qn7qx2 жыл бұрын
@@Acerola_t Thank you for creating this masterpiece and also for always responding so quick! I love your work!
@Acerola_t2 жыл бұрын
@@Peter-qn7qx I store the displacement in the alpha iirc, the rgb is for the normal vector.
@Peter-qn7qx2 жыл бұрын
@@Acerola_t ty
@LordYvain Жыл бұрын
You should take a loot at ghost of tsushima's grass
@thebutterflyking11 ай бұрын
"How do we fix this, well, with doctor thesis level algorithms of course" sent me 🤣🤣🤣😂😂😂🤣
@flashgames12732 жыл бұрын
what if you make it lower resolution further back? some kind of grass LOD?!
@Acerola_t2 жыл бұрын
yep i do that in the next vid
@boggo3848 Жыл бұрын
I'm surprised frustum culling every single blade of grass on the CPU every frame in one big linear scan didn't actually make it more expensive.
@Acerola_t Жыл бұрын
on the GPU not on the CPU lol if I was processing millions of objects on the cpu each frame there would be less than zero frames a second
@Onaterdem Жыл бұрын
The Huniepop soundtrack RULES
@OctagonalSquare2 жыл бұрын
Yeah gonna have to cull based on distance probably. That way you’re only rendering up to like 30 units away