• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by ZeoBuzz · May 07, 2010 at 05:11 AM · terraingrasswinddetailsway

Wind: Detail meshes are moved by wind back and forth, rather than swaying: how do I make them sway?

I made a terrain, painted it with some splat textures, then moved on to add some swaying grass. When using a "small bush" from the Unity package of foliage under resources just to test with, I noticed that once the area was previewed or run as a full app, that the grass would MOVE left/right instead of just tilting left/right to give it a swaying effect. How do I make the grass/other detail meshes sway/rotate slightly with the breeze, rather than being physically moved back/forth?

Comment
Tetrad
alex 1

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

7 Replies

  • Sort: 
avatar image
Best Answer

Answer by ZeoBuzz · May 09, 2010 at 02:39 AM

I needed to paint them as "detail textures" instead of "detail meshes" to achieve the desired swaying behavior. User error =P.

Comment
ikriz
kingcoyote
AnomalusUndrdog
muzboz

People who like this

0 Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Random Indie · May 09, 2010 at 04:13 AM 0
Share

You should accept your answer as being the correct one.

Glad you figured it out. :)

avatar image Steven-1 · Jan 14, 2011 at 10:24 AM 5
Share

that's not really a solution, since this means you can't have bushes and stuff (as they're meshes rather than just planes), unless you turn of the wind completely

avatar image Waz · Jul 01, 2011 at 12:44 PM 1
Share

Yes you can, but they have to be trees. To clarify, ZeoBuzz is talking about http://unity3d.com/support/documentation/Components/terrain-Grass.html

avatar image glowingslab · Jul 01, 2011 at 02:40 PM 2
Share

The issue is not with the 2D texture billboards, but with detail meshes. If I use a detail mesh with the render mode set to 'grass' it will move incorrectly.

avatar image God-at-play · Sep 29, 2011 at 06:35 PM 1
Share

Yeah this is misleading. In a sense, the answer has NOT been solved. Detail meshes are in fact still broken under Grass rendering mode.

Technically the solution is to not use Grass rendering mode at all, but instead set the rendering mode to VertexLit.

avatar image

Answer by God-at-play · Sep 29, 2011 at 07:05 PM

I just saw a forum post that mentioned that detail meshes should have the vertex color alpha painted to determine how much wind affects them.

So the official solution is to paint your vertex color alpha black at the bottom, and then some value at the top depending on much wind should affect it.

This seems to be a documentation bug in the Detail Mesh reference page.

Comment
Waz
mgear
Leoo
Jed_500
getyour411
Gua
Wright
AttilaZold
sayginkarahan
AnomalusUndrdog
muzboz

People who like this

11 Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Leoo · Oct 02, 2015 at 02:56 PM 0
Share

Anyone could confirm/deny this?!

avatar image Jed_500 · Nov 01, 2015 at 10:58 PM -1
Share

God at play is perfectly right, change the alpha on the vertex colors on your mesh, 0% no movement us at base and ramp up to about 60-75% for the top vertex's which are effected by the wind,, then re-import, remember to refresh your model import and re-assign the prefab to the detail mesh under grass.

avatar image AnomalusUndrdog · Apr 06, 2020 at 02:46 AM 0
Share

So surprising that after 9 years, the manual still fails to mention this.

avatar image

Answer by KevalrOxy · Jul 02, 2017 at 03:22 PM

For anybody trying to solve this probelm... here is a youtube video showing a fix, step by step...

https://www.youtube.com/watch?v=1QbpCZuGe7M

Comment
BjoUnity3d
muzboz
sayginkarahan
s4shrish
wcoastsands

People who like this

5 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image muzboz · Nov 23, 2018 at 10:49 PM 0
Share

I can confirm that this video mentioned above explains the process for making Detail Meshes react to wind correctly. https://www.youtube.com/watch?v=1QbpCZuGe7M

~~~~~~~~~~

I used Maya 2017 instead of 3DSMax.

So here is my detailed Maya instructions for the process of painting the "wind weights" for a Detail Mesh:

~~~~~~~~~~

I made 2 quads, and set them up as a cross of meshes to be the grass or bush.

~~~~~~~~~~

Then I used the "Split Selected Edge Ring" tool to add another ring of edges around the middle (so I could have different wind swaying values at the bottom, middle and the top.

~~~~~~~~~~

I then selected all the bottom verts and went to Mesh Display > Apply Color.

~~~~~~~~~~

I selected the "options box" for that entry in the menu (click on the "box" icon on the right of the menu item itself).

TIP: You can add this Apply Color tool to the the tools Shelf. Press Shift+Ctrl+RightClick on Apply Color to add it to the tools shelf.

~~~~~~~~~~

I then set the Color to white (which will how bright the texture itself is in the scene. (You may want to use an off white, grey, etc). And most importantly, set the Alpha to 0.0.

~~~~~~~~~~

The bottom of my grass should not sway in the wind at all. This is where it is attached to the ground!

~~~~~~~~~~

I then select the middle row of verts, and paint them at Alpha 0.35 or so.

Note: Click "Apply Color" button while you have the relevant verts selected - you'll see the viewport update to reflect your values.

~~~~~~~~~~

I then select the top row of verts (at the "tips of the grass model"), and paint them with weight 1.0, to make them sway in the wind at full force. Hit Apply Color.

Note: You can use 0.8, o.6 or whatever suits you, if you want them to now sway as much in the wind.

~~~~~~~~~~

Making a firm tree with windy branches or leaves

You can add more or less detail into your mesh, to control the different weightings and how your model will be affected by wind in Unity.

You can also do more diverse things (as mentioned in the video) like:

Model a vine stalk (with Alpha = 0.0, so it doesn't move at all.

Then add leaf models to the stalk. And make the leaf wind weights get more sway as they extend from the stalk.

~~~~~~~~~~

avatar image

Answer by danilec1313 · Jan 28, 2022 at 08:46 AM

Hi! I created a free asset in Assets Store that let's you to prepare any mesh to be used in Unity Terrain as a detail mesh with a correct wind behavior: https://assetstore.unity.com/packages/slug/210986

Comment
muzboz

People who like this

1 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image muzboz · Jan 28, 2022 at 10:03 AM 1
Share

Cool! I'll check that out some time. Nice one. :)

avatar image danilec1313 muzboz · Jan 28, 2022 at 10:19 AM 0
Share

Thank you! :)

avatar image

Answer by glowingslab · Jul 01, 2011 at 11:42 AM

I have this problem too. As Steven 1 points out, is there a way to make the plants sway instead of moving?

Comment

People who like this

0 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Jul 01, 2011 at 12:45 PM 0
Share

Are you following http://unity3d.com/support/documentation/Components/terrain-Grass.html ?

avatar image kdagsjm · Sep 25, 2013 at 10:14 PM 0
Share

Is there a solution to this - I love the look of the Terrain Detail grass renderer but the sway is uncontrollable. is there a way to control this by code? It rocks back and forth (root to leaf) even if you dont have wind setup in the scene. Or is there a way to get a similarly selectable dual colored render for terrain grass by some other means?

  • 1
  • 2
  • ›

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I automatically place grass and other details on my terrain to correspond with the splatmap? 5 Answers

Culling low grass details on terrain (detail distance issue for not tall details) 0 Answers

Edit detail layer of terrain at runtime 1 Answer

Grass Sway settings 0 Answers

Specify detail density and detail distance PER grass texture? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges