Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
YoungDeveloper

Wind

Question

Unity has wind zones, but at first glance it looks like they can be used only for terrain content only and not for custom meshes with colliders.
Has anyone tried something similar or i will have to write my own wind?

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hey,

 

I don't know if this relates to your question directly but if you go to the object that you want add the component Wind Zone, try playing with some settings.

 

I hope this helped :)

Share this post


Link to post
Share on other sites

  • 0

I found this whilst I was looking into something similar:

 

my understanding of how that stuff works is that the the wind zone is just a game object that creates some kind of an offset wave property, and the Unity vegetation just uses shaders that read this property and do vertex animation for the leaves.

What this means is that (1) you have to be using the Unity nature materials (or a custom shader that's been written to work in the same kind of way), and (2) you need to prepare your meshes for that, based on what the shaders do for their vertex animations. As far as I know, the leaf shaders are written to animate according to vertex position in the UVs. (i.e. the "base" of the leaf or shrub is at v=0, and gets no animation; the "tip" is at v=1 and gets full animation.)

 

also you need to put your models in a folder called : Ambient-Occlusion so shading will look fine

 

^^ It refers to the use of windzones on custom leafs but I see no reason why it wouldnt work on other meshes?

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Not familiar with it, I just did a very brief search and that is what came up.

Share this post


Link to post
Share on other sites
  • 0

@Please login or register to see this link. Leafs and trees doesn't really require parameters, i want the meshes to move according to it's mass taken from rigidbody.

Share this post


Link to post
Share on other sites
  • 0

They don't have any useful methods or variables that you can use for the Wind Zone component, so I think that you will need to make your own wind scripts so that it's identical. You can get the rotation of the wind zone game object rotation to get the direction of the wind (I think, I haven't messed with it), then use sine curve to randomize the wind strength.

Share this post


Link to post
Share on other sites
  • 0

I agree, here's the documentation for it, not much to look at though :|

Please login or register to see this link.

Share this post


Link to post
Share on other sites
  • 0

Yea, i've checked the docs many times, could not believe that's all there is to it. Can't believe "wind zone" is so not scaleable.

Share this post


Link to post
Share on other sites
  • 0

WindZone isn't accesible. But... you can write your own script for wind that affect gameobject.

 

Something like this:

Please login or register to see this code. Edited by websfera.pl
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...