Creating Simple Grass Shader in Unity URP

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

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

  • @Pigeon449
    @Pigeon449 9 หลายเดือนก่อน +2

    Your work is too good
    Thanks a lot

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

    I love the tutorials you make on your channel

  • @evertonbarbosa4922
    @evertonbarbosa4922 9 หลายเดือนก่อน +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 8 หลายเดือนก่อน +1

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

  • @王晓雨-j6v
    @王晓雨-j6v ปีที่แล้ว +1

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

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

    Man, thousand thanks to you🙏 you are the best

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

    finally found a good tut for grass shader
    THANKS A LOT

  • @martingrof1685
    @martingrof1685 4 หลายเดือนก่อน +1

    Thank you!

  • @luisr.f1655
    @luisr.f1655 6 หลายเดือนก่อน +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  6 หลายเดือนก่อน +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 5 หลายเดือนก่อน

      @@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.

  • @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!

  • @Jove_Jupiter
    @Jove_Jupiter 12 วันที่ผ่านมา

    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.

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

    best tutorial on yt!

  • @plyczkowski
    @plyczkowski 11 หลายเดือนก่อน +2

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

    • @paro456
      @paro456  11 หลายเดือนก่อน +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 10 หลายเดือนก่อน

      @@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  10 หลายเดือนก่อน

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

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

      @@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  10 หลายเดือนก่อน

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

  • @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 6 หลายเดือนก่อน

      @@paro456 And at the world origin point

  • @tomisky8855
    @tomisky8855 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +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.

  • @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

  • @Berndr
    @Berndr 6 หลายเดือนก่อน +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  6 หลายเดือนก่อน +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.

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

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

  • @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

  • @alxyslf445
    @alxyslf445 8 หลายเดือนก่อน +1

    讲的非常好,牛逼.

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

    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  2 หลายเดือนก่อน

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

  • @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.

  • @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 :)

  • @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.

  • @jacineyatrakos3149
    @jacineyatrakos3149 9 วันที่ผ่านมา

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

    • @paro456
      @paro456  8 วันที่ผ่านมา

      Are you using Shader Graph?

    • @jacineyatrakos3149
      @jacineyatrakos3149 8 วันที่ผ่านมา

      @paro456 yes

    • @paro456
      @paro456  8 วันที่ผ่านมา

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

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

    Mine wouldnt change size with terrain bruch 😕

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

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

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

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

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

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

  • @bradpit1853
    @bradpit1853 6 หลายเดือนก่อน +1

    My shader keeps turning pink

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

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

  • @mesutyavuzx
    @mesutyavuzx 12 วันที่ผ่านมา +1

    is it working for HDRP?

    • @paro456
      @paro456  12 วันที่ผ่านมา +1

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

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

    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 6 หลายเดือนก่อน +1

    Why do you add it as tree???

    • @paro456
      @paro456  6 หลายเดือนก่อน +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.

  • @zostawSuuuuba._
    @zostawSuuuuba._ 9 หลายเดือนก่อน

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

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

      You can find some tutorial videos for Blender to learn.

  • @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

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

    How did you export to unity?

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

      File -> Export -> FBX

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

    Does it work on hdrp?

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

      Yep

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

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