Creating Simple Grass Shader in Unity URP

Поділитися
Вставка
  • Опубліковано 8 лют 2025
  • Ігри

КОМЕНТАРІ • 80

  • @yeahnope620
    @yeahnope620 10 днів тому +1

    You are a talented shader maker. I hope you continue making videos.

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

    I love the tutorials you make on your channel

  • @evertonbarbosa4922
    @evertonbarbosa4922 11 місяців тому +2

    I was thinking of doing magic to create a beautiful and optimized grass, after being exhausted in not finding tutorials explaining the most ideal way for me, But I found you. you helped me a lot, thank you very much friend, I hope you achieve the success you desire. because you deserve it!

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

    You are amazing!! Thank you so much for sharing these tutorials

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

    Your work is too good
    Thanks a lot

  • @王晓雨-j6v
    @王晓雨-j6v Рік тому +1

    thanks a lot! really high-quality tutorial with super straightforward explanations!

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

    finally found a good tut for grass shader
    THANKS A LOT

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

    Man, thousand thanks to you🙏 you are the best

  • @MintTree117
    @MintTree117 6 місяців тому +1

    Thank you!

  • @flowisle-bg3pi
    @flowisle-bg3pi Рік тому +2

    The tutorial was super! I managed to make pretty much similar result to HDRP with this tutorial.

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

    Thanks a lot! It is grateful and helpful!

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

    best tutorial on yt!

  • @planebreach
    @planebreach Місяць тому +2

    Great tutorial thank you. I have a question - what do i have to do in order to add a wind direction parameter to it ?

  • @luisr.f1655
    @luisr.f1655 8 місяців тому +1

    It's a great video, although there is something that was missing and that is that I was using a Unity package called "book of the dead" and for 3d models the "UV" node doesn't really work since it focuses on the positions of the texture so that the models were moving from the ground, I changed the "position" node and it works better, although this depends on the point of origin of the geometry (something that can be fixed in blender).

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

      Yep, this UV projection method is hard to use on tree models. I might make a video on creating tree shaders later.

    • @luisr.f1655
      @luisr.f1655 7 місяців тому

      @@paro456 By experimenting I managed to extend the shader so that it can be used as a simple 2D grass, 3D grass, plant and tree, even adding distance Fade and a controller that synchronizes with the "wind zone" component on direction and intensity. What would be great would be if instead of using the player's Vector3, a Render texture was used to register entities that can interact with the shader and have a cleaning time, with that the shader would be perfect.

  • @alxyslf445
    @alxyslf445 10 місяців тому +1

    讲的非常好,牛逼.

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

    My grass works perfectly, but sometimes it displays in a very dark color on one side, and I don't know how to fix it

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

      The problem is probably with the vertex normals. Try creating a Vector3(0,1,0) in the graph and connect it to the normal output.

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

    Thank you for your work! I have landscape tiles that spawn and de-spawn as the player moves. Would painting these prefabs on the terrain tile prefabs with unity poly brush work? Then, save it as a prefab to be spawned? Would doing this cause performance issues? EDIT - My terrain tiles are created in blender and do not use the unity terrain system.

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

    I feel like using Perlin noise without a sine wave could be better.

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

      Yep, that's a great idea. However, one thing to keep in mind is that the noise algorithm might involve a lot of loops, so it's better to use a noise texture.

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

      @@paro456 ya, a looping texture would look good and be very efficient

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

    Great Video. Thanks for sharing. At first I did not think it was working, the issue is my grass is mostly below the terrain; I noticed this when flying through scene. everything is working fine, it is just the placement. Must be how I exported? when i drag and drop the prefab, it is above the terrain. Any ideas? I turned off the Random tree height and set it to 2, turned off the random tree width; the grass is taller, but it is still below the terrain. Trees add to terrain correctly..

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

      When creating models in Blender, make sure to place the origin at the bottom of the model.

    • @skomakarna2684
      @skomakarna2684 8 місяців тому

      @@paro456 And at the world origin point

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

    question, my model went completely offset with its pivot, the pivot is at 0.0, but the model went WAAAAAAAAAY up

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

    Any way of doing this without relying on the texture UV's?

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

      You can achieve a similar effect by comparing the vertex position y value with the object's world space position y value.

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

      @@paro456 what nodes I need to use to achieve this? I'm making multiple plants with the same texture so the uv workflow doesn't work, thank you for the tutorial!

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

      @@iansantosart Perhaps I'll make another video explaining how I did it.

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

      @@paro456 I would deeply appreciate it! I managed to made it work by painting a black and white texture to show where I didn't wanted the plants to move and texture lod node

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

      ​@@iansantosart you can also use the second UV map to achieve a similar effect btw

  • @Berndr
    @Berndr 8 місяців тому +1

    this was amazing just one question, why spawn it as a tree rather than grass? also, would this be a way to render grass in the top-down games like Manor lords or Fartest Frontier, these games being top-down view have a large area of terrain showing yet it is littered with grass ... and it does not seem to affect performance ... thanks for the amazing video

    • @paro456
      @paro456  8 місяців тому +2

      Since these are models and not textures?
      Adding LOD to each individual grass model is not good for performance. If you want a large area of grass, I recommend grouping the grass within an area and then applying LOD to the group. This approach will better reduce the impact on game performance.

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

    Hi! great tutorial .i made my grass exactly like in the tutorial. But i am having issue with grass viewing . there is a white outline in grass when viewing from a distance. how to solve that. i don't have basics in shaders

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

      can you check that in your model also.

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

      changing ambient occlusion to 0 solve this. but it is changing color

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

      solved! changing alpha clip Threshold to 0.9 solved this. Thank u for the tutorial

  • @anonymous-3695
    @anonymous-3695 Рік тому +1

    i have a small issue, when i try add the world position near the end, to make them sway differently. it tends to distort the whole thing. instead of sway now it warps the image.

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

      Perhaps the wind is too strong, try to weaken it.

    • @anonymous-3695
      @anonymous-3695 Рік тому +1

      @@paro456 thank you for the video! could i add you on discord? maybe im doing something wrong. weakening did help, but it seems to effect it in the wrong way. the last step anyway. ive sent you a request :)

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

    Hi it's been a great video. But when I place the grass in the landscape, it is almost never visible. How can I solve it?

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

      Perhaps your grass objects are too small or position incorrectly, causing them to appear underground.

  • @Joseph-gv1zm
    @Joseph-gv1zm Рік тому +1

    I have a problem occuring. The more grass i am placing the more lag is occuring. I have setuped the lod. But shader is always running even when the player is far away. Its turning 300 fps to 4 fps. What to do.

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

      Maybe you could share some pictures or videos so I can help you better.

    • @Joseph-gv1zm
      @Joseph-gv1zm Рік тому +1

      I found the solution. A friend helped me. Instead of painting trees in the trees tab do it in the paint details tab. It worked. Thanks by the way. How can i contact you

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

      @@Joseph-gv1zm You can find my Discord in the description of my youtube channel.

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

    Mine wouldnt change size with terrain bruch 😕

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

      I believe you can find the relevant options in the terrain tool settings.

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

    Im having the issue of my entire model is lifted up and scaled when i add the wind effect

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

      Are you using Shader Graph?

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

      @paro456 yes

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

      @@jacineyatrakos3149 Can you provide some screenshots of your graph?

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

    I have this issue:
    once I finished your tutorial.. entire mesh become invisible.. not showing on scene or playmode
    but the mesh is still there when I check it from hierarchy.. when I hover mouse on material`s little screen
    ( inspector) where you see the texture.. it does seem to have animation but just wont show in game scene
    any advice?

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

      Do you have any screenshots of your graph that you can show me?

  • @skomakarna2684
    @skomakarna2684 8 місяців тому

    Hi! im wondering why my plants "base" is still moving although i added the UV--Split fix :O Help!

    • @paro456
      @paro456  8 місяців тому

      Could you provide a GIF or video to help me better understand this issue?

  • @bradpit1853
    @bradpit1853 8 місяців тому +1

    My shader keeps turning pink

    • @paro456
      @paro456  8 місяців тому

      Is the shader you used for your material the one you just created?

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

    when i added the wind the model just desepeared

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

      You can contact me through Discord, so I can better help you resolve your issues. paro456d

  • @zostawSuuuuba._
    @zostawSuuuuba._ 11 місяців тому

    how to make 3d model?! I spend 3 hours and I cant make a 3dmodel

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

      You can find some tutorial videos for Blender to learn.

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

    hey, i wanted to know if there is way i use c# to spread out my grass. right now, i can use for loop and some density variables to distrubute grass on a flat plane, the problem comes when there is a unever terrain, i was thinking of shooting a raycast for the sky directly down to the ground, but there is for sure a better way to do this. maybe i can use the model's vertex data or something, help me out on this one

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

      Perhaps this can help you out: github.com/MangoButtermilch/Unity-Grass-Instancer

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

    not available "Render Face" in ShaderGraph.. what to do?

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

      You can contact me through Discord, so I can better help you resolve your issues. paro456d

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

      @@paro456 Thank you. This was caused by a different version of UNITY. I just kept doing the lesson and everything turned out!

  • @juliaalder2007
    @juliaalder2007 8 місяців тому +1

    Why do you add it as tree???

    • @paro456
      @paro456  8 місяців тому +1

      idk :/

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

    Hi! This was very helpful! However, when my character runs through the grass, the movement becomes uniform throughout. I have the grass on a plane instead of a terrain for my purposes but I followed the other steps. I also noticed that when I followed part 2, it seemed that the collisions were not detected despite making sure to adjust the global player position. Not sure where the error lies. I'm new to Unity so sorry for any silly questions.

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

      Sorry that the explanations in these two videos were a bit fast, so you might have missed some steps. Perhaps you should try again.

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

    is it working for HDRP?

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

      Basically, yes, but you'll need to replace the parts with URP in the video with HDRP.

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

    How did you export to unity?

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

    Does it work on hdrp?

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

      Yep

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

      @@paro456 do you mind sending the grass texture? :)