ONE FOR ALL: The only wind shader you will EVER need! - Unity URP shader graph tutorial
Вставка
- Опубліковано 12 лип 2024
- In this video, I teach you how to make a Unity URP wind shader graph. This shader is universal and can be used on any model, grass, trees, vines, or anything else. I show you how to make your own basic grass model using Blender to be able to follow along, but this shader can be used on any model!
On top of all of that, this shader doesn't just displace, no it actually BENDS the grass making it more realistic, and allowing it to work on larger objects!
Check out our Instagram account:
/ boxstudios_. .
Contact us on our Gmail:
boxstudios.contact@gmail.com
Discord Server:
/ discord
0:00 Intro
0:17 Project setup
0:30 Grass Creation
2:13 Add second UV
3:32 Export model
3:43 Create Materia
4:14 Create shader
6:08 Fix wrap mode
6:22 Make backside visible
10:00 Method explanation
11:00 Grass displacement
16:44 Wind propagation
19:20 Why use a texture?
20:20 Making it bend!
26:15 Hanging models
27:10 Better Grass
28:38 Usage Examples
29:40 Texutre support
30:56 Outro - Навчання та стиль
If this shader was used for a game, how well would it perform under normal circumstances?
great tutorial btw!
There are a few optimizations that can be made but that's more on the model rather then the shader, as this shader is designed to be able to be used on any object.
General Optimizations can be:
Bunching the models like grass or trees to reduce the draw calls, add LODs so distant models dont take up unnecesary resources, use gpu instancing.
Each model will require different optimization tricks, but using them you can make a rather large scene.
I ran some tests with a couple thousand bunches of grass and a hundred trees or so and in the editor it ran about 80 fps on a 1060 ti, AMD ryzen 7
It works perfectly for smaller games, as for larger (ex. large open world) you might need to look into even better optimization methods or use different methods like a geometry shader which is heavy on the programming side.. and im not a programmer :)
Hi Does it work too for 2D plants?
I didn't test it out on 2D, but i assume it would work with just a few modifications!