Giter VIP home page Giter VIP logo

polygon-wind's Introduction

Polygon Wind Shader

In 2017 I was looking for a wind shader to use on a low poly tree model. I couldn't find one that provided the visual I was looking for, so I started to develop the Polygon Wind Shader.

It is designed to generate a more suttle and organic wind movement on trees. But it's not great for heavy wind effects. Lately I haven't had much time to work on it, so I decided to publish the source code here and make it available so that anyone can use and modify it.

Here are some videos of what I achieved using it:

How to use it:

Just apply the shader to a material and apply the material to your asset. The ideal tree asset is one with a single mesh.

The shader has various parameters for you to tweak:

  • Wind Wave Size;
  • Tree Sway Displacement;
  • Foliage Wiggle Amount;
  • Branches Up/Down;
  • Foliage Wiggle Speed;
  • Tree Sway Stutter;
  • Tree Sway Speed;
  • Wind Direction;
  • Red Vertex Influence;
  • Blue Vertex Influence.

It uses a series of inputs to calculate the final vertex position, one of them being the vertices colors of the mesh:

  • Red - Use on the branches to enable the up/down movement;
  • Blue - Use it on the leaves to get that organic wiggle.

Known uses of the shader by other people

polygon-wind's People

Contributors

ericfreeman avatar renanbomtempo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polygon-wind's Issues

Some ideas and thank you!

I think im going to use the green vertex color channel to add another part to the tree. Some of our trees have lianas hanging that would look better if they behaved differently. Not sure if you take into account the intensity of the color value but if not, it would be a nice way of allowing extra control for all the parts of the tree ie.: having the branches and leaves move/wiggle more the further they are from the trunc. I guess a float value could also work (distance from trunc) but would be less flexible (altough im not sure if the flexibility would really be usefull). Gotta run some tests.

Edit: Just checked and it seems you allready take into account the "size" of a color value which is very nice!

Also, I was thinking that introducing stuttering settings for the leaves may look good. If the wind makes the tree stutter... the leaves should definitly stutter too. Could be additive to the trunc's stutter.

I'll post some code when I get around to it but it may take a while before I tackle it.

Thanks for making this shader, it works great!

Fred.

Lack of Updates

I'm really sorry I haven't made any changes to the shader in all this time. At first, I created this shader for my personal use in a project (which didn't get too far I should say). I wasn't expecting it to have gathered this much attention and interest from other people. I won't promise any updates but I really hope to get back on developing this shader. Again I'm really sorry if I've let anybody down with my lack of dedication towards this project.
Thank you all for the stars and forks on the project by the way! ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.