BotW STYLE GRASS TUTORIAL

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 71

  • @suchsneak3545
    @suchsneak3545 Год назад +8

    I went to go see if it would work in godot 4 but it's not working quite right. Do you know what I'd need to charge to get it back up and running?

    • @lonegamedev
      @lonegamedev  Год назад +8

      Hi, I made small changes to make it run with Godot4.
      Try godot4 branch from repo:
      github.com/lonegamedev/godot_botw_grass/tree/godot4

    • @suchsneak3545
      @suchsneak3545 Год назад

      @@lonegamedev thanks a bunch! ☺️

    • @sugimanjuara8195
      @sugimanjuara8195 Год назад

      @@lonegamedev thanks for share ! i try it and seems run well, however i try to export to android device but the grass it not showed, any advice ?

    • @BetaTester704
      @BetaTester704 Год назад

      ​@@lonegamedev I want to hug you for that

  • @Gdquest
    @Gdquest 4 года назад +56

    Subscribed! Looking really interesting, thanks for sharing.

    • @lonegamedev
      @lonegamedev  4 года назад +6

      Thank you so much for your work, it really helped me transition into Godot! Also, I just realized I haven't subscribed to most channels I love with this account. I will be correcting this, of course starting with your channel :)

  • @robertmouse3782
    @robertmouse3782 4 года назад +10

    I've been looking for a good grass tutorial for a while now. This is the best I've found by far and you've done a phenomenal job. Thank you for your contribution to the community.

  • @NeZversSounds
    @NeZversSounds 4 года назад +16

    Oh, this is amazing! I wanted to know how to do this for some time.

    • @lonegamedev
      @lonegamedev  4 года назад

      I'm really happy you found this helpful!

  • @armonj2296
    @armonj2296 4 года назад +4

    You are a saint

  • @BluePhoenixGames1
    @BluePhoenixGames1 4 года назад +4

    this is great, thanks for sharing! looking forward to see more from you

  • @sigitsatriap6505
    @sigitsatriap6505 4 года назад +1

    beautiful ! love it , subscribed

  • @artyomadev95
    @artyomadev95 2 года назад

    Hi! Big THX for your lesson! I implement it in my project and it looks stunning. Wish you good luck in your youtube channel.

  • @Lermer07
    @Lermer07 3 года назад +1

    Dude this is awesome. Subbed!

  • @NutyRiver
    @NutyRiver 4 года назад +1

    Incredible. Thank you sooooo much

  • @zetathix
    @zetathix 4 года назад

    This is a knowhow I'm looking for, thanks for sharing!

  • @tyreldelaney
    @tyreldelaney 3 года назад

    Great tutorial! May try to adapt this to 2D for my project. Would love to see more tutorials from you

  • @jhonnyjoestar1220
    @jhonnyjoestar1220 4 года назад +2

    Great bro!

  • @atikahrostam5778
    @atikahrostam5778 3 года назад

    thank you so much for this! 💖

  • @shikamarubh
    @shikamarubh 3 года назад

    Thanks. Looking forward for a terrain version.

  • @nov_flp
    @nov_flp 4 года назад +1

    That's exactly what I was looking for 😀

  • @EmotionalCapybara
    @EmotionalCapybara 4 года назад +1

    This is awesome

  • @eloibasiloi9129
    @eloibasiloi9129 Год назад +1

    hey i tried to copy what you did (im using godot 4) and everything works perfectly fine until that planter script attached for the grass nodes.
    apparently the export var is unable to be identified, could you help for a fix ?

    • @lonegamedev
      @lonegamedev  Год назад +1

      Hey, I just tested and it still works. Please use this branch:
      github.com/lonegamedev/godot_botw_grass/tree/godot4
      I guess I will merge with main branch, so there is no more confusion.

  • @nataliapiecea2302
    @nataliapiecea2302 3 года назад

    Thank you , I want to make grass for my game for some time

  • @fananimation7147
    @fananimation7147 Год назад

    Have problem with multimesh.set_instance_transform(index, Transform(basis,pos)) I get error parsing expression misplaced built-in type. Please help new to coding.

  • @lachlanburns4382
    @lachlanburns4382 3 года назад

    Very nice!

  • @shire7949
    @shire7949 4 года назад +1

    damn so useful, thanks

  • @1533U
    @1533U 4 года назад +1

    awesome

  • @shire7949
    @shire7949 4 года назад +1

    Can u help me please by maybe giving me an idea
    Can u use some type of noise function to only spawn the grass at certain 'patches'?

    • @shire7949
      @shire7949 4 года назад

      How would u go about that ?

  • @leogil5933
    @leogil5933 3 года назад

    Sure Beuatiful

  • @MrHaloisthebomb
    @MrHaloisthebomb 3 года назад

    that is fucking beautiful

  • @TheMoye
    @TheMoye 3 года назад +1

    This video is really interesting! The effect is amazing. 👍
    I have one issue though : if I apply this shader to an object that is moving, the grass looks frozen on the screen, as if it is not following the movement of its parent.
    Wouldn't that come from the use of world coordinates rather than object coordinates? Any idea how to fix this ?

  • @cidneyowen4067
    @cidneyowen4067 Год назад

    I have a question. When I put my script in the MultimeshInstance nothing is showing up. I was wondering if you have any idea why?

    • @lonegamedev
      @lonegamedev  Год назад

      I'm assuming you are working with v1 version for this video.
      Which script did you attach? It should be `planter.gd` (or your custom equivalent).
      Also, you might be missing a MultimeshInstance property: GeometryInstance -> Geometry -> MaterialOverride (probably this).

  • @milkboyG
    @milkboyG 3 года назад

    Hey thanks for the amazing tutorial. Is there any way to use this shader on a mesh made in for example blender instead of making it with the script? Been trying out to use this with scatter, but so far only got the mesh pointing in one direction and not having the gradient, but only the bottom color showing up. Any ideas what might not be working in this case?

  • @D0vahkiinGames
    @D0vahkiinGames 3 года назад +1

    Hello buddy, is there any way to make the grass fit in a terrain?
    THANKS FOR THE VIDEO!!

    • @lonegamedev
      @lonegamedev  3 года назад +1

      Sure, it is possible to make it match the terrain. One method I have in mind requires using terrain mesh geometry directly. It goes something like this:
      1. For each triangle, you can compute the area.
      2. The area will be used against some threshold (arbitrary number) to determine if we can plant a blade of grass in this triangle.
      3. If so - compute triangle centroid, and the face normal, and add grass instance using position (from centroid) and rotation (from normal). Then subdivide the triangle (this doesn't mean create new geometry just store it in some temp structure for calculations).
      5. Repeat until no more subdivisions possible.
      This will make blades of grass follow the curvature of the terrain, and on top of that planting will be more even and easier to control with a single threshold value. This value can be also set/modified by a value encoded in vertex color or texture (variable grass density).
      I won't promise I will make such follow up video, but perhaps.

    • @D0vahkiinGames
      @D0vahkiinGames 3 года назад

      @@lonegamedev Hm, I'm not very good at shaders yet, is there any way I can do it using the "populate surface" option on the grass node?

    • @D0vahkiinGames
      @D0vahkiinGames 3 года назад

      @@lonegamedev Where did you learn how to do all that? xD I haven't found any tutorial of this graphic quality before.

  • @davidmurphy563
    @davidmurphy563 4 года назад

    Huh, you put ints and not floats into your vec3 for the test ALBEDO and it didn't throw an error. Mine bites my head off every time I put 1 instead of 1.0 and I still do it every time!

  • @kuzuru
    @kuzuru 3 года назад +1

    Can I somehow make hills (terrain) from this CSBox and place grass on it?

    • @SoftBreadSoft
      @SoftBreadSoft 3 года назад

      not as it is, it doesn't do anything with the csgbox. I was attempting earlier to convert it into a 'normal' shader (that works on any multimesh not just with specific UV etc), which could then be placed procedurally like with Scatter, but wasn't having fun. I'm not big brain enough :)

    • @kuzuru
      @kuzuru 3 года назад

      @@SoftBreadSoft meh... I wanna make smth like not plain terrain... And also I wanna make grass generation on some specific places on this terrain. I'm also not big brain in Godot, so I have troubles with it :D

  • @jitspoe
    @jitspoe 3 года назад

    Is that noise function faster than a texture lookup?

  • @Hemoplaguer
    @Hemoplaguer 4 года назад +2

    What's the rules for using this in our own projects?

    • @lonegamedev
      @lonegamedev  4 года назад +2

      It is an MIT license. You can use it commercially in your projects.

  •  3 года назад

    hi! awesome tutorial, thanks a lot. is there a way to make the multimesh instancer only instance grass in a radius around an object, say, the player, instead of the whole mesh? that way i could use this on a large terrain without bogging down performance.

    • @lonegamedev
      @lonegamedev  3 года назад +4

      Thanks, happy to help.
      It would be a bit more tricky (since this is the simple tutorial - not a real solution) but possible.
      You could overlay your game world with an AABB grid (I mean in computation sense, not in sense of creating scene nodes). Think "snap to grid" algorithm.
      Each grid cell would have exactly the same size, unique seed for RNG, and perhaps a varied number of blades of grass to generate.
      You could compute which cells are around the player (this is pretty simple math - it might even be part of Godot's math), and plant grass for just those cells using appropriate seed (so if you revisit the same cell it would look exactly the same).
      So you could have a finite number of instancers (planters), and just move them and re-plant for each grid cell, as you move through the world.
      Also, it is a pity Godot 3 doesn't support Compute Shaders or Geometry Shaders - cause you could write planter script as shader code, which would be a ton more efficient. Oh well, we need to wait for Godot 4 for that.
      I know this might be a bit vague but I hope it gives you a general idea.

    •  3 года назад

      @@lonegamedev thank you!! your answer was way more detailed than i expected :) i'll investigate this solution. i also found a solution with shaders in godot 3, but it needs a heightmap to work. it shouldn't be too hard extracting a heightmap from my modeled terrain mesh in blender, though. thanks a lot for your time!!

    • @am01013
      @am01013 3 года назад

      @ How did it go? What was the best solution?

  • @ironbard4901
    @ironbard4901 8 месяцев назад

    Any chance of you reworking this tutorial for godot 4?

    • @lonegamedev
      @lonegamedev  8 месяцев назад

      Hi, yes it is planned, but I still haven't got back to recording videos.
      If you are just interested in working version you can grab it from: github.com/lonegamedev/godot_botw_grass
      Proper Godot 4 version should take advantage of compute shaders - I have played around with it, but this is still not fully ready.

  • @Lucas-gg9yb
    @Lucas-gg9yb 3 года назад

    how can i mark where i want grass and where i not?

    • @lonegamedev
      @lonegamedev  3 года назад +1

      This will be one of the focus points of part 3. Until then, you can watch part 2, because it is about mesh driven generation. Then it is just matter of either sampling value from vertices or texture. Another way would be to limit based on surface angle, which is useful for very steep surfaces.

    • @Equilix_Doom
      @Equilix_Doom Год назад

      Don't suppose you ever got around to that part 3 at all? Or any ideas on how to remove/dampen grass around certain areas?@@lonegamedev

  • @gyanaprakash_maharana
    @gyanaprakash_maharana 3 года назад

    How to use it in unity. Pls make a video. Pls.

  • @supermomofficial1556
    @supermomofficial1556 4 года назад +1

    Wow.. I like the intro more on diamond shape. It give me an idea how to make my intro also a very interesting one. Remz mixtv

  • @tonyfan841
    @tonyfan841 3 года назад

    This is awesome, thank you! But this doesn't scale well in Godot. Gdscript is very slow to create grass instances. I have a test scene with a 40Mx40M grid, 1.2 million blades of grass doesn't even cover this area well. And it's extremely slow at loading. Performance leaves something to be desired, too.

    • @NocturnalMorning
      @NocturnalMorning 3 года назад

      Kind of late to reply, but if you haven't already looked at it. There's a godot demo for threaded grass that fixes a lot of the performance issues with this. Coincidentally, the code looks a lot like this tutorial, so I think that's where the tutorial got the material from. The tutorial has better noise though, so I would definitely use the noise from this. At least that's my opinion.

  • @chuutculao2266
    @chuutculao2266 4 года назад +1

    thanks nhé

  • @Dura_kson
    @Dura_kson 4 года назад

    Yo wtf xD it didn't work, godot still has problems with the setter function 😭 you said just ignore it but I guess it shouldn't be ignored tho xD

    • @Dura_kson
      @Dura_kson 4 года назад

      Error(11,1): The setter function isn't defined... 😖

    • @titman4645
      @titman4645 4 года назад

      ​@@Dura_kson try to rewrite the func set_ , the set_width didn't worked for me and i just remove it and write it again and it worked

  • @eeeeeeeeeeeeee49
    @eeeeeeeeeeeeee49 3 года назад

    WHAT

  • @egartwin4246
    @egartwin4246 4 года назад

    ninja ni khela egar

  • @michalfeher1177
    @michalfeher1177 Год назад

    I no understand this shader because math.