how this game renders millions of blades of grass
HTML-код
- Опубликовано: 23 ноя 2024
- Learn how to make beautiful trees, fluffy grass, and sweeping landscapes with my brand new Unreal Engine for Beginners course: bit.ly/3k5xCNH
Patreon: / stylizedstation
Learn how to make fluffy, anime style grass in Unreal Engine with my Anime Environment Art course: bit.ly/3k5xCNH
Ugg lee is coming from China t tell you personally that anime is ugly
And I agree with him
Are you a programmer? Because if you are, I would love to see you remake simple versions of these optimization tricks
Wow! You are a genius.
i have a question regarding this course, will we be able to contact you for guidance or help if we get stuck?
Are the lessons compatible with Unreal Engine 5 and Blender 3.5?
For a deeper explanation in relation to Breath of the Wild's grass, the grass blades closest to the player (within about 10m) are gpu instanced polygons which are there in order to react and displace relative to the player and objects, wind simulation, fire and other environmental factors. This grass pops into view blade by blade as the player moves, with higher density of blades closer to the player/camera.
Beyond that range (up to about 20m) are unreactive billboarded 2D grass doubles, which blend between the nearby grass blades and the distant field texture. These help to keep the illusion of density further from the camera, and you can sometimes see them mixed in with the reactive grass.
Both of these types of grass are coloured in such a way that they blend closely into the ground texture so as to hide any unpopulated areas of the screen, and to smooth the transition between the different levels of detail.
thanks for this. I was expecting more of an explanation surrounding BOTW's grass from the video, but instead got a general explanation, which isn't bad.
Botws grass is so fucking awesome I never thought I'd think that about grass in video games being awesome but it's great I mean you can cut it burn it bathe in it, it's great
I'm also not sure about grass being completely static in the distance because you can shoot a fire arrow into the distance and the grass will catch on fire and move in the wind like it does up close
@@repingers9777 could be an animated flat texture
@@quiploo probably, also something weird about botw is it has 3 lod levels for details on the ground like small pebbles or leafs that only show on the bottom quarter of the screen or really zoomed in as link walks leads and extra detail will appear right Infront of where link is in the world
Wow, it felt like 20 minutes, in a good way. You managed to condense a LOT in a 5 minute video, thx for appreciating my time!
it doesn’t feel like 20 minutes if you know what he’s talking about
I know right the amount of information he discussed was a lot in a small video so it felt long yet short haha
... wait what? That wasn't a 20 minute episode
OH WOW
Culling is also why wide screen hacks for some older games aren't always recommended. Most of the time it will only be small objects though like lamp posts and trees
If you can disable culling it'll be fine though :)
The only problems I've encountered is cut off viemodels. Parts of the hands or gun missing
@TheWankerPc4ever Fair, most older games do a good job but you there's a good few you can see some funky stuff on the edges
Isn’t it amazing how Nintendo did this on the Switch and not only made an amazing looking game; but, one that is actually fun to play.
They can squeeze everything out of the switch and I love it
_those new pokemons don‘t count_
Nintend o making fun games isn’t new, it botw was so boring for me, I ended up jumping from a high tower for 2 hours to see the funny ragdollls and then I got bored (I tried playing normally, wasn’t fun either so that’s how I ended up jumping from towers)
@@Skikopl Sadly Nintendo doesn’t make the main Pokémon games, Game Freak does. It would be amazing if they didn’t have 3 year development cycles for such huge games :(
@@Skikopl I’m sorry, but like, have you even played them? I see a lot of people who have never played them shit on them despite never even touching the game. I personally think the glitches are few and far between and the only problems are minor frame rate drops and minor visual glitches. If you HAVE played the games and dislike them anyways that is completely your opinion to make, but if you haven’t don’t assume just based on what other people say.
@@NCSGaming15 I haven’t played them but I agree, it seems like everyone is just piling on lol
and then there is skyrim players who spend 8 hours generating LODs to make sure that the grass on the other side of the map has proper lighting
exactlty 💀
me.
People just want to make them game better Bethesda on the other hand
@@eee1200 that would do neither. Grass already shouldn't be too dense in poly's. Also any modern modeling tools, with proper uv mapping and edge connections, can make quick work of detailed models. Not that that's how grass should be modeled anyways.
As someone who hasn't touched grass in a long time, I appreciated this.
Fun fact: LODS has been used since a pretty long time, in Mario 64 it occurs as well, if you move the camera far from Mario he switched to a low poly model, also happens in Ocarina of Time
LODs have definitely only been useful recently now that we have so much ram and CPU to work with. For Mario 64 even, it would have been better not to do LODs since the processing to change the model is more than it took to just render the whole thing.
LOD are actually used as far back as 91 with titles like The Killing Cloud, being a proven technology on PC to optimize runtime rendering costs. Something important to consoles coming up to compete in the 3D landscape, given the generally slower hardware they were built from, they needed that edge to be a standard in their design. Mario 64 actually benefitted a good bit because of that, much like Crash Bandicoot, by leveraging a lot of LOF and occlusion culling to closely manage how much was being pushed through the render pipeline at any given time. Changing the model actually cost very little with Mario's LOD being a small element held in the memory buffer.
@@BlueMoon1890 No.
LODs have been around and useful for decades.
They've been a staple of games.
BotW is so impressive! Thanks for sharing a bit about the way they handle all that green stuff.
WAIT ITS THE BREAD PIRATE!!
The lower detail of painting depending on lighting and distance is also a good way of contrasting and directing the viewers eye to the focal points of the composition. The same philosophy can be applied to video games!
im not into game developing but still watch these till the end, you explain in a very engaging manner.
The fact that people are angry about the joke in the beginning is much funnier than the joke itself
Fr
This is such a good recap of many videos by Stylized Station combined. Thanks for always creating such good content, man!!
one more technique is that artist would make the world purposefully in a way that he can hide most of the grass to save performance like add a house in the middle, uneven terrain, a large rock or cliff, water body, wtc... also it even feels natural and organic.
The first time I remember seeing dense grass in a game was as a kid at a Gamecube kiosk at BestBuy. I _think_ it was a Transformers game? I just remember being some kind of blue vehicle in a forest and that the dense grass all around me blew my tiny little mind compared to the flat ground with a grass texture on it that I had always seen in games before. Does anyone else remember that game or know what it was called?
1:05 as a 3 year Unity game developer... I had no idea these were two different things, Unity's occlusion culling also works as frustum culling lol
I think unity occlusion culling only removes the mesh filter and renderer
as a game dev, i make a big baseplate full of lines which are green(use animations too sometimes on them) then just add that multiple times
When I see the number of upset comments about the Genshin Impact joke I despair about humanity
That "Genshin Impact Clone" joke had me dead laughing
I thought he was serious so it I got triggered.
@@Wizardof52 same lol
Would be nice if you could also cover why vegetation in games is usually pointing perpendicular to the surface it's placed on rather than straight up, like it should in most instances. I have my own theories to why that is, but i'd like to see some examples of it being done properly if you can think of any.
fun fact, for the unity game engine: grass and other small details on the terrain WHERE/ARE pointing straight up (the feature to bend them to align with the terrain surface was only recently added).
If you have some bush it has a "pivot point" somewhere, usually at the bottom where the bush meets the ground. If the bush stick straight up you might find that a few of it's branches and twigs are now floating in the air, because the model was made like it would stay on a flat surface. So instead stuff is aligned with the surface, so you don't have them floating.
In reality though, you'd have plants bent towards light as they grow, regardless of their surface. But that would require way more models and work from level designers OR a fully dynamic approach, which would prevent things like GPU instancing.
@@Soraphis91 could handle directional growth in shaders.
In most cases, not each blade of grass is its own model.(which you know, but for other readers sake, I will include full detail, to add to what you have said) Grass is often simplified in computation by having multiple blades in one 3D model, as a patch of grass. Placing this patch of grass on a slope would mean A: for the grass to point straight up would mean the whole patch has to point up, causing the sides to hang over mid air. Or B: the patch matches the slopes angle, causing the blades to be angled too.
But in shaders, you can rotate the blades of grass with some slick math. With shader magic the possibilities become endless. Between shader math which makes the grass move when the player steps over it, or even make plants actually follow sunlight in real-time.
lmao hilarious opening, would subscribe
This is literally the explanation I was looking for for ages.
I hate to poke holes in something that doesn’t matter but you usually start with the background and work you way forward in landscape painting lol
"I love some sweet sweet grass"
Be careful, the moderators might find you 😂
I can say after watching most of stylized station's videos I am something of a game dev my self
Touching grass isn't enough, I need to know how is rendered in videogames
Was eager to dumb down the video when you called BOTW a Gen shin Impact "clone". But the video was really well laid out when talking about fundamentals and engineer techniques used for games.
Awesome video!
If you talk about LODs, I hope you cover how UE 5 works with ITS massive detailed landscapes.
Also a basic example of an early LOD change was Mario 64, that Mario’s model would be swapped out for a low poly one when the camera was far
afaik the notions of LOD is removed with the introduction of nanite ?
@@YIENDEEN Manually making them is not needed for nanite. But we still don't know how it works, we just know it doesn't render sub pixel details that can't be seen, and it seems to be an evolution to meshlets.
@@buffaloSoldier519 there's actually a talk on how nanite works somewhere on RUclips. I don't have the link at hand, but should be fairly easy to find and it's very informative. It's actually from the Unreal team themselves.
There is another method called impostors optimization, that are very similar to lods. And is like scanning (taking pictures from many angles) every asset and then render those images in a low poly mesh.
He mentioned billboards
@@syluxdev yeah but impostors are more complex than that
Sus imposter
@@chikiscc1 so basically billboards but they work like the player "models" in mk64
So baked textures?
0:00 how to trigger nintendo fans with one sentence
I am very interested in a video talking about GPU Instancing being used to render crowds with different behaviours and animations x.x
The entire physics in BOTW is mind-blowing considering that it's all running on essentially an underpowered mobile GPU from 2015. The grass especially still impresses me even to this day.
Technically it runs on an underpowered GPU from 2009 😜 Cause it was developed as a Wii U game and then ported to Switch, and there’s basically no difference between the two versions
@@nreilly5901 2008*
That first sentence was bold
that was 5 minutes about "How do graphic engineers touch grass".
but seriously they are the reason we can walk into a field and not crash the game so thank you graphic engineers.
A classy way of watching grass grow
Bro started and chose war 💀💀
That first sentence joke was so good it triggered me. I had to pause to take a deep breath
But can the grass be touched?
I think the one element you missed is how Breath of the Wild saves performance by not creating alpha texture grass clusters and instead uses only polygons for the grass shape of individual blades. Otherwise great video!
That doesn't sound right. individual blades as a polygon(s) would be more to render vs glass clusters where you can have multiple blades on a single polygon pane. I guess if that's true it makes sense why the grass density is so low.
The game isn't really a good example of grass done well. Its render distance is very short, and density is very low. Ghosts of Tsusima and Crysis 3 had much better, dynamic, fuller, bigger render distance grass.
@@thepunisherxxx6804 My understanding is that alpha textures are just really expensive. Ghost of Tsushima does the same thing as far as I can tell, specifically because its more efficient than clusters with alpha textures, I watched their GDC talk on that. There's also a series of videos by Acerola on video game grass that demonstrates how BOTW does its grass and how to replicate it in Unity.
@ heh cool
just reminding ya we still haven't got that jiggle physics video yet... you know, just sayinn--
Sea of thieves has some pretty overzealous occlusion culling. You can see some objects disappear for a frame when you're turning the ship's wheel.
The botw speedruns even take advantage of the game's use of LODs by flying towards Hyrule Castle at speed and walking through a doorway that usually has a gate before the higher level of detail can be fully loaded in.
This doubles as a great visual as you can see low-detail Hyrule Castle slowly get replaced by the high-detail version.
In the older speedrun routes, this would also save some more time as you could sometimes walk through the magnesis shrine door before it loaded if you got a good enough BTB from cryonis.
However, this is no longer the case as BTBs were replaced with BLSSes and the Great Plateau shrine order was changed.
Lmao when I heard the first sentence I knew I had to pause the video and look into comments. It made me laugh
As a game design student I approve this message.
Dude that is such a great timing...I was trying to look into this. Love the video 👍
Idk who you are but good job making a video about grass in videos interesting
frustum culling gpu instanced objects is pretty complex btw. there's a series of videos on grass by the youtuber Acerola where he discusses it. pretty interesting stuff
I really wanted you to make a video explaining some optimisation techniques. I don't know if you saw my comment on the last video or not but this does make me really happy!
When painting you start with the background first
Rather than touching real grass, this man learned how video game grass works.
I don't know which is more Chad.
LOL that first line killed me😂
Got this video in my recommended. Awesome video man!
Amazing video. Really appreciate the thorough explanations.
You figured RUclips algorithym. over a year ago you were creating stylized texturing tutorials and now your 5 minutes video has over 275k views. crazy
If BOTW was made by game freak, one blade of grass would insta crash.
This takes "touch some grass" to another level
I think the big reason why botw and totk feel more detailed than say red dead/cyperpunk/horizon is because the low detail renders really mesh well with the art style and color choices, the level designers are crazy. For example in tears all the doors that look openable actually open and have stuff relate to the npc that lives in that room. So many little details that some games may cull because of 4k textures being inherently larger. This is why I loathe 4k gaming when gpu's don't casually have enough vram to really load in. I ain't saying it doesn't look nice, it just feels smaller. I just feel like the hardware isn't ready.
Kind of a biased read, but a lot of open world games just feel empty.
I lol'd at LODS... Coz in our slang, that means IDOL. 😂
Do you wake up everyday and think of way to make a video just to tell us that "grass is pretty cool"?
the first sentence was a 300 iq method to farm comments for the algorithm
Wait a minute... That is actually clever
But i guess people that are offended has no sense of humor....
Great video and well explained
my heart fainted when i heard genshin inpact copy
What a... interesting choice of a starter sentence. Totally didn't leave the video and came back later
I hope the "another video" tease at the end is real because I'd love to learn more about GPU instancing techniques
i want those "in the future video" NOW!
Bro how is IRL not crashing like how, the studio who made Irl are like Gods like ob my god
Still wonder how Gamefreak gets away with releasing Scarlet and Violet looking the way it looked when this is something that existed how long ago.
We’ve heard grass is pretty cool many times here
type of shaders too... low poly doesn't need heavy shaders (4k) etc and the polygons are half probably
Wonderful! Just wonderful! Coding bores me but gam dev will always stay close to me. Just perfect explanation. Love the first sentence, nothing existed before genshin impact and fortnite.
Havent played genshin, should I?
@@Viltzu-hk5wh eh
@@Viltzu-hk5wh yea its quite the masterpiece from a game dev perspective and just a fun game for players too
@@Viltzu-hk5wh I found it too grindy but if you are into gachas, anime and grinding you should check it out.
@@Viltzu-hk5wh really fun game, and free to play friendly. Only thing is that you need lots of space on your device
This was an awesome video. I do have one thing you could make better tho. If possible could you add a little card saying what game it is when showing gameplay? Ofc i know some of them but a little “the legend of zelda breath of the wild” on the bottom left or right would make it a bit easier for new gamers
A real man of culture, playing the WiiU version of Breath of the Wild.
I agree grass is cool, and that was a cool video, the most random thing became so interesting :0
0:42 is that the three rondavels in the Blyde River Canyon in South Africa?
love the new logo
I'm surprised you didn't mention that many games render the actual grass blades as 2d textures on top of flat models
wow that first sentence man.. makes me wonder if i should watch the rest of the vid..
I'm watching this as if I didn't know games did this already
Grass is indeed very cool :)
how does subnautica and below zero render stuff in because it like fades in with this cool comic book style fade
You got the painting analogy for LOD's wrong. You paint from the background to the foreground brcause of how the paint layers itself
People seriously need to learn what "joke" and "sarcasm" mean,Since this comment section clearly is full of 2nd graders
Haven't watched the entire video yet, but I'm pretty convinced the trick is it does not actually render that much grass and it's petty clear in game, only around link dothe blades appear
I'm looking forward to see the next video! 😮
That opening line is absolutely disrespectful lmaooo. Pretty crazy how a masterpiece is kind of overshadowed by a gambling generator.
imagine if you are an npc that is told to touch grass but then the grass isnt visible to the player so it doesnt render and therefore you cant touch it
maybe thats why i cant touch grass
That clip of Genshin Impact at 0:17 was so bright
3:02 I’ve noticed that before lol 😂😎
Ok, you got a new subscriber from the first sentence.
I just clicked and immediatley had an aneurism XD
Very familiar with frustum culling from all the games I play that don't do a great job supporting ultrawide aspect ratios. Get that random peripheral of unloaded grass
Rather have ok support then no support at all though.
LMAO the first seconds joke on this video just killed me.
Coool video. I subscribed :D
Botw is filled with little tricks like these
Seeing this about botw was pretty interesting and it got me thinking why sonic frontier's on switch why the developers didn't do something like this knowing it probably would have helped with the grass because seeing and circle a grass isn't exactly the best solution 🤔but maybe there is more going on with the software and they didn't have away to optimize for switch and people are just going to forever bash switch for there hardware instead but it is something that bothered me about the game.
Can’t wait for quantum computers! Renders the whole game with a 1000fps 😎
But how could instancing be combined with frustum culling? Since you technically only have one object you can't really decide on the CPU level which instances of the blade are in the frustum or not, and even if you could, how would you then prevent any specific instance from rendering?
If only you made this video before Pokemon Scarlet/Violet came out
I didn't know games could be used with the same soft wear with out being called a clone
Thanks man!