Stylized Grass in 5 Minutes // Godot 4 Tutorial

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

КОМЕНТАРІ • 99

  • @stayathomedev
    @stayathomedev  Рік тому +14

    Wind mechanics coming in the next video. If helpful, leave a like or subscribe!
    DOWNLOAD THE SHADER ►► stayathomedev.com/product/stylized-grass-shader/
    DOWNLOAD GRASS MESH ►► stayathomedev.com/product/stylized-grass-mesh/

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

    Wow!!! 😲 I can't believe how much I've learnt from such a short tutorial. Thanks for sharing your knowledge with the community. This is what I call a priceless tutorial. So much from this short 5min can be applied to many other case scenarios. Very clean and detailed straight to the point tutorials. I'm loving your channel's content, even the brilliant Godot song!!! 👌 Well done, man, keep the great work up. THANK YOU!!! 🙏

  • @bodhiiii
    @bodhiiii Рік тому +12

    Thanks for the tutorial!
    Love the breakdown of the shader.. they are still like magic to me lol

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

      Thanks! I do feel that once you get into how they work (vertex, pixel/fragment) and just a little bit of the graphical pipeline process, they make more sense. But obviously, you have simple shaders and really complex shaders.

  • @rakeshchowdhury202
    @rakeshchowdhury202 Рік тому +19

    I watched Unreal and Unity Tutorials, never found a good Godot tutorial. This is really great work. Please create more videos like this
    Small clips / Series in specific niche topics. Like Stylized Grass, Cool Animations, Procedural Character Parts etc.

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

      Awesome! Thanks! It's always a fight between slow and all encompassing vs short and to the point. This one was the later.

  • @michaeljburt
    @michaeljburt 6 місяців тому

    Wonderful, as usual. I watch a video like this and it reminds me why I love gamedev (especially 3D). There's so much magic in the small details. The color gradient, the noise texture, the wind. Combine that with a nice breezy audio clip and you can get some great immersion for your players.

  • @AgriasOaks99
    @AgriasOaks99 Рік тому +6

    Amazing video!
    Please make a terrain series including this kinda stuffs please

  • @YannAbdel
    @YannAbdel Рік тому +24

    Please make terrain next

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

      Terrain in Godot without a plugin is nontrivial

    • @George-bc7ej
      @George-bc7ej Рік тому

      there is a super good terrain add on, but I forgot the name.

    • @FrenzyShine
      @FrenzyShine 23 дні тому

      Easiest way to make a terrain is to sculpt it.

  • @MagicGameDevYT
    @MagicGameDevYT 7 місяців тому +1

    Top notch breakdown and pace, thank you

  • @jaredhernandez9446
    @jaredhernandez9446 Місяць тому

    Thank you for the tutorial, you have explained perfectly and you have helped me a lot, you are a hero ❤

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

    Awesome! I had seen the multimesh instance but hadn't played with it yet to see what it did. Also I've been opening the imported scene and doing make local and then copying the mesh to other scenes. I like that you can save it via the menus to a resource.

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

    For anyone having the issue that the grass shader shows up fine in the editor but not when previewing or exporting:
    For some reason, when I imported the Mesh ressource (grass.res) using "Save To File", it had 2 surfaces. Surface 1 had a white material attached to it, which didn't show up inside the editor but was visible when previewing.
    Removing this material (click on the arrow right next to it -> Clear) solved the issue!

  • @waterPsychiatrist
    @waterPsychiatrist 4 місяці тому +4

    "Baby want wind" - I say, pounding my fists at the table

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

    With such a good work you might become the Brackeys of Godot! Keep on such awesome work it will pay sooner or later.

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

      You spoke too soon... HE CAME FOR GODOT

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

      @@patty4449 Yes I came for godot, because it's about Godot :)

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

    Thank you for sharing you knowledge with the community! I was just looking for a way to add the same style of grass to my hobby project.

  • @MattEatsMochi
    @MattEatsMochi 10 місяців тому +2

    I'm stumbling into this before I know much at all, my initial question is "is this performant way to do this? should I figure out a way to do this only around my player and load/unload the grass as it gets further away from the player?"

  • @omr-top
    @omr-top Рік тому +1

    You are amazing, I can't wait for your video
    God bless you ❤

  • @user-rx3xl7zn1u
    @user-rx3xl7zn1u 4 місяці тому +1

    Thank you for doing this. Did the wind tutorial ever release? I don't see it in your list of videos.

  • @GabrielRodriguez-mq6ly
    @GabrielRodriguez-mq6ly 5 місяців тому +10

    Try not to use if statements in shaders, they can lead to branching which hurts performance.
    In this specific case, use:
    NORMAL = NORMAL * (FRONT_FACING*2 - 1);
    this avoids branching and has the same result.

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

      nuh uh that not good

    • @GabrielRodriguez-mq6ly
      @GabrielRodriguez-mq6ly 4 місяці тому +1

      @@EvanPilb would you like to elaborate?

    • @cadenatkinson6012
      @cadenatkinson6012 2 місяці тому

      This just gives me the error "error(56): Invalid arguments to operator '*': 'bool, int'."

    • @EvanPilb
      @EvanPilb 2 місяці тому +1

      @@GabrielRodriguez-mq6ly
      NORMAL = NORMAL * (float(FRONT_FACING) * 2.0 - 1.0);

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

    I think using the plugin Scatter, would also make for good grass, especially after adding some stones, and flowers too.

  • @pixel-ink
    @pixel-ink 11 місяців тому +4

    Thanks, this is cool. Where's the next video on this. You have made many other video's afterwards, but can't find the wind one. Thanks

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

      I was hoping for the wind one as well!

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

    im looking for the wind tutorial :/ any update ?

  • @alejandromontalvo9115
    @alejandromontalvo9115 Рік тому +16

    Do you still plan on making another video covering wind mechanics for the grass? I've being trying to adapt 3.x shader code but I keep running into problems 😅

    • @DeathMothhh
      @DeathMothhh 10 місяців тому

      maybe make it an animation instead? plays every few seconds.

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

      @@DeathMothhh Wonder if it's possible to add random variation or noise to the animation itself? Just tossing ideas around.

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

    if you want to rescale it, adjust the plane size (in the plane mesh NOT the plane transform) and then click the populate button

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

    Could you show a grass example using a particle emitter instead of multimesh?

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

      Absolutely! The multimesh was a quick way to show it. When I cover the grass system setup, it'll be one of the options.

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

      @@stayathomedev Thank you

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

    Wow I am happy to find your channel, you are very good as an instructor, and you teach very useful topics, I'm grateful, you have a new subscriber, a great future awaits you

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

    You are a legend

  • @DanielAttaway
    @DanielAttaway 5 днів тому

    I went to like this video but I'd already liked it so I figured I'd comment. Thanks for teaching cool stuff ✍️✍️

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

    Okay back and I can say with a strong understanding of shaders and godot shaders this video is not ridiculously simple to parse.

  • @hawkgamedev
    @hawkgamedev 5 місяців тому +1

    hey there! did you ever made part 2? I don't seem to find it xD

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

    I really appreciate these videos. And I do watch them. But with all gamedev videos. everything after step 3 is magic and insanely hard to me. I want to make a game some day but I just can’t phantom how people understand what they’re doing, writing these codes and solving problems. I’m impressed and kind of sad I probably never make my own game.

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

    This video is amazing. Thank you for your share.

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

    Thanks for the amazing tutorial.

  • @scorpi0uk
    @scorpi0uk 9 місяців тому +1

    Awesome job, so easy to follow along with.
    Did the wind tutorial ever materialise? (Excuse the pun ;-])
    I can't seem to find it on your channel.

  • @me551
    @me551 5 місяців тому

    great tutorial! it really helped me. how can i make the grass move?

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

    where's the wind shader tutorial?

  • @dibaterman
    @dibaterman 10 місяців тому

    This was great but I feel all godot shader tutorials should come with a link to the version glsl api. I had to go through reddit to find it, but once I did it became much more doable.

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

    Great tutorial. When I play the game, the grass is not colored. Other objects have their color. Any tips?

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

      Colors showed in the export just not in the Godot game preview. All good!

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

    what happened to the next vid?

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

    I'm very curious about the performance impact of that multimesh node! It's crazy to me that these days we can literally just draw thousands of grass meshes, but what is the cost of this approach?

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

      Old comment, but mutlimesh is designed to have a lot of meshes by batching the draw call that is sent to the GPU. Individual MeshInstance3D nodes have to have draw calls sent one at a time. The drawback is it is treated as one object by the engine. So its always rendered when one part of the mesh is rendered.

  • @DuriniOnline
    @DuriniOnline 11 місяців тому +1

    I followed your video tutorial and created the grass, and it looks good in the editor, but when I run my game the meshes are all white, but green in the editor. Do you have any tips to help solve this issue?

    • @brewsmusic
      @brewsmusic 10 місяців тому

      Yo, the reason is because the model has 2 materials in it. The other one shows when you run the game. You can either remove it or make a shader that just makes it invisible because it screws with the grass if you try to for example add wind to it! So if you are gonna do that i recommend hiding it with a shader, cheers!

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

    EHMMM... how did you figure out this NORMAL = -NORMAL!
    Great tutorial. Thanks. Waiting for wind (and character interaction) :)

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

      Thanks! There's a built-in variable for whether the pixel is front-facing or not in the fragment shader. If you show the backface, it keeps the frontface normal. But you want the inverse of that normal, so you make it negative, or the inverse.

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

      @@stayathomedev I understand your explanation in the video very clearly, I just don't know how you figured that out! I haven't seen it in the documentation. I am very lazy when it comes to reading though so I might have given up too soon

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

      Ah I got you, there was a mention in git repo somewhere of the FRONTFACING variable and I went with it. It's not the most elegant but it works

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

      Elegant is a rare thing when it comes to programming games.

  • @phoenixastra4429
    @phoenixastra4429 6 місяців тому

    Is it possible to make grass in blender and the shade in godot later?(sorry, huge noob here lol.) I just want to make the wind/sway effect really

  • @cheddaberetta11
    @cheddaberetta11 2 місяці тому

    How would you turn this multimesh into a mesh instance so I can use that patch of grass in a multimesh?

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

    Thanks my friend

  • @oleksandr-petrovych
    @oleksandr-petrovych Рік тому

    great video, thanks

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

    Why do we use that noise?
    I'on see any difference 😅.
    There's a bit of dark spots on top of the grass..
    But.. does stylized games use that too? Woah!

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

    Bääääm! AWESOME!

  • @thesolitaryowl
    @thesolitaryowl 2 місяці тому

    How can this be set up to not render when too far from the camera?

  • @nipdaboi
    @nipdaboi 11 місяців тому

    I'm not sure why, but the only way I could get the shader to actually show up was to change the Render Priority to 1 instead of 0.

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

    You did a great job, thanks for this tutorial.

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

    Where would a person find potential collaborators for a game? I have an idea but no coding skill. I’m willing to learn but would love to work with a more senior creator if possible.

  • @RealJesus
    @RealJesus 7 місяців тому

    Can you do it but uploading a custom texture in albedo?

  • @user-rx3xl7zn1u
    @user-rx3xl7zn1u Рік тому

    Is it possible to blend the base of the grass with the ground texture it "sprouts" from?

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

    Could you please please share the entire project folder?

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

    🔥🔥🔥🔥🔥

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

    I think Godot lacks tutorials showing grass in a larger scope.

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

    So stylised just meabs cel-shaded now?

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

    Is there another part?

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

    you technically dont even have to use multi mesh since gd4 does automatic instancing on meshes(this is the biggest feature i heard almost none mention)

  • @mrmaniac9905
    @mrmaniac9905 10 місяців тому

    Can you remake this using compute shaders?

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

    Yes we need good grass. but, also game must run fluently in mobile .

  • @mrdixioner
    @mrdixioner 11 місяців тому

    Why provide links that require some kind of registration in order to download something? Provide a direct link to the resources, it will be easier for everyone.

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

    Problem is actually scaling this bigger than a simple tiny plane for me 😭

  • @SolitaryElite
    @SolitaryElite 2 місяці тому

    good way to fuck up your fps... just use sprites for grass

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

    you genuinely do not need my house address for the shader. im finding a different tutorial

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

    1:43 ?????

  • @Gameworks-gt9di
    @Gameworks-gt9di 5 місяців тому

    I don't think this tutorial works in Godot 4.2+