I actually did make a sword model, I just didn't make any animations with it haha
Everything that gets affected by the wind subscribes to a global wind system that feeds them a wind direction and strength. They handle them in different ways, the trees specifically use them in a shader that does some vertex movement with it. It's just a slightly modified version of this GPU Gems chapter about vegetation in Crysis. Instead of using the Y value of each vertex to determine movement amount though, I paint all of the vertices based on how much I want them to move with the wind (black being none, white being fully affected). The base, for example, doesn't move at all, so it's painted black. This technique is really helpful for low poly art since I can manually prevent the bundles of leaves from moving too far off the branch.
I'll clean up the wind system and put it on GitHub for reference at some point, but hopefully, that article helps in the meantime!
Thank you! I recently rewrote them to support Godot GLES2 for my recent jam game Combo Chess! Once the rating period is over I plan on releasing the source code for the shaders :)
Nice! Just checked out Combo Chess, its a really fun, and it'd be awesome if I could have a look through the shaders to see how you achieved it, as I'm trying to get better at writing Godot shaders :)
Just added a link to the shaders on Github! They're a bit complicated, and lighting shaders aren't all that useful outside of things like this, but I hope it's a good learning reference!
← Return to Demo
Comments
Log in with itch.io to leave a comment.
The wind on the trees was cool and the mood was really nice, would be fun with a sword to woosh around. How did you do the tree?
I actually did make a sword model, I just didn't make any animations with it haha
Everything that gets affected by the wind subscribes to a global wind system that feeds them a wind direction and strength. They handle them in different ways, the trees specifically use them in a shader that does some vertex movement with it. It's just a slightly modified version of this GPU Gems chapter about vegetation in Crysis. Instead of using the Y value of each vertex to determine movement amount though, I paint all of the vertices based on how much I want them to move with the wind (black being none, white being fully affected). The base, for example, doesn't move at all, so it's painted black. This technique is really helpful for low poly art since I can manually prevent the bundles of leaves from moving too far off the branch.
I'll clean up the wind system and put it on GitHub for reference at some point, but hopefully, that article helps in the meantime!
Oh nice yeah, thanks!
Wowser! These shaders look insane, great job!
Thank you! I recently rewrote them to support Godot GLES2 for my recent jam game Combo Chess! Once the rating period is over I plan on releasing the source code for the shaders :)
Nice! Just checked out Combo Chess, its a really fun, and it'd be awesome if I could have a look through the shaders to see how you achieved it, as I'm trying to get better at writing Godot shaders :)
Just added a link to the shaders on Github! They're a bit complicated, and lighting shaders aren't all that useful outside of things like this, but I hope it's a good learning reference!
Thanks so much! :D