How do Major Video Games Render Grass?

Ғылым және технология

Trying out the last grass and foliage rendering techniques used by Ghost of Tsushima.
🛒 Recommended books (on Amazon): www.amazon.com/hz/wishlist/ls...
❤️ Support me on Patreon: / simondevyt
🌍 My Gamedev Courses: simondev.teachable.com/
Disclaimer: Commission is earned from qualifying purchases on Amazon links.
Follow me on:
Instagram: / beer_and_code
Twitter: / iced_coffee_dev
In this video, I tried implement the grass techniques explained by SuckerPunch in their talk "Procedural Grass in 'Ghost of Tsushima'". We walk though a lot of their basic setup, explore some possible alternative implementations, and end up with a nice little scene full of grass.
Three.js SSAO Used:
github.com/N8python/n8ao
References talks:
• Procedural Grass in 'G...
www.gdcvault.com/play/1027033...

Пікірлер: 528

  • @simondev758
    @simondev7586 ай бұрын

    Patrons can now vote for the next video! Thank you for your support. ❤ Support me on Patreon: www.patreon.com/simondevyt 🌍 Live Demo + Courses: simondev.io

  • @cicik57

    @cicik57

    6 ай бұрын

    is it possible to clip bottom parts of grass what are not visible?

  • @LacklusterThoughts

    @LacklusterThoughts

    6 ай бұрын

    It seems like online games, like in milsims where render distance is far. Have a really bad problem with grass if you ever feel like analyzing it.

  • @road2nohand

    @road2nohand

    Ай бұрын

    can you please pleas pelase host this crazy stuff

  • @theblackquill5921
    @theblackquill5921Ай бұрын

    THe more you render grass the less you touch grass

  • @asandax6
    @asandax65 ай бұрын

    Simon: "I'm just messing around" (Proceeds to make one of the most awesome grass scenes that looks better than some games released in 2023)

  • @deanolium
    @deanolium6 ай бұрын

    For the wind, try giving each blade of grass a random 'stiffness' which goes from 1 to 0.8 or so then use this to multiply the effect from the wind. That would give a little bit of variance to each blades movement which would make it feel a little more realistic, since each blade will have slightly different resistance to being moved by the wind.

  • @simondev758

    @simondev758

    6 ай бұрын

    Good idea!

  • @gibraelkotwal6894

    @gibraelkotwal6894

    6 ай бұрын

    Wouldn't that take a hell of a lot of computation power?

  • @squidwardstesticles5914

    @squidwardstesticles5914

    6 ай бұрын

    @@gibraelkotwal6894 not really, just a single random number generation and multiplication per blade. Of all the things done in the video that would probably be one of the least expensive things

  • @simondev758

    @simondev758

    6 ай бұрын

    @@squidwardstesticles5914 To add, GPU's are measured in TFLOP's these days, to give you an idea of just how absurdly powerful they are.

  • @RiversJ

    @RiversJ

    6 ай бұрын

    They aren't particularly 'powerful' really, per die / computing unit theyre Way weaker than most mobile phone CPUs, the difference is better modeled conceptually by comparing mentally a high pressure hydraulic line at 600 atmospheres but it has tiny diameter, while the GPU is a firehose, not nearly as fast but boy does it move a Lot of stuff. The SIMD concept or something similar is very important to understand for graphics programmers if you don't want to be like some new 'AAA' titles that get their shaders 'proper' fixes by modders to make them run well. Essentially you want to make sure everything is as flat as possible, that you write in aliased manner from memory without in-flight conflicts (read only done right is ok). There's no getting around learning the fundamentals of SIMD architecture if you want to be good at graphics programming.

  • @SteveLEKORodrigue
    @SteveLEKORodrigue6 ай бұрын

    I'm mesmerized by how good this stuff can look. I'm not a game developer, but you make me want to become one. 😁

  • @Yadobler

    @Yadobler

    6 ай бұрын

    Makes me want to be a render engineer instead of game development

  • @lilbahr

    @lilbahr

    6 ай бұрын

    Epitaph

  • @alex-qn5xp

    @alex-qn5xp

    6 ай бұрын

    It's easier than it looks once you know what you're looking at.

  • @Shifae_

    @Shifae_

    6 ай бұрын

    I'm 44 and trying to teach myself UE5 using KZread videos. There's no reason why you can't.

  • @SteveLEKORodrigue

    @SteveLEKORodrigue

    6 ай бұрын

    @@Shifae_ : I'm already working in game industry (network infrastructure).

  • @neoshenlong
    @neoshenlong6 ай бұрын

    Dude, you are like "yeah I'm just messing around" and then build a scene that looks absolutely amazing and far better than like half of the games I can think of right now.

  • @wille84fin

    @wille84fin

    2 ай бұрын

    And it doesn't magically just vanish (stop) after 30-50 meters like in 90% of games today..

  • @B0ltSoft
    @B0ltSoft5 ай бұрын

    As the developer of GrassFlow, I approve of this video. It's weird how familiar hearing about their grass setup feels to how I ended up developing it. Ghost of Tsushima actually inspired me to add bendy grass and stuff at the time because I was jealous they could do it and I didn't have it. That was back when using geometry shaders though, now it's just raw mesh instancing baybee. At one point I hacked together an experiment inspired by nanite using a compute shader based micropolygon software rasterizer to render a truly insane amount of grass with like 1000 triangles per single clump and hundreds of millions of triangles at like 2K 450 fps. I wish it was practical to implement that more generally. But cool nonetheless

  • @simondev758

    @simondev758

    5 ай бұрын

    That sounds super cool!

  • @GRAYgauss

    @GRAYgauss

    3 ай бұрын

    Sounds so cool I hate to say I actually don't believe you. Any scraps on github?

  • @The_Pariah
    @The_Pariah26 күн бұрын

    As someone who codes but doesn't write video games, I love watching stuff like this. When I play games, I constantly think about some of the nuances. Grass/vegetation is something I constantly think about. It's neat to see the code that drives this kind of stuff. Geek-friendly and enjoyable.

  • @AnimusAgent
    @AnimusAgent6 ай бұрын

    The fact that this was made in Javascript is mind-boggling for me as a web-developers that have been working with JS-related stuff for about 10 years. And as always, awesome video!

  • @joaovitormeyer7817

    @joaovitormeyer7817

    6 ай бұрын

    Three.js uses WebGL, wich is just a way of using OpenGL in the web, so while it is indeed JavaScript, the havy work is all done on the GPU and JavaScript just uses it. I'm shure you know that but to me it feels like cheating to say that this was done with JS (performance-wise)

  • @greggoog7559

    @greggoog7559

    6 ай бұрын

    Web technologies have really come such a long way that I'd personally go as far as saying that native code is unnecessary in 95% of use cases.

  • @Mnmn-xi6cj

    @Mnmn-xi6cj

    6 ай бұрын

    @@greggoog7559 browsers can indeed pretty much do anything, I'm just not sure whether that is even desirable. Wouldn't be surprised to see browsers replacing the OS entirely 😅

  • @LittleRainGames

    @LittleRainGames

    6 ай бұрын

    @@greggoog7559 Until you move to huge projects.

  • @askeladden450

    @askeladden450

    6 ай бұрын

    ​@@greggoog7559for rendering and games? Javascript is good for toying around or experimenting, but if u want to make anything fullscale, native is absolutely the way to go.

  • @seriouce4832
    @seriouce48326 ай бұрын

    Simon, consider this: Since the video compression really messes with the grass details far away, you could consider this step: Simply upscale the video to 4k and upload. This sounds a bit silly but the 4k stream will have much more bitrate and the grass will look much nicer, even though it is technically still a 1080p video. The upscaling does not make it nicer, but the higher bitrate does - and you won't get that from youtube without increasing the resolution.

  • @simondev758

    @simondev758

    6 ай бұрын

    That is a great idea!

  • @clonkex

    @clonkex

    6 ай бұрын

    ​​@@simondev758We upscale our videos as well to force the better codec that KZread won't give us unless we have many subscribers (although you probably have that codec already)

  • @luizarthurbrito

    @luizarthurbrito

    6 ай бұрын

    KZread uses a significantly higher bitrate and better compression from 1440p onwards. Sometimes, 2k will do the trick!

  • @JOCoStudio1

    @JOCoStudio1

    6 ай бұрын

    Agreed. No. matter the resolution of the source file, you should always upload at the highest resolution possible to tap into that higher bitrate. Wish KZread would just decouple resolution and bitrate, but it is what it is.

  • @gruuli

    @gruuli

    6 ай бұрын

    you are all right but its not only about bitrate as you think, it is also about the codec used by youtube: keyword vp9

  • @playonce4186
    @playonce41865 ай бұрын

    To be honest man, this grass looks artisticly unique and very beautiful. I really love it ! One of the best grasses I have seen in a game. The more realistic something is to real life the more it looses that childlike connection and desire to that play game. Your grass has a a type of characterstic to it which i find very wanting to run around the grass meadowy hills.

  • @simondev758

    @simondev758

    5 ай бұрын

    Thanks!

  • @zeekjones1
    @zeekjones13 ай бұрын

    I'd add the actors move vector to the "wind" for a given area so the grass gets a little push as you pass through.

  • @wafi5576
    @wafi557614 күн бұрын

    the plot twist at the end got me. amazing

  • @DavidsKanal
    @DavidsKanal6 ай бұрын

    Love how you're doing your tutorials in the browser - not only is it easier for people to view this demo, but it also constantly reminds people of the power of modern browsers and what you can make with them. I much prefer this approach over fiddling around in some heavyweight engine like Unity.

  • @jabadahut50

    @jabadahut50

    6 ай бұрын

    And browsers are only getting more powerful with additions like WASM and WebGPU. As these technologies mature, the only things that will really be holding the web back from being the primary way to deliver games will be tradition (good luck getting a steam user to move away from steam), download speeds (as large assets will still take a very long time to download), and browser cache size (though there are already ways around this now so this one is less of an issue.)

  • @leo-oh1bc

    @leo-oh1bc

    6 ай бұрын

    ​@@jabadahut50and Logic also. Browsers should focus more on being a way to get and send information on internet instead of trying to become another operative system Browsers should get simpler, not more complex, It Is already too complex to develop a browser from scratch even for Microsoft

  • @niceowl

    @niceowl

    6 ай бұрын

    ​@@jabadahut50the Steam client does more than just downloading games. Do you know how big of a performance impact the browser makes? With the sandbox I'd imagine it to be quite big

  • @Onaterdem

    @Onaterdem

    6 ай бұрын

    @@jabadahut50 Are there any benefits to "the web back from being the primary way to deliver games"? Why would we move towards such a future?

  • @nicholasmaniccia1005

    @nicholasmaniccia1005

    6 ай бұрын

    @@Onaterdem Ease of access, and more control over your own product. Business 101 in trying to make a great product that makes a lot of money is to try and cut out any middlemen and buy and/or sell direct from suppliers and to consumers. Even drug dealers know this.

  • @theranpan_
    @theranpan_6 ай бұрын

    Almost everything bounced over my head but I loved the video for some reason. Subscribed because I wanna watch remaining videos you have uploaded.

  • @kingcrimson_2112
    @kingcrimson_21125 ай бұрын

    you are a true wizard. And I absolutely love your approach of tutorial making. Please dont stop, its inspiring.

  • @RGSTR
    @RGSTR4 ай бұрын

    I used to dream of becoming a game programmer. Now, I watch technical videos such as this, and enjoy them a lot. Thank you!

  • @iro4201

    @iro4201

    11 күн бұрын

    Touch grass

  • @pklpklpkl
    @pklpklpkl3 ай бұрын

    As someome tuning into your optimization analysis, that last sentence made me choke. I wasn't prepared, but am impressed

  • @michaelpease2103
    @michaelpease21035 ай бұрын

    At 5:40 that grass would already work really well for a stylized game. Good stuff

  • @thevoidunknown
    @thevoidunknown6 ай бұрын

    Definitely going to check out your courses first chance I get. Please don't stop what you're doing, this is some of the best dev content out there!

  • @mattwayne9128
    @mattwayne91286 ай бұрын

    Some of the best javascript and game dev content on the Internet. Thanks for sharing your knowledge. I'll definitely be looking into your courses (when I get some money).

  • @LewisRidyard
    @LewisRidyard6 ай бұрын

    I recently watched the same GDC talk, after playing the game for the first time, and wondered how it could be approached in the browser. Super cool to see your thought process, especially around the points you chose to focus on vs simplify. Great stuff. Really loving your content both here and on Twitter!

  • @4.0.4
    @4.0.46 ай бұрын

    I'm absolutely impressed by how good of a result you got for what is basically a throwaway toy demo. Love your explanations.

  • @vici83
    @vici836 ай бұрын

    Everytime that I beginning to lose the direction of what I'm doing, I come back here and get that glow on the eye back. Love your work.

  • @Draxen
    @Draxen6 ай бұрын

    Absolutely insane, you sir are a genius. Thanks for another informative and fun video 🎉

  • @zarblitz
    @zarblitz6 ай бұрын

    I think the real value of this video (aside from the great approach to grass) is demonstrating how to turn a description of a methodology into an implementation

  • @tufanaydin6340
    @tufanaydin63406 ай бұрын

    I am absolutely tuned about to buy your courses. I loved your knowledge.

  • @Kujeful
    @Kujeful6 ай бұрын

    That was some lovely grassing and nice outcome! Thank you!

  • @alexjeffrey3981
    @alexjeffrey39816 ай бұрын

    What a banger of a topic! I've bumped into this issue a few times working on my own lil games, excited to hear your perspective

  • @hydraulicsystems332
    @hydraulicsystems3322 ай бұрын

    This looks very nice, if you really want to sell the wind illusion you could make the butterflies be slightly perturbed by the wind waves.

  • @asherspira
    @asherspira6 ай бұрын

    Watching this video, seeing the program slowly come to life was as amazing as the final product 🙏

  • @AndersonMancini
    @AndersonMancini6 ай бұрын

    Wow. This is just pure gold man. Thank you so much Simon. 👏🏻👏🏻👏🏻

  • @nacs
    @nacs2 ай бұрын

    Fantastic narration and video. Love how it's paced well but still concise and to the point Oh and the final result looks fantastic

  • @Nebulaoblivion
    @Nebulaoblivion6 ай бұрын

    Your results are really cool, thanks for sharing!

  • @jixal
    @jixal6 ай бұрын

    That is nuts. Really excelllent result! I'm not a coder but it was very interesting to follow your steps.

  • @Novanimator
    @Novanimator6 ай бұрын

    You deserve more recognition bro, this is amazing

  • @hamzzashaffi
    @hamzzashaffi6 ай бұрын

    Thank you for sharing these videos with us! :)

  • @_jurd
    @_jurd6 ай бұрын

    Last year I wrote this for Unity HDRP but got stuck building artist tools to paint grass and creating a system to bake a heightmap based on multiple meshes. Thanks for motivating this programmer to get back to work!

  • @xdanic3

    @xdanic3

    6 ай бұрын

    I'm curious about how you would do this in unity, do you have a single object for all the grass? Do you model the grass and import or create the mesh inside unity?

  • @_jurd

    @_jurd

    6 ай бұрын

    ​@@xdanic3 Currently, it's created in a C# script with each chunk being its own mesh. From my research it's the only feasible way to support important HDRP stuff like deferred lighting. It's probably not possible to only use one object (mesh) as you'll probably very quickly overload the index buffer which when formatted to 32 bits supports about 4 billion vertices.

  • @visionary_3_d
    @visionary_3_d6 ай бұрын

    Great video. The grass looks great! I'll try the movement tricks here at some point 😋

  • @Mcs1v
    @Mcs1v6 ай бұрын

    Ey, another high quality content from you. Thanks! :)

  • @dpatulea
    @dpatulea6 ай бұрын

    Wow. It's amazing! Thank you for your share!

  • @yoyooo2008
    @yoyooo20085 ай бұрын

    great tutorial, easy to follow and the results is really nice

  • @GamePhysics
    @GamePhysics6 ай бұрын

    Looks great! I was shocked when you said it's running in a browser. Impressive!

  • @Memeieli
    @Memeieli6 ай бұрын

    You truly make the best Indepth videos on how to do these techniques. Your truly amazing.

  • @Memeieli

    @Memeieli

    6 ай бұрын

    Id pay money for a more in depth course that follows more of the talk or just other techniques as well. GPU instancing a bunch of geometry like horizon zero dawn has been something ive been trying to learn for a while. Is there any chance u could cover rendering trees/rocks and other geometry with compute shaders?

  • @simondev758

    @simondev758

    6 ай бұрын

    100% yes I'm holding a poll on Patreon right now on the next video, 2 potential topics are how to render 100's of thousands of objects easily, the other is how to manage enormous scenes, basically 2 different spins on rendering a crapload of stuff. I will eventually build up to how games like Horizon, etc. use compute shaders for modern gpu driven rendering.

  • @kipchickensout
    @kipchickensout6 ай бұрын

    Just listening to your voice while watching that snack-sized video summary of something so interesting is a nice way to start the evening

  • @NotGarbageLoops
    @NotGarbageLoops6 ай бұрын

    Absolutely incredible. Well done

  • @Meta5917
    @Meta59176 ай бұрын

    This was a great video, I love the detail

  • @dhawaljoshi
    @dhawaljoshi6 ай бұрын

    grass does look good, it's amazing to see this was done in JS

  • @vishnuvarma2826
    @vishnuvarma28263 ай бұрын

    Really amazing video! These videos keeps me more interested with game dev! Just subcribed your channel! Great content 🫡😎thank you ❤

  • @BvngeeCord
    @BvngeeCord6 ай бұрын

    This is so cool. Makes me excited about computers again. Thank you very much sir :)

  • @Bluesky35102
    @Bluesky351026 ай бұрын

    This looks amazing! Awesome video

  • @simondev758

    @simondev758

    6 ай бұрын

    Thanks!

  • @kkodingg
    @kkodingg6 ай бұрын

    I didn't expect you would mention browser at the end. It caught me off guard. Though, I was a little confused why there was javascript in the middle of the video. Anyways, Great stuff! Looking forward to see your next videos!

  • @simondev758

    @simondev758

    6 ай бұрын

    Yeah, it's amazing what JS can do these days. I mostly use it out of ease and convenience.

  • @NickStagakis
    @NickStagakis6 ай бұрын

    Sadly the youtube video compression does not like the grass moving towards the end of the video. Still very beautiful though!

  • @UrielHK
    @UrielHK6 ай бұрын

    Amazing as always! Thanks!

  • @filippapiernik9737
    @filippapiernik97376 ай бұрын

    Fantastic article and video!

  • @Lucas-hh4oh
    @Lucas-hh4oh6 ай бұрын

    What a great video you have here! Instant sub!!

  • @tristanwegner
    @tristanwegner5 ай бұрын

    Great results and easy to follow.

  • @alexshonia880
    @alexshonia880Ай бұрын

    Looks amazing!

  • @AbrahamZilberstein
    @AbrahamZilberstein6 ай бұрын

    This makes me excited like a child, that things like that can be done by a human being. Definitely worth learning

  • @tigerwolf8338
    @tigerwolf83386 ай бұрын

    Thanks for your game-math course!

  • @ViktorWingqvist
    @ViktorWingqvist3 ай бұрын

    very inspiring, thank you!

  • @omgabaddon
    @omgabaddon4 ай бұрын

    that grass movement looks fucking sick, it looks like actual wind is moving across the field, and it's just a tiny square... bro

  • @phutureproof
    @phutureproof6 ай бұрын

    fantastic! as a simple web dev this stuff blows my mind

  • @kenw.t.9979
    @kenw.t.99796 ай бұрын

    Amazing , please more videos !

  • @addmix
    @addmix6 ай бұрын

    This guy just does not miss. Absolute GOAT

  • @JordanBeagle
    @JordanBeagle4 ай бұрын

    Crazy they have to model every blade of grass!

  • @cmcdonough2
    @cmcdonough24 ай бұрын

    As usual that is amazing. Great content.

  • @cazino4
    @cazino46 ай бұрын

    Wow, excellent work!

  • @GameDevAcademy
    @GameDevAcademy4 ай бұрын

    Great video. Thanks for sharing.

  • @barthpaleologue
    @barthpaleologue6 ай бұрын

    That looks really cool!

  • @anon_y_mousse
    @anon_y_mousse6 ай бұрын

    I love how so many channels I watch keep showing all these techniques for doing grass. It's really making me want to make a lawn moving game. Although, I'm wondering how I might apply these techniques to have a room of tentacles like say you're on an alien planet and there are tentacles coming from every crevice.

  • @simondev758

    @simondev758

    6 ай бұрын

    That sounds awesome, some nice cutting mechanics and fluid sim for slime flying everywhere.

  • @mschwaller3371
    @mschwaller33713 ай бұрын

    Amazing stuff - thanks!

  • @HuynhLuong227
    @HuynhLuong2276 ай бұрын

    wow, long time no see, welcome back with threejs

  • @shootnblankz9994
    @shootnblankz99945 ай бұрын

    aliased grass is the bane of every gameplay experience lol. Looks pretty good!!!

  • @BlobAlt
    @BlobAlt4 ай бұрын

    It looks amazing 👏

  • @Eloii_Xia
    @Eloii_Xia6 ай бұрын

    Strong skills dude !

  • @dwanascie228
    @dwanascie22819 күн бұрын

    My goal as second year game dev student is to be able to follow this tutorial. As clear as it is, it does require some knowledge to follow.

  • @youknowho4439
    @youknowho44395 ай бұрын

    This is one of the biggest difficulties for me as a beginner in Blender. Wanting to design the environment, and render it, AND add animations AND maybe custom assets is pretty easy. When you learn the basics. Hoping to get there.

  • @Crestnutt
    @Crestnutt5 ай бұрын

    Wow, that is amazing!

  • @hund1267
    @hund12674 ай бұрын

    I just wanted to add a rooman for the algorithm, but also your ego. This has on so many LODs so much quality that everybody should believe in humanity again. Thanks for your humble work.

  • @2byteCode16
    @2byteCode166 ай бұрын

    Thank you so much for this man

  • @strokkur24
    @strokkur249 күн бұрын

    Holy shit. Holy fucking shit this is awesome! This grass looks so good I that I want to go out and touch some. All jokes aside, the grass looks insane. You got youself a new subscriber mate

  • @fakelaminated5353
    @fakelaminated53534 ай бұрын

    Awesome video!

  • @_prothegee
    @_prothegee6 ай бұрын

    Those grass looks great with wind simulation

  • @raphaeljaggerd3585
    @raphaeljaggerd35856 ай бұрын

    This is awesome. Im not smart enough to understand these talks but thanks to you i now can. If possible please try to recreate the physics driven animation GDC talk for uncharted

  • @mohammadalaaelghamry8010
    @mohammadalaaelghamry80106 ай бұрын

    Great video, thank you.

  • @alichamas63
    @alichamas636 ай бұрын

    Love this channel!

  • @_Kaurus
    @_Kaurus5 ай бұрын

    You just blew my mind

  • @BRZguy
    @BRZguy4 ай бұрын

    It's really amazing how much games have improved in this area. Back in the day, you'd be lucky if you saw a couple static blades of grass and a green ground texture in a large open area. Nowadays it's all over and individual blades are modeled as well as have movement with the wind and player.

  • @robertwallace5498
    @robertwallace54986 ай бұрын

    SimonDev is a god among us, best videos on youtube

  • @MonsieurFlange
    @MonsieurFlange6 ай бұрын

    Looks amazing! I'd love to see how you'd implement player influence on the grass movement

  • @simondev758

    @simondev758

    6 ай бұрын

    I didn't really call it out in the video, but there's a video on my twitter of player influence. Added it for fun, but just didn't feel like it needed to be included on YT.

  • @user-cj6wf4qv9h

    @user-cj6wf4qv9h

    6 ай бұрын

    that would of it the video for me that beautiful end part with a player walking threw the grass almost pushing it to each side, love the buttflies too@@simondev758

  • @iamthetinkerman
    @iamthetinkerman6 ай бұрын

    This was awesome ❤

  • @HighPerformanceGames
    @HighPerformanceGames6 ай бұрын

    Great video, nice.

  • @medmel2160
    @medmel21606 ай бұрын

    Amazing video

  • @marverickbin
    @marverickbin5 ай бұрын

    Pretty smooth, a task that seems so heavy. Also, javascript!!!

  • @kerch00
    @kerch00Ай бұрын

    I noticed a difference in the real life video you took of some grass, where vortices are formed in between blades of grass moving them horizontally instead of just vertically. You could introduce some random movement in the blades proportional to the perpendicular of the wind to create a more varied/realistic look.

  • @dev_reimu
    @dev_reimu6 ай бұрын

    The end genuinely killed me.

  • @IceForgeOfficial
    @IceForgeOfficialАй бұрын

    This is so cool

  • @the-other-sunny
    @the-other-sunny6 ай бұрын

    Our hero is back !

  • @starc0w
    @starc0w2 ай бұрын

    Fantastic!

Келесі