How to Make Stylized Grass by using Blender and Unity
Вставка
- Опубліковано 30 бер 2021
- Sorry for my bad English, I hope the subtitles in this video could help you understand my steps :)
Welcome to join my Patrons with some other benefits. Buy me a coffee if this video could give you a little bit help, your support will give me more power to make more good videos! Thanks!
/ gamedevlobeyjon
Unity Open Source Project mentioned in video: github.com/UnityTechnologies/... - Ігри
Thanks! I repeated both trees and grass, according to your lessons! Everything works, everything is beautiful!
Thank you! I'm really happy it could help you!
This is a great tutorial, super detailed and the subtitles are awesome, thanks for taking that time!
A tip for anyone with low frame rate grass in scene view: on the top right of the scene widow, click the button which says "Toggle skybox, fog..." when you hover your mouse cursor over it. Then select always refresh
finally someone who teaches how to use the hotkeys as well, i get lost in so many tutorials with people just assuming everyone knows all of the hotkeys.
I've been waiting for this for a long time! Thanks man!
This is like the most hardworking tutorial ive seen.
Awesome! Thank you! I've been waiting for this one.
Subbed before 1k, mind my words ur Gonna grow to be a big youtuber
Really awsome
I have been looking for this for long
Thanks
Really well done and very clear - thanks!
you're English is amazing well done great tutorial
Nice man, gonna definitely try this in future projects
Thank you so much for your tutorials!
There is not a single channel like you who make blender tutorials on anime Environment, keep it up bro! And i have a request will you make Anime style Japanese houses, environment, interior room, furniture, tutorials?
Videoların bana ilham veriyor. Teşekkürler kardeşim
This was a really helpful tutorial thank you!
This is great that ur sharing this knowladge ;)) keep it up man
Very interesting video, thank you for sharing this!
Helped me so much! Great tut
Thanks a lot for this very detailed tutorial! :)
hii
Thanks for sharing, it looks great!
Thank you so much!
this is an amazing tutorial. instant subscriber.
Great tutorial man!
Woww this is amazing! Thank you so muchh.
You should add a "part 2" to the title or at least tell us that its required to have done the tree tutorial beforehand... it made me really frustrated that I had gone through hours of following the first 30 mins just to learn i had to watch the tree tutorial to be able to reuse their shaders.
WOAH! very nice!
AMAZING lecture about grass creation! Thank you!! Could you please teach us how to do trees? with SRP?
Nice thank you!
Great tutorial!
AMAZING! Can you also show us how to make the grass interactible? Like.. grass bending away from player?
Probabaly should use colider
But not collider on every piece of grass, that wouldn’t be optimal. You would need to add a shader which takes in player position and bends the grass in that position
Best Tutorial EVERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Thank you!
This is great tutorial, I was following it then I notice when I import the mesh as fbx on Unity, the other side of the plane was transparent. Did I miss something about the backface culling (blender), or it is done on the shader part(Unity)?
THIS IS AWESOME😁
Hey great tutorial!
I just having problems with my keywords for receiving shadows, would you might know why?
The grass breaks and displays purple.
That tutorial was great and also probably the only tutorial i could find for stylized grass in unity URP. Could you also show how to do that shader for HDRP?
THNX
Good tutorial. Any way to improve the performance?
Nice I never clicked on a video so fast
Excellent. Helpful. I have a few queries though.
1. Why not use the grass mesh instead of tree in the terrain editor?
2. Is it ideal to render a grass prefab with so many triangles?
The grass will be batched to render. In this video, I give the grass too much vertices. The grass triangles should be decreased in different level of detail. In Zelda:BOTW, they give a grass 3 or 4 vertices and they didn't use Geometry shader or Compute shader to optimize the grass rendering, but well designed LOD, the grass close to camera are mesh grass and grass far away from camera are billboard (multiple cross quad). Both in Zelda and Genshin Impact, you can't see grass too far, they will be culled.
We can't just use what I told in this video to our game without any other optimization. This video just give devs a way to get into it. We have lots of things to do to make a grass land in a game. The first thing is we should drop any Shader Graph and write shader by hand. Because no matter Amplify Shader or Shader Graph have lots of performance issue. For a good performance in mobile platform we even need to modify the Unity terrain system about the patch part. But all these are too difficult to let everyone understand. That's why it's so hard to find any useful and details tutorials about Open World optimization...
@@lobeyjongamedev676 Aha. I like the idea of lods being mesh or billboards. Thanks for the reply. Gave me a lot to further explore.
cool tutorial, but I have a question, what is responsible for the movement of the upper part of the grass, I somehow move the lower
Brilliant
you r awsome, thank u so much
do we really need URP for this tutorial because I am facing couple of issues with it? like there is no option in edit for upgrading materials to URP.
wow...just wow.
I have really enjoyed this, but I am stuck.. I wish I had known that we would need to have set up the shader from a whole separate video before starting this one, since the nodes aren't explained - ****Update**** I apologize! 🙏I see that there is an additional video for the trees where you set up the nodes. Thanks for your videos!
Where can i get those textures that you use for the terrain? Sorry if i missed you mentioning where to get it, but ive looked over the whole video
Hi, I didn't mention where to get these textures in this video. There are many terrain textures you can download on Asset Store :)
@@lobeyjongamedev676 Ah ok, I really like that one, can you tell me the name of it so I can search it up? Or is it really easy to find
I cannot for the life of me get the lerp gradient to work. All I can get are harsh shadows from the other two gradients, even though from what I can tell everything is exactly as it was in the video. Also, what are the values for the wiggle offset? Can't seem to get that to work either. Thanks for the tutorial, man! It's gotten me way further than any others.
I have only found this tutorial- and I'm baffled. The whole time I am following along just fine, until we get to the shader part. Apparently there was a previous video, where you learned a bunch of stuff. But I am completely lost and very much confused, after watching 2 of your previous videos on the tree animations. How did you get the Vector 1's to floats, and what are the settings for Wiggle offset? Where does the node Vertex come from? If I type that in, I get nothing..
UPDATE: I was using Unity 2020.1 smth, updating to Unity version 2020.3.8f1 (LTS) was very helpful, now I got the Main Preview to update and I have the Vertex and Fragment sections. The Vector 1's also updated to floats in this version. Plus the Graph Inspector showed up.
Ik this reply is late but maybe it'll help somebody else. Unity's new update changed the name of Vector1 to float. If you're using a newer version of unity where some of the syntax and UI has changed you can go to his leaves animation video and search for my comment. I explained what you have to do if you're using the newer version of unity. Wiggle offset is a float node with Mode Slider. Default 0.2 min 0 max 1
Restarted from the beginning and at 2:24, when I try to rotate along the X axis 90 degrees I end up with only half of the grass object. Any idea what I'm doing wrong here? I'm following the keyboard shortcuts exactly as described.
我听着就像国人的英语,哈哈哈哈,直到看到了输入法。视频真牛逼啊,学到了干货!牛逼!
Them trees O_O
yo man, i've tried to paint the grass models on unity terrain as a tree, in the prospect of doing a very large terrain to use in a game (so it need to be optimized) end if i increese the bilboard start distance it lag very badly. I was wondering if u append to have ever done anithing large scale and had the needing of optimizing and could give me some advises
I will make a tutorial about how to make GPU driven terrain with grass!
you can also look at occlusion culling, i have just done this with my game and tripled my performance
at 4:48 when I tap G and then Y it won't let me change the shape of the object anymore... I think it has something to do with when I have the mirror Y on... Any advice? I don't know what I'm doing wrong.
Is there a tutorial on how to create the main light and shadows because I can't open the open source project.
Thanks a lot for this tutorial. Helped me a lot. But I download that project, it gives error unzipping
what are the values for the wiggle offset??
I wasn't able to open the open source unity project and wasn't able to bring the light assets into my project either, Is there anyway I can still create the same lighting?
Can you make tutorial like this on blending grass color with terrain using shader grapgh
What did he press to add a node when doing the lighting? I am very new to Unity and trying to learn by myself with tutorials
The Shader Graphs Nodes? Space then search for node or drag the little circle (next to 'Out' or 'A') from the node outwards.
@@rebornl I felt so stupid, I figured it out, I was right clicking within a node and not outside of it.
Thanks so much for the highly-detailed tutorial!
I'm having a minor issue here: The back side of my grass blades isn't rendered (invisible) in Unity. Did I miss some steps during the modelling process?
same issue.
One more thing do we really need URP for this tutorial because I am facing couple of issues with it? like there is no option in edit for upgrading materials to URP.
I cant find vertex clor node in Unity 2021 URP unlit shader graph
Can you make water tutorial like in your ,,stylized island" video pls?
Will do!
how can we blend this with colormaps of the terrain? :)
I hope to see the tutorial for the rock shader graph!!!!!
I will make the rocks' video in future!
guess I'll start making trees first since I need the shader graph ;-;
How did you manage? Im just lost
Hi, I really want to finish the tutorials but I cant find the edit>rendper pipeline setting. please help :
how do you paint grass on custom mesh??
Hi is your patreon still active? I would like to support you and get your input on some things but I haven't seen your patreon linked in recent videos
Hi Jonathan, my patreon is active! The page link is www.patreon.com/gamedevlobeyjon
加油👍
Guy, do you know any resources for learning shader graph in Unity?
Nice tutorial but you deleted the poor Hero Default cube so fast haha
33:00 Some reason gradient color is not working. It just fill with a top color. Anyone know the reason?|
I guess this way is not working on the recent version of Unity :)
Chinese?Your accent is familiar to me. Good Tutorial !!!
I am struggling to follow along with this. - I'm only 4:36 minutes in and my vertices will not move along the Y access when I press G then Y. They'll move along X or Z just fine.
Unless my Blender version is wrong and the hot keys mismatch those in the video? Is that a thing?
is there any way to incorporate blender stuff like biome scatter geometry nodes into Unity?
yeah, just apply the modifiers in blender and then import into unity.
I don't understand, where was used CustomLightning.hLSL and MainLight shader?
Did you find out?
after applying shader to the grash its changes its position
hello, the CustomLightning doesnt work, any solution?
there's someone in the comment says change the #if SHADERGRAPH_PREVIEW to
#if defined(SHADERGRAPH_PREVIEW) but it doesnt work for me.
Did you fix it? If so, how? thanks!
why does the color vary depending on the angle im seeind the grass??
👍👍👍
Hi I did everything as shown on the video but the shadow on the grass is yellow in color and im stuck at trying to fix it. Can anyone tell me what could be wrong? thanks in advance
The problem is the sample gradiants (both) the first (black and white) you must change the black color to grey color, from secong sample gradiant you must set the first color in black and the second color a black but with few intensity.
@@areyouthere003 You are a god! Thank you so much for posting this quick fix. I was so lost as to what was going on. Messing with the gradients got it all working! I had an assignment due tonight for my class and this was the save I needed. Hope your doing well in whatever you're doing in life.
Hello! in min 25:00 it doesnt show me "graph inspector" tab. Do you know why could it be? :)
I'm using Unity 2020.3(LTS) and there has a "Graph Inspector" on the right up corner of Shader Graph editor. Maybe the difference is caused by different Unity version?
Yea so I'm 3 months late- but for anyone stumbling upon this: the graph inspector was moved to a small "settings wheel" or "gear wheel" on the node where its needed
This mesh is very performance heavy. Any ways to fix it?
Hmmm, I have to say the optimize steps may be difficult if you are not a professional tech artist or graphic programmer...
GPU instancing + Grass Chunk Management System is the most common technology used in some big world game to draw mesh grass. Such as Zelda:BOTW and Genshin Impact. They all use mesh grass but not billboard grass.
If your game is on mobile platform, control the vertices count to 4~6 for a single grass. About 100-200 vertices for a grass patch in blender. Make sure total 200~300K vertices in a frame.
However you need to face another problem - decreasing draw call, for drawing mesh grass, the most common method is using GPU instancing with DrawMeshInstance API (or DrawMeshInstanceIndirected). This API is important because Unity's auto GPU instancing is really awful (Check the batch result in Frame Debugger you will know). With this API you can draw 1023 mesh instance in a draw call. However, the meshes need to be same, besides you have to design a system to manage the grass chunks which is consists of these grass mesh instances. For example, use quad tree to achieve frustum culling by yourself (because the draw mesh instance API will not do this for you) to determine which chunks need to be draw in a frame. Due to the mesh instance need to be same, you have to determine the grass randomness and density in shader (usually in vertex shader, graphic card need to support Vertex Texture Fetch) with density map, height map, grass map...
You can also use some plugins in Unity Asset Store. uNature, Nature Renderer and Advanced Terrain Grass are all designed to decrease the draw call when drawing grass. All of them are using GPU instancing with grass management system. You can research how they implement their system if you have interested... Good luck...
Besides, if you want to achieve the system I mentioned in last comment. Usually, you need to design a brush to paint grass (like uNature) or modify the shading process of the Unity Terrain Detail Tool to yourself (like Nature Renderer or Advanced Terrain Grass. I have to say the Unity default Terrain Detail Tool is really a no use design, I can't imagine who will use this tool without any modification in a game...)
@LoBeyJon Game Dev Thanks for your help, your tutorials are the best, I've tried other ways of making grass, like using planes and applying a texture to it, but your one looks the best, so I will still use this, I have figured that using LODs will help a lot so I dont have to worry much about it, as my target audience is PC and I don't need to use that much grass in my scenes. I get around 100 fps now, It is all thanks to you. But still curious, how does Genshin Impact make their grass? Are there any articles about it?
Subbed for 1k :)
I downloaded Universal RP and it didn't appear
render pipeline what to do?
Start a new project that is already urp and then move your asset folders into the new project.
Could someone share the tree shader, I can't find it 26:55
can i use this way for unreal engine
Your grass is just one sided right? How can you show 2 sided on unity? My grass just show 1 sided on unity
Thanks for the tutorial
Have you checked the two sided or set the culling off in shader?
thats a lot of triangles
i wish u add the the link to downloade this project :'(
I will do it in future!
i am your best friend forever : D
That what i want 😚
For some reason I cant add any shadows to my grass even when I Used the same Keywords at 50:00
Same problem, have you found any solution?
Problem: 22:22 stuck at fetching packages
What i do plz tell me the way if u KnoW..😔
Would you please give me some more information in your console. Did you meet same issue when fetching other packages?
@@lobeyjongamedev676 Thanks for replying,, by the way this problem is solved.. i simple update Unity : )
I can't see the Shaders folder in Source Project, how to fix it?
I couldn't get mine to show up and I think it's cause the project isn't open source anymore, were you ever able to get it to show up? I might just follow another tutorial on how to do the lighting/shadows.
I had the same thing, I just downloaded github desktop and cloned the repository there, and when I opened the project folder there was everything I needed
NB~
Can't I just replaces those Veticy heavy Models with dragged textures... So the load in the end wont be so heavy... Cuz you know verticy physics = DEATH
Of course you can, if you can accept the billboard grass in your game. However, some of other devs need mesh grass in their games like in Zelda:BOTW and Genshin Impact.
Make more
I can't download the project, it tells me that the files are damaged
Hmmmm, could you please specify which file? I checked the unity open source project it can be downloaded.
@@lobeyjongamedev676 "unexpected end of file" and one of the damaged files is the shaders folder, it does not appear in the .rar
Amazing tutorial! Thanks for including so much detail. I'm actually using this grass in my Ghibli inspired game. Take a look at it here: ua-cam.com/video/PvhM8bOG5Ls/v-deo.html
Great work!
@@lobeyjongamedev676 Thanks a lot!
hey, i have any problems