Tutorial: Stylized Grass in Godot 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • I've got another Godot 4 tutorial for you, this time its how to make some lovely stylized 3D grass using blender, multimeshes, and visual shaders!
    This tutorial is using Godot 4 stable, and Blender 3.5.
    🎁 Source code available on Github here: github.com/bramreth/Godot-4-3...
    📰 Check out my Godot 4 course here! bramwell.itch.io/godot-4-begi...
    💐 Check out akbutea's Unreal Engine video: / @akbutea_art
    ✨ Socials ✨
    🐦 Twitter: / bramreth
    💬 Discord: / discord
    🥰 Patreon: / bramwell
    🎮Games: bramwell.itch.io/
    Chapters:
    00:00 Introduction
    00:30 Blender: Mesh
    09:50 Blender: UV Unwrapping
    13:45 Intermission
    14:00 Godot: Setup
    18:12 Godot: Material
    20:22 Godot: Fragment Shader
    28:48 Godot: Vertex Shader
    38:42 Wrap-up
    #Godot4 #GodotEngine #Gamedev

ความคิดเห็น • 118

  • @blootiger27
    @blootiger27 10 หลายเดือนก่อน +33

    (Tip) If your grass stutters a little bit while swaying, go to your Wind Noise texture & enable "Seamless"

    • @felicaamiko
      @felicaamiko 5 หลายเดือนก่อน

      whys that fix that?

    • @blootiger27
      @blootiger27 5 หลายเดือนก่อน +6

      The wind noise texture basically says how much the blades of grass bend. Sort of like if you’ve seen a weather map showing wind speeds as different colors. As this texture moves across the grass, the grass bends under the white part of the texture giving the illusion of wind. This texture is repeated over & over so the wind is infinite. The stuttering problem comes from the seam between 2 copies of the repeated texture. If it’s not a smooth transition from one texture to another the grass blade immediately jumps from bending a lot (white) to no bending (black). Enabling seamless smoothly transitions from texture to texture so the grass blades bend smoothly.

  • @MitchMakesThings
    @MitchMakesThings ปีที่แล้ว +32

    This is fantastic! I'd also love to see the displacement stuff. Shaders are still firmly in the realm of magic as far as I'm concerned

  • @davidphillips9366
    @davidphillips9366 ปีที่แล้ว +17

    Great tutorial! A little tip in Blender that should save some time: once you make your first blade of grass, right click and set origin to 3D cursor and that way whenever you scale or rotate the duplicates, they will scale and rotate from the bottom of the blade and you wont have to move each individual blade down on the z axis after you scale it.

  • @me2beats313
    @me2beats313 ปีที่แล้ว +13

    It would be really cool to make this grass interactive as well

  • @LucyLavend
    @LucyLavend ปีที่แล้ว +22

    Very well structured tutorial, doing it in visual shaders makes it a whole lot easier to grasp👌
    Also, +1 for a grass displacement tutorial!

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +7

      Thankyou Lucy! the improvements to visual shaders have been SUCH a blessing✨

  • @Magnic0
    @Magnic0 ปีที่แล้ว +2

    I love your tutorials! We really need more creators making content about Godot. Nice work, dude!

  • @chestnut45
    @chestnut45 11 หลายเดือนก่อน

    You're a legend! I've been wanting to start this process for my current project and haven't quite been able to piece all of the resources together myself, this is an invaluable resource :) Subbed

  • @fayelawless2625
    @fayelawless2625 4 หลายเดือนก่อน

    your tutorials are seriously the best. this is the only grass tutorial i've found so far that was comprehensive and useful. thank you Bramwell!

  • @SanOcelotl
    @SanOcelotl 2 หลายเดือนก่อน

    you explain everything at the perfect pace, not booring, not fast, great job

  • @KennethWebb925
    @KennethWebb925 4 หลายเดือนก่อน

    Amazing content! Love how thorough and articulate you are!

  • @GaryParkin
    @GaryParkin ปีที่แล้ว

    This was like watching a magic show. I had no idea a shader could effect mesh that way. Thank you for al the time it took to record, edit and upload this.
    Excellent tutorial, no fluff, just content. And you went slow enough for a beginner. I'll be playing with the new shader editor way more in the future.

  • @poggarzz
    @poggarzz ปีที่แล้ว +5

    This one's going to my playlist for sure!

  • @jeffreystephens2658
    @jeffreystephens2658 8 หลายเดือนก่อน

    YES! I've been waiting for this! This is my project today! I'm putting this grass in my game. :D

  • @bodhiiii
    @bodhiiii ปีที่แล้ว +4

    Man, this looks gorgeous! I am currently occupied with the Godot Wild Jam, but I will definitely return to this video and try it out!
    Nice work and thanks for the tutorials!

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +1

      Thankyou so much and good luck in the Jam!

  • @taggy87
    @taggy87 ปีที่แล้ว +3

    Great tutorial! One tip to speed up the grass-patch-making:
    Object mode, select blade of grass and add an array modifier with count 10-16 depending on how many times you want to duplicate. Set the xyz factor to 0 and apply. Then go to edit mode, select the grass -> right click -> seperate by loose parts. Really nice if you need to duplicate more than 3-4 times.
    You can then go to object mode, select all blades, object -> transform -> randomize transform and play with the values. Beats having to place everything by hand!

  • @abranubes9571
    @abranubes9571 2 หลายเดือนก่อน

    Thank you! Great tutorial, clear and extensive.

  • @SETHthegodofchaos
    @SETHthegodofchaos 7 หลายเดือนก่อน +1

    Great tutorial!
    edit: Although it falls apart toward the end unfortuantely. I wanted to see actual wind (the noise texture) moving across the grass field. Instead its more as if each piece of grass moves randomly independently. I would love a followup to this video on more complex wind-grass interactions.

  • @user-fe6ic6zw9s
    @user-fe6ic6zw9s ปีที่แล้ว

    Bro you amazing! I was looking for fresh tutorial and just found yours. I would love to see deformation of the grass.

  • @indieology7336
    @indieology7336 ปีที่แล้ว

    Awesome tutorial! Thank you for your hard work on this!

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +1

      Thankyou! I spent so long practicing getting grass I was happy with

  • @dmytrogladkyi
    @dmytrogladkyi ปีที่แล้ว

    Really great explanation of grass shader ❤❤

  • @centigames
    @centigames ปีที่แล้ว +2

    Such a good tutorial, step by step, easy to follow! Thank you so much! I would really like a grass displacement tutorial for characters walking over it!

    • @Weebo04
      @Weebo04 5 หลายเดือนก่อน +1

      yessss we neeeddd this so muchhhh i love the detail of the node coverage, extremely informative!!!

  • @majestic07
    @majestic07 ปีที่แล้ว

    Great explanation - thank you! I'd love to see a displacement video.

  • @vellengaming
    @vellengaming ปีที่แล้ว

    Great video! Displacement would be great here, it was the first thing I thought of towards the end of this tutorial! Another question I have is, do you take tutorial suggestions so long as it's something decently small?

  • @rizekishimaro
    @rizekishimaro 10 หลายเดือนก่อน

    thank you for the detail explaining now i can move on to next step

  • @sethwhite4635
    @sethwhite4635 ปีที่แล้ว

    Thank you! I look forward to your videos

  • @TheLastPhoen1x
    @TheLastPhoen1x 8 หลายเดือนก่อน

    Awesome stuff. Just one "workflow optimization" tip, you don't have to decompose input (UV), just click on the little downward chevron next to the eye icon to get the output of channels separately.

  • @flexy06
    @flexy06 ปีที่แล้ว

    Wow thank you! I would really appreciate a video about a player displacing the grass :)

  • @sigitsatriap6505
    @sigitsatriap6505 10 หลายเดือนก่อน

    thanks for make this tutorial ! love it

  • @holidayexplanation4505
    @holidayexplanation4505 8 หลายเดือนก่อน

    Great tutorial! Seeing how to displace it would be great too

  • @luismedina4904
    @luismedina4904 ปีที่แล้ว

    Awesome tutorial, didn't know multimesh exists, thanks!

  • @dbatdev
    @dbatdev ปีที่แล้ว

    Excellent! Thank you.

  • @jeffreystephens2658
    @jeffreystephens2658 9 หลายเดือนก่อน

    That looks great!

  • @Danny-uo7hk
    @Danny-uo7hk ปีที่แล้ว +2

    Displace the grass under would be really cool thats the only thing missing from this grass to be perfect right now. Would also be really cool if you could make more tutorials on other foliage such as trees and bushes in a simular styple to this would also like to see a tutorial should how to use scatter with this grass and other foliage you have made.

  • @deadlykitanu
    @deadlykitanu 10 หลายเดือนก่อน

    This is amazing. Please do the grass displacement tutorial :)

  • @iatheman
    @iatheman 8 หลายเดือนก่อน

    Just learning gamedev in 3D and this is way too complex 😁, great video!

  • @sanyi9667
    @sanyi9667 ปีที่แล้ว +1

    man just take the time to appreciate that people can watch this on 480p and still see everything - great attention to details

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +2

      Glad that pays off! I spend so long zooming in on everything 😅

    • @sanyi9667
      @sanyi9667 ปีที่แล้ว

      @@BramwellWilliams next time you can just leave it - you used a nice resolution so it works well without zooming as well, I think

    • @rameynoodles152
      @rameynoodles152 ปีที่แล้ว

      Well it sure is nice when I watch on my phone

  • @valkyrienyanko1772
    @valkyrienyanko1772 ปีที่แล้ว

    Thank you for this.

  • @lichtmond1482
    @lichtmond1482 ปีที่แล้ว

    Thank you !!

  • @Kyodaina_
    @Kyodaina_ ปีที่แล้ว

    Right on schedule 👍

  • @NewFunnyAnimations
    @NewFunnyAnimations 11 หลายเดือนก่อน

    Thanks for help!

  • @adamcampbell9806
    @adamcampbell9806 9 หลายเดือนก่อน

    another big help would be showing how to ensure the grass always points relatively upward, even when it's propagated on a sloped surface

  • @spielville5087
    @spielville5087 ปีที่แล้ว

    Nice. Could you explore a good (e.g. quick) workfow for creating and texturing a terrain in Godot 4?

  • @JOZUWE
    @JOZUWE 4 หลายเดือนก่อน

    thank you mate

  • @jaredchapman5496
    @jaredchapman5496 ปีที่แล้ว

    Thanks!!!😃

  • @walikour444
    @walikour444 ปีที่แล้ว

    Great tutorial ! and yes i would like a video about displacing the grass with the player, also is it possible to instance the multimesh on the terrain with vertex color instead of seperate mesh ? Thanks.

  • @nyuh
    @nyuh ปีที่แล้ว

    whoa !!
    just in time for totk XD

  • @adamcampbell9806
    @adamcampbell9806 9 หลายเดือนก่อน

    a little late to this video but I would love to see displacement too. I'd also like to see how to make the wind effect look more like a sweeping wind over a prairie

  • @nunyabusiness9433
    @nunyabusiness9433 ปีที่แล้ว

    Another vote for displacement. You've demystified shaders a whole lot for me with this one video.

  • @Danny-uo7hk
    @Danny-uo7hk 5 หลายเดือนก่อน

    This looks really good just wish it was interactive as well

  • @void9853
    @void9853 ปีที่แล้ว

    Thanks you great tutorial! Please make a tutorial underwater shader 🙏

  • @vila4480
    @vila4480 7 หลายเดือนก่อน

    +1 request for displacement underfoot! Great tut

  • @VoylinsGamedevJourney
    @VoylinsGamedevJourney 5 หลายเดือนก่อน

    Grass is so underrated but can have such a big impact on a game ^^

  • @Danny-uo7hk
    @Danny-uo7hk ปีที่แล้ว

    This looks like somthing from unreal engine its looking really good

  • @owenlloyd2528
    @owenlloyd2528 11 หลายเดือนก่อน

    Thanks :)

  • @AdamJensenReal
    @AdamJensenReal 6 หลายเดือนก่อน

    Thats really good, thanks. Now I need to find a way to place patches of grass on specific spots maybe with some mask and my Terrain is not leveled there is an elevation. Any advice for that? I have 1 huge terrain as one mesh.

  • @lichtmond1482
    @lichtmond1482 ปีที่แล้ว

    Would love to see grass displacement underfoot tutorial !!

  • @maniksharma9736
    @maniksharma9736 ปีที่แล้ว

    Visual shaders are cool.

  • @me2beats313
    @me2beats313 ปีที่แล้ว

    Thanks, really helpful tutorial! BTW my like is #300

  • @connorlawless235
    @connorlawless235 4 หลายเดือนก่อน

    Definitely interested to see how to deform this when a character moves over
    But also, is there a way to apply this to a gridmap? I tried, but of course, the grass isn't a mesh, so it's not being picked up in the mesh library

  • @Smaxx
    @Smaxx ปีที่แล้ว +2

    I think you forgot to enable "Seamless" on the noise texture. Might not be noticeable depending on the other params, but I thought might be worth mentioning.

  • @Danny-uo7hk
    @Danny-uo7hk 9 หลายเดือนก่อน

    please make tutorial for grass displacement

  • @dominiksvagr7531
    @dominiksvagr7531 2 หลายเดือนก่อน

    I completely missed the populate surface feature on multimesh instance node, thanks. I no longer have to use my own code to add instances on mesh.

  • @user-iy8xx3hw6n
    @user-iy8xx3hw6n ปีที่แล้ว

    a very cool tutorial, is it possible not to have a big lesson where the texture (rgba mask) of the distribution of grass, stones, earth is used instead of the texture of noise?

  • @SETHthegodofchaos
    @SETHthegodofchaos 6 หลายเดือนก่อน

    What causes the line through the middle and the different orientation of the grass field? It seems the coord values are all offset by *-1?

  • @shmelly7275
    @shmelly7275 ปีที่แล้ว

    :O TOUCH THAT GRASSSSSSS!

  • @AnKlMa
    @AnKlMa ปีที่แล้ว +3

    Could you do a video on how to only render the grass in close distance to the player and not render the grass blades off-camera, in order to use it in open fields without too much performance loss.
    Bending the blades underneath the player would also be nice.
    Thanks for the video

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +4

      Im still working on that but definitely will when I have a solid system!
      This multimesh approach is what you will want for the high quality close grass, just need to play around with methods to load them in seamlessly

    • @user-un2vb8mr6e
      @user-un2vb8mr6e 11 หลายเดือนก่อน

      @@BramwellWilliams I saw a youtuber talking about using separate multimeshes as chunks like in minecraft so that it can minimise the draw calls while still only rendering the chunks of grass that are visible

  • @Crisisdarkness
    @Crisisdarkness ปีที่แล้ว +2

    I saw a short review so far of your video, I will have to do this soon, it looks very interesting, and I like your way of teaching, it's very complete, I'm grateful, you are very talented, this looks so cute. I have a question, your course contain everything you mentioned in that article?, I say it because of what you have planned to add, will chapter 4 be complete soon? Can this course be paid with PayPal?, thank you, It's very safe that I buy your course, it's worth it

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว

      Heya, thankyou so much! Chapter 4 weill be complete soon everythings in there except for the sound section which is next on the agenda ^^ - I hadn't actually looked into paying for it with Paypal I will do some investigating 😊

  • @dmytrogladkyi
    @dmytrogladkyi ปีที่แล้ว

    Please make a tutorial of grass deformity when the character steps on it. ❤❤❤

  • @renji-hjk
    @renji-hjk ปีที่แล้ว

    Finally i can make some grass to my chars touch

  • @ganf
    @ganf 2 หลายเดือนก่อน

    EDIT: I managed to find the scale. It's right there in the Meshinstance settings when you first create your meshinstance. Sorry that I keep commenting and editing and deleting stuff.
    Is there a way to scale the grass down to a usable size? It's way to large for my project. When I scale the grass scene it doesn't effect the meshinstance3d. When I scale the meshinstance 3d, I just get a tiny little patch of grass, that doesn't cover my object.

  • @njdarda
    @njdarda ปีที่แล้ว +1

    i've watched a LOT of grass tutorials but this his the best one (especially in Godot).
    I wonder - is there any advantage for the initial model to contain multiple blades of grass? Wouldn't it be more flexible to have it only contain one blade, and let the multimesh and vertex shader control the amount and the positions of all blades individually? Would that be less performant?

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +3

      Thankyou! The main advantage to having a clump is guaranteeing a certain area will have a certain number of blades, if we just had one blade we are much more at the mercy of how the multimesh distributes the grass, but that could be solved by having a script spread the grass blades out!
      Performance should be the same if you have the same total blades of grass afaik as the mesh is joined and the multimesh does everything in one draw call ^^

    • @njdarda
      @njdarda ปีที่แล้ว

      @@BramwellWilliams thanks!

  • @SETHthegodofchaos
    @SETHthegodofchaos 7 หลายเดือนก่อน

    Is it better to create *multiple blades* of grass in the model and instantiate a *few* models or is it better to just have *one* blade of grass and more models instantiated? Or should there be no difference?

  • @darknetworld
    @darknetworld ปีที่แล้ว

    I guess it a lot of work. I wonder if the using some wind direction or fire so grass turn black like in the link game from Nintendo.

  • @ruru9731
    @ruru9731 ปีที่แล้ว

    Could something similar be used for fur on a character?

  • @SETHthegodofchaos
    @SETHthegodofchaos 7 หลายเดือนก่อน

    Why did we have to do -1 to our UV? Did we setup the export wrong and should the bottom of the grass be at the top instead?

  • @ivensauro
    @ivensauro 11 หลายเดือนก่อน

    is there a way for putting input on the shader from the code?
    for increasing the vector3 multiply when the player are on the area, making a effect that the player makes impact on the grass when moving

    • @ivensauro
      @ivensauro 11 หลายเดือนก่อน

      ok, the next video on youtube recomendation have a way for make a interactive grass.
      never touched on godot, just seeing some tutorials for fun

  • @YannAbdel
    @YannAbdel ปีที่แล้ว

    Please can you make a tutorial on making stylized trees in godot

  • @sanketsbrush8790
    @sanketsbrush8790 11 หลายเดือนก่อน

    how to crush grass under foot ? maybe by using proximity fade node.

  • @admazzola3569
    @admazzola3569 หลายเดือนก่อน

    idk bro i just write my shaders in WGSL and its pretty simple . ESP because now LLMs can assist with written text shaders but not with node based ones

  • @ethannorthover9507
    @ethannorthover9507 3 หลายเดือนก่อน

    i would like to see the grass deform around the player!

  • @PH0EN1XD
    @PH0EN1XD 8 หลายเดือนก่อน

    SO if i got an island Mesh, uncoloured, but i want the grass to be only on the bottom of my mesh Island, I need to create somehow the bottom part of my Island as another mesh ? If I select my Mesh, the grass will populate the whole Island if I understand it correctly.
    So any suggestion how to populate world where there are not planes, but uneven surfaces ?

  • @SETHthegodofchaos
    @SETHthegodofchaos 6 หลายเดือนก่อน

    I have an issue when I look straight down at the grass that it turns very dark. Why is that? Did I mess up on my end or does it happen for you too?
    edit: Strangely, only when looking into the positive x and z axis.

  • @binbunYT
    @binbunYT ปีที่แล้ว +1

    Hey. Extremely great tutorial. I have one problem though. I have a directional light in my scene. Whenever I rotate it to an angle, some of the blades of grass turn darker than the others. If I remove the VectorCompose (0,1,0) from the Normal Map slot this problem goes away, but when I do that all of the grass get darker when looking from the direction of the directional light. I see that you don't have this problem, so I'm not sure where the problem comes from. Definately something to do with the normal thing

    • @lifeartstudios6207
      @lifeartstudios6207 ปีที่แล้ว

      it's better to point the meshes normals up in blender instead of in material.

  • @jaddd
    @jaddd 11 หลายเดือนก่อน

    nice grass thank you but can u make somthing like this video in godot
    Fluffy stylized trees tutorial, using quadmesh-to-billboards shader in Unity
    I would be grateful

  • @drale2k
    @drale2k 9 หลายเดือนก่อน

    Awesome tutorial, please more. Btw i think it’s pretty nuts that the values get lost when you change scene. This sounds like an awful workflow

  • @lifeartstudios6207
    @lifeartstudios6207 ปีที่แล้ว +1

    instead of pointing normals to up in material, it's better to do that to your mesh in blender. Otherwise, other systems won't play well with your grass.

  • @arturertel
    @arturertel ปีที่แล้ว

    i tried to recreate it for a 2d top down game, unfortunately i didn't succeed completely :D all grass blades move at the same time.

  • @n3y
    @n3y 4 หลายเดือนก่อน

    would it be possible to have this on procedurally generated meshes?

    • @n3y
      @n3y 4 หลายเดือนก่อน

      I mean how do games like botw seamlessly blend between rock surfaces and grass ones with the grass shader attached

  • @johnmeadow9579
    @johnmeadow9579 ปีที่แล้ว

    What kind of plugin you use to display button presses in Blender?

    • @BramwellWilliams
      @BramwellWilliams  ปีที่แล้ว +1

      this one! github.com/nutti/Screencast-Keys

    • @johnmeadow9579
      @johnmeadow9579 ปีที่แล้ว

      @@BramwellWilliams Thanks. Great Tutorial.

  • @luqal7112
    @luqal7112 ปีที่แล้ว

    Very nice but too similar color for all grass. Better add noise to the grass color for more variation.

  • @sanketsbrush8790
    @sanketsbrush8790 ปีที่แล้ว

    godot 4 have blender 3.3 lts support. no need of glb/gltf anymore.

  • @mil_klover375
    @mil_klover375 8 หลายเดือนก่อน

    Its seem not so optimalized

  • @SosumiInc
    @SosumiInc ปีที่แล้ว

    Thank you for this.