Unity | I made an Interactive Grass Shader + Tool

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

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

  • @MinionsArt
    @MinionsArt  3 года назад +30

    So, this video is pretty old now, I just wanna add that Compute Shaders are better to use than Geometry Shaders, because they are supported on more platforms
    I've got the compute shader versions here :
    BIRP: www.patreon.com/posts/compute-shader-53587750
    URP: www.patreon.com/posts/54164790
    I'll make a new video for the compute version, there are some more improvements coming to it too :)

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

      the links in Pastebin do not work

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

      cant wait! I am not experienced enough follow the tutorials in the links above. I tried but ended up stuck.

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

      by the way, do you have any plans for uploading your shaders into unity asset store?

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

      Hey, I've pasted the 'GrassComputeScript', 'GrassPainter', and the 'ShaderInteractor' scripts in my assets folder, and the 'EditorGrassPainter' script inside Assets > Editor. And then, I added the GrassPainter on an empty gameobject. After I tried making a material from the shader, I get this error:
      'tex2Dproj': no matching 2 parameter intrinsic function; Possible intrinsic functions are: tex2Dproj(sampler2D, float4|half4|min10float4|min16float4)
      Compiling Fragment program with UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH _SHADOWS_SCREEN
      Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
      I'm working with BIRP here. Is there anything I'm doing wrong? How do I fix this? The shader looks super cool and perfect for my tiny project and would love to put this in there. Thanks in advance :)

    • @ItachiX9
      @ItachiX9 2 года назад +2

      In GrassComputeScript I get shaderinteractor missing error
      Edit : nm I was missing shader interactor file. Didn't saw it on ur patreon page at first

  • @MinionsArt
    @MinionsArt  4 года назад +60

    So at this point the shader is for the Built-in renderer, I haven't looked at it in URP yet, but it should be pretty easy to convert, I will update this post when I do :)
    Edit: It is done! Here is the URP version : www.patreon.com/posts/geometry-grass-47447321

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

      Love you content mate, learnt so much from following what you make available for the general public!

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

      How do I actually get the shader into a unity project? Do I just copy and paste the shader code into a new shader? I tried to open one but it only opens up in shader graph.

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

      When I add your URP version, the shader throws the error "'GetAdditionalLight': no matching 3 parameter function", why's that? Please help i want to use so bad your shaders in my game, they look awesome

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

      @@anth378 Just remove the 3rd parameter in that function, it's half(1,1,1,1) or something. (Means you're using an older version of URP than me)

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

      @@MinionsArt yeah, I'm using the one from 2019.4, I'll try that, thanks!

  • @benjaminreinsch392
    @benjaminreinsch392 Год назад +2

    wow, I am absolutely speechless. You are a blessing, really. I only just started making my own games with unity and this is like black magic to me. Thank you so much for the hard work and taking all this time to explain how to use it.

  • @octobeanx
    @octobeanx 3 года назад +43

    This looks so similar to the grass in Genshin Impact, I love it, thank you so much for sharing!!! ❤️

  • @rodmileski
    @rodmileski 2 года назад +2

    Gotta say, you channel and work deserves a lot more visibility than it currently has here in RUclips. Your game looks fantastic and your tutorials are very enlightening. All the best :)

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

    So unfortunate that I could not discovered your channel before. It is not just the tool but sharing it freely with the people is also amazing. I'll follow your videos from now on. cheers & take care

  • @mikeohc
    @mikeohc 3 года назад +7

    This is amazing, I still refer to your tutorial from time to time. I also want to thank you for providing the break down of the process!

  • @Dertres
    @Dertres 3 года назад +11

    crazy how this is not a default feature, very cool!

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

      But there are default feature in Unity - Grass.. when you painting on terrain, you can draw plants, grass and etc and change its density and also its supports lods and changing of quality settings

  • @AntoCharles
    @AntoCharles 4 года назад +5

    Wonderful job! Shaders hurt my brain awesome of you to share this with others :D

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

    Wow, this is incredible. I've been searching this for a long time and you made it perfect. Thanks

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

    This looks simply wonderful. Thank you for taking the time to share it all!

  • @MKHideOut
    @MKHideOut 2 года назад +1

    Im mind blown by this... Im going to be using this alot now! Thank you!

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

    Thanks for sharing Joyce. The game is turning out great btw, can't wait to see more

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

      Thanks! The game is going slow, but slow progress is still progress :P I'm planning on a dev vlog on Astro Kat soon.

  • @AniketSingh-hr8mi
    @AniketSingh-hr8mi 4 года назад +3

    this looks so awesome. keep up your work

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

    Wow, that was phenomenal! Very nice tool! I really appreciate you sharing this, thank you! Thank you!!

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

    This helped me so incredibly much, I've been seeing your Patreon all over and am seriously considering subscribing because you teach game dev so well!! Thank you for the amazing tutorial, I look forward to seeing more!

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

    Thank you for your Grass Shader! It's really helping a lot

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

    Amazing work! Thank you Joyce!

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

    Thanks for this!
    I'm waiting eagerly to play your game

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

    Thanks MinionsArt The best grass tutorials for open world game.

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

    Didn't work with URP, but then I saw a hyperlink to the URP version on your post, works great! Thanks for sharing!

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

    This is really AWESOME ,you're the BEST!!

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

    That's,Impressing.Great Work!

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

    Wow! This really is a great and helpful tool. Unity should implement this in the engine, if you ask me. Or at least it should be a package. Thanks for sharing!

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

      But it was already implemented in terrain - Check Unity Terrain Grass

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

      @@HUQAFU the unity terrain grass is very basic and does not include this type of interactivity with grass

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

    This is just what I needed, you are the best!!!!!!

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

    wow, this is absolutely incredible! you are a genius!

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

    OMG! Thank you. It's most beautiful grass I ever seen.

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

    thats insane!!!! thank you so so so so much! its amazing

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

    Thank you so much. This saves me both time and money !

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

    This is such an amazing tool, thank you so much just what I've been looking for :)))))

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

    Wow... thank you very much for this. For somebody starting out in Unity this is great. Thank you for sharing this for free... as soon as I got some money I will surely join your patreon. Great work. Thx again :D

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

    Gooooooooooood Work, i like that, you've worked hard for the community thank you

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

    This is amazing. Thank you for showing it off!!

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

    God bless you!. Thank you so much!

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

    Its perfect!! Great job!

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

    Thanks! the grass looks very cool :D

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

    Amazing work once again

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

    You are AMAZING! this is such a cool tool! Thank YOU!

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

    Wonderful work ! Thank youuuuuuu

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

    OMG THIS IS SO AWESOME THANK YOU!!!! 10 / 10

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

    Wow, this is great!

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

    Thank you so much for this!

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

    Thank you for the tutorial! it make my game look nice!

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

    Thanks! Its very useful thing!

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

    Thats awesome! I'll have to check it out! Subbed!

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

    THIS IS AMAZING! ❤️❤️✨

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

    dude, it's awesome! thanks for scripts!

  • @c0s.
    @c0s. 2 года назад

    Really nice grass shader, very cool!

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

    Amazing video! I love you!

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

    perfect grass for the game im making, thank you so much for this wonderful tool!!!

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

    Wow!, awesome tool!, and looks great!

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

    Thank you so much!

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

    Outstanding work! 🤤

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

    You are very talented!

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

    Amazing work once again >3

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

    Amazing work, for real.

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

    Thanks SOOOO much I looks SO good!

  • @matteoburzi9016
    @matteoburzi9016 2 года назад +1

    there is a method to incrase the brush size more than 10?

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

    Simply amazing!

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

    Wow...Thx your work!!! 👍

  • @ORYX_DEV2
    @ORYX_DEV2 10 месяцев назад

    wow that was really cool 👍

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

    Thank you so much! Is it possible to make the grass not react to light? Unlit?

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

    Thank you very much! Love ya!

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

    best grass I have ever seen in any game.

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

    really really really really good

  • @Messi-rw9ng
    @Messi-rw9ng 3 года назад

    Amazing! Thanks for sharing!!!

  • @457Deniz457
    @457Deniz457 4 года назад +1

    Wow rly nice, thanks ! :)

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

      Thanks! Have fun with it.

  • @Chris-tv2kp
    @Chris-tv2kp 3 года назад +1

    When I try to do this and paint it just paints tiny orange dots and it is nothing like the video. It may have something to do with the material because the material icon is just a black circle while in the video it’s the icon of grass.

  • @cheimaataou4711
    @cheimaataou4711 3 года назад +5

    Hi ! Do you know How could we use it in HDRP ?

  • @arthurc263
    @arthurc263 3 года назад +7

    Hi ! Nice work :o ! Is it really impossible to use it in HDRP?

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

    Looks amazing, i don't know what else to say.

  • @MegaXDBrasil
    @MegaXDBrasil 2 года назад +1

    It's bugged... If i press Ctrl+Z Destroy the script lol, and i need to put script again

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

    牛逼!学习了!感谢大佬。

  • @straven-sc
    @straven-sc 3 года назад

    Great code and great content thx for the free education ❤️

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

    Amazing Work .. Well Done ..

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

    you´re my HERO!
    i realy will gett it and put your name (or some reference) in some place on my game ....

  • @Moyse3333
    @Moyse3333 3 года назад +18

    This is actually too good to be free, you are great, keep it up

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

      please can you share code for auto-generate

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

      having the same problem! can you please guide me if it was solved for you!!! please

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

      What I did is I saved the mesh what I generated with the Grass Painter script, and used that mesh in my prefab. Also this is a pretty good shader, thanks for sharing

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

    great job

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

    thank you for share

  • @kibrjr
    @kibrjr 3 года назад +2

    How it can be compatable to HDRP? Thx for now

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

    Love your videos

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

    love the video keep it up

  • @rocksalt-studio
    @rocksalt-studio 3 года назад

    Great tool, thanks

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

    Does anyone know how to make this react to lighting like night and day.

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

    you are the best thankyou❤❤

  • @jayk.7622
    @jayk.7622 3 года назад

    I had a problem where when using the grass on land made with a poly brush would make the grass just place in their air, for me I fixed that by deleting the mesh collider of the poly brush made terrain(selecting the terrain then going into inspector and then right-clicking the "mesh collider" and clicking "remove component") and re-adding it(in inspector go to the bottom under all ur components and click add component and search and add "mesh collider"). I think the mesh collider goes back to the original terrain you started with if you mess with the scale(scale of the terrain, not the grass shader) or something.

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

    AMAZING!

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

    You are AWESOME

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

    Thanks to you, I finally got out of the terrain.

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

    Great tutorial but it doesn't work for me. I've downloaded the "GeometryGrassPainter" script and put it in the Assets folder. I then downloaded the "GrassPainterEditor" and at first I put it inside the Assets/Editor folder but the brush circle doesn't appear and I cannot paint the grass. Then I put the "GrassPainterEditor" right into the Assets folder and still it doesn't work. Can you help please? I'm using Unity 2020.3.

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

      Hello i have the same problem did you find a solution?

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

      @@horbita Are you using urp version for the shader

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

      Are you using urp version for the shader

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

    hi, everything appears to be working except the grass material is just pink, any idea how to fix this issue?

  • @darrenbeckett
    @darrenbeckett 10 месяцев назад

    This is awesome!
    But how can we make the grass Interact to multiple players or objects?
    We will need the shader to check for all GameObjects with the ShaderInteractor script attached.

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

    wow really good grass!!

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

    The grass says it is being put down, like the amount of grass on the plane is going up but the grass just isn’t there

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

    for some reason, when right clock, it does not paint and only shows this eye icon. Can you please help?

  • @kostjaaf
    @kostjaaf 3 года назад +2

    Hello, I really like your work and wanted to ask if it could be possible to set the grass bottom to a transparent color so the grass will blend into the ground? :)

    • @MinionsArt
      @MinionsArt  3 года назад +2

      Yep, thats possible, if you add a blendmode:
      Blend SrcAlpha OneMinusSrcAlpha
      under the first subshader.
      And then in the first fragment shader, before it returns final:
      float alpha = lerp(0, 1, saturate(i.uv.y * 3));
      final.a = alpha;
      It blends the very bottom bit :)

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

      @@MinionsArt thank you :)

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

    When i create a new material from my shader, there is a black dot, like there is nothing as shown in the video. please help

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

    Looks great ! Sadly it does not work for me. I get « Vertex or fragment shader requires ComputeBuffer at index 2 » error

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

    Hello ! I am using urp with the compute version of your shader and it works fine on my mac but the grass doesn’t show up on an ios build. Do you know why ? Anyways great job 👍

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

    sorry I want to ask why my shader Interator didn't work, I do the same step with you but it didn't work if I set more higher Interator strengh and Interator radius