Wind mechanics coming in the next video. If helpful, leave a like or subscribe! DOWNLOAD THE SHADER ►► stayathomedev.com/product/stylized-grass-shader/ DOWNLOAD GRASS MESH ►► stayathomedev.com/product/stylized-grass-mesh/
Try not to use if statements in shaders, they can lead to branching which hurts performance. In this specific case, use: NORMAL = NORMAL * (FRONT_FACING*2 - 1); this avoids branching and has the same result.
I watched Unreal and Unity Tutorials, never found a good Godot tutorial. This is really great work. Please create more videos like this Small clips / Series in specific niche topics. Like Stylized Grass, Cool Animations, Procedural Character Parts etc.
Thanks! I do feel that once you get into how they work (vertex, pixel/fragment) and just a little bit of the graphical pipeline process, they make more sense. But obviously, you have simple shaders and really complex shaders.
Wow!!! 😲 I can't believe how much I've learnt from such a short tutorial. Thanks for sharing your knowledge with the community. This is what I call a priceless tutorial. So much from this short 5min can be applied to many other case scenarios. Very clean and detailed straight to the point tutorials. I'm loving your channel's content, even the brilliant Godot song!!! 👌 Well done, man, keep the great work up. THANK YOU!!! 🙏
Wonderful, as usual. I watch a video like this and it reminds me why I love gamedev (especially 3D). There's so much magic in the small details. The color gradient, the noise texture, the wind. Combine that with a nice breezy audio clip and you can get some great immersion for your players.
I'm stumbling into this before I know much at all, my initial question is "is this performant way to do this? should I figure out a way to do this only around my player and load/unload the grass as it gets further away from the player?"
For anyone having the issue that the grass shader shows up fine in the editor but not when previewing or exporting: For some reason, when I imported the Mesh ressource (grass.res) using "Save To File", it had 2 surfaces. Surface 1 had a white material attached to it, which didn't show up inside the editor but was visible when previewing. Removing this material (click on the arrow right next to it -> Clear) solved the issue!
Do you still plan on making another video covering wind mechanics for the grass? I've being trying to adapt 3.x shader code but I keep running into problems 😅
Awesome! I had seen the multimesh instance but hadn't played with it yet to see what it did. Also I've been opening the imported scene and doing make local and then copying the mesh to other scenes. I like that you can save it via the menus to a resource.
Wow I am happy to find your channel, you are very good as an instructor, and you teach very useful topics, I'm grateful, you have a new subscriber, a great future awaits you
Thanks! There's a built-in variable for whether the pixel is front-facing or not in the fragment shader. If you show the backface, it keeps the frontface normal. But you want the inverse of that normal, so you make it negative, or the inverse.
@@stayathomedev I understand your explanation in the video very clearly, I just don't know how you figured that out! I haven't seen it in the documentation. I am very lazy when it comes to reading though so I might have given up too soon
I really appreciate these videos. And I do watch them. But with all gamedev videos. everything after step 3 is magic and insanely hard to me. I want to make a game some day but I just can’t phantom how people understand what they’re doing, writing these codes and solving problems. I’m impressed and kind of sad I probably never make my own game.
This was great but I feel all godot shader tutorials should come with a link to the version glsl api. I had to go through reddit to find it, but once I did it became much more doable.
I followed your video tutorial and created the grass, and it looks good in the editor, but when I run my game the meshes are all white, but green in the editor. Do you have any tips to help solve this issue?
Yo, the reason is because the model has 2 materials in it. The other one shows when you run the game. You can either remove it or make a shader that just makes it invisible because it screws with the grass if you try to for example add wind to it! So if you are gonna do that i recommend hiding it with a shader, cheers!
I'm very curious about the performance impact of that multimesh node! It's crazy to me that these days we can literally just draw thousands of grass meshes, but what is the cost of this approach?
Old comment, but mutlimesh is designed to have a lot of meshes by batching the draw call that is sent to the GPU. Individual MeshInstance3D nodes have to have draw calls sent one at a time. The drawback is it is treated as one object by the engine. So its always rendered when one part of the mesh is rendered.
Where would a person find potential collaborators for a game? I have an idea but no coding skill. I’m willing to learn but would love to work with a more senior creator if possible.
you technically dont even have to use multi mesh since gd4 does automatic instancing on meshes(this is the biggest feature i heard almost none mention)
Why provide links that require some kind of registration in order to download something? Provide a direct link to the resources, it will be easier for everyone.