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!
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 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.
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.
@@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 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
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..
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.
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
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.
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
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?
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 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 :)
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.
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
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
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.
Your work is too good
Thanks a lot
I love the tutorials you make on your channel
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!
You are amazing!! Thank you so much for sharing these tutorials
thanks a lot! really high-quality tutorial with super straightforward explanations!
Man, thousand thanks to you🙏 you are the best
finally found a good tut for grass shader
THANKS A LOT
Thank you!
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).
Yep, this UV projection method is hard to use on tree models. I might make a video on creating tree shaders later.
@@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.
The tutorial was super! I managed to make pretty much similar result to HDRP with this tutorial.
Thanks a lot! It is grateful and helpful!
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.
best tutorial on yt!
Any way of doing this without relying on the texture UV's?
You can achieve a similar effect by comparing the vertex position y value with the object's world space position y value.
@@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!
@@iansantosart Perhaps I'll make another video explaining how I did it.
@@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
@@iansantosart you can also use the second UV map to achieve a similar effect btw
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..
When creating models in Blender, make sure to place the origin at the bottom of the model.
@@paro456 And at the world origin point
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
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.
I feel like using Perlin noise without a sine wave could be better.
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.
@@paro456 ya, a looping texture would look good and be very efficient
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
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.
question, my model went completely offset with its pivot, the pivot is at 0.0, but the model went WAAAAAAAAAY up
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
can you check that in your model also.
changing ambient occlusion to 0 solve this. but it is changing color
solved! changing alpha clip Threshold to 0.9 solved this. Thank u for the tutorial
讲的非常好,牛逼.
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?
Do you have any screenshots of your graph that you can show me?
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?
Perhaps your grass objects are too small or position incorrectly, causing them to appear underground.
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.
Perhaps the wind is too strong, try to weaken it.
@@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 :)
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.
Maybe you could share some pictures or videos so I can help you better.
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
@@Joseph-gv1zm You can find my Discord in the description of my youtube channel.
Im having the issue of my entire model is lifted up and scaled when i add the wind effect
Are you using Shader Graph?
@paro456 yes
@@jacineyatrakos3149 Can you provide some screenshots of your graph?
Mine wouldnt change size with terrain bruch 😕
I believe you can find the relevant options in the terrain tool settings.
Hi! im wondering why my plants "base" is still moving although i added the UV--Split fix :O Help!
Could you provide a GIF or video to help me better understand this issue?
My shader keeps turning pink
Is the shader you used for your material the one you just created?
is it working for HDRP?
Basically, yes, but you'll need to replace the parts with URP in the video with HDRP.
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
Perhaps this can help you out: github.com/MangoButtermilch/Unity-Grass-Instancer
not available "Render Face" in ShaderGraph.. what to do?
You can contact me through Discord, so I can better help you resolve your issues. paro456d
@@paro456 Thank you. This was caused by a different version of UNITY. I just kept doing the lesson and everything turned out!
Why do you add it as tree???
idk :/
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.
Sorry that the explanations in these two videos were a bit fast, so you might have missed some steps. Perhaps you should try again.
how to make 3d model?! I spend 3 hours and I cant make a 3dmodel
You can find some tutorial videos for Blender to learn.
when i added the wind the model just desepeared
You can contact me through Discord, so I can better help you resolve your issues. paro456d
How did you export to unity?
File -> Export -> FBX
Does it work on hdrp?
Yep
@@paro456 do you mind sending the grass texture? :)