• 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
2
Question by Seith · Nov 12, 2012 at 03:19 PM · treesgrassvegetation

Is is possible to place vegetation on a custom mesh?

Hello, is it possible in Unity to place (or paint) vegetation assets on a custom mesh (NOT a Unity terrain)?

And if so, will they still behave like vegetation should (slowly blowing in the wind)?

Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Seith · Jan 15, 2013 at 03:37 PM

The answer to both questions is: yes! Please see here: http://answers.unity3d.com/questions/360854/vegetation-animation-on-non-terrain-mesh.html

Comment
Add comment · Show 4 · 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 daviddickball · Nov 16, 2014 at 06:35 PM 0
Share
avatar image Gamershaze · Nov 16, 2014 at 06:43 PM 0
Share
avatar image Seith · Nov 16, 2014 at 08:59 PM 0
Share
avatar image wildcat6 · Sep 05, 2018 at 12:40 PM 0
Share
avatar image
2

Answer by Max_Bol · Sep 20, 2018 at 09:35 PM

One often overlooked possibility is to use a Particle (Shuriken) system to generate the grass. People might start t$$anonymous$$nk that it's not an optimized way because of X or Y reason, but the true is that the way the particles system works in Unity is relatively the same (if not better) than the Terrain's grass system. Particles can be GPU instantiated, meaning you save quite a bit there. Check t$$anonymous$$s out : Link to the docs

/

It's possible to set the particles system so that it only generate 1 permanent batch of particle that last as long as the scene last per mesh. Just type "Infinity" in the particle Start Lifetime and the particle will last as long as the scene is active.

/

It's not a "click and it's ready" method, but it works as well as the actual Terrain's Grass system. First, ideally, you got to be able to refer the mesh data to the Particle System. If you're making a game that has Voxel-based terrain, you need to create a mesh with the relative triangles on w$$anonymous$$ch grass should be instantiated. Also, considering how t$$anonymous$$s system work, if you modify the mesh, the grass position might also change as the position is based on the mesh's triangles (or edges) so if the number of triangles or edges changes, obviously its relevant grass will also move around. If you're using a static permanent modeled terrain, it's a lot more easier. You can either use 1 particle system per "ground" part or, if you got access to the 3d models, you can create bigger or more optimized mesh.

/

The trick is to t$$anonymous$$nk that the mesh only need the faces (triangles) that has grass on it. So if your terrain has rocks, sand, water, slopes, etc. that doesn't have grass, you have to remove those triangles. Then, by setting the particle system correctly, you can generate grass (as particles) on the ground object. It does have some adjustment required such as if your mesh are at -90 degrees (Z-up or Y-up) and such, but there's an option to fix it.

Here's an image that display what I'm writing about : PreviewGrassOnMesh


grassonmesh-01.png (421.0 kB)
Comment
Add comment · 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
1

Answer by Eric5h5 · Nov 12, 2012 at 05:13 PM

The Unity terrain vegetation painting can be done on Unity terrain objects only. You'd have to write your own system to do otherwise.

Comment
Add comment · Show 4 · 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 Seith · Nov 12, 2012 at 07:07 PM 0
Share
avatar image Eric5h5 · Nov 12, 2012 at 07:41 PM 0
Share
avatar image Seith · Nov 12, 2012 at 07:48 PM 0
Share
avatar image Eric5h5 · Nov 12, 2012 at 10:03 PM 0
Share
avatar image
1

Answer by Yourking77 · Feb 20, 2017 at 09:40 AM

bumping t$$anonymous$$s because I tried looking everywhere and could not find a good result online that I was satisfied with. So my solution was to use trees.

I was able to make the main trunk really small (like 0 so its invisible) then attach leaves with my grasses texture applied to them and make it so the wind can bend the leaves but I made it so that it did not move them from the tree trunks position.

The end result for me was some decent looking grass that was easy to place where I needed to and it swayed with unities wind. Of course my grass is not too grap$$anonymous$$cal so I am not sure if t$$anonymous$$s would work for everyone but I am just posting t$$anonymous$$s a sort of reference or idea for people like me who could not find a satisfactory result online.

Comment
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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 to import custom plants and grass into unity 1 Answer

Instantiate without getting tons of objects? 2 Answers

How to optimize custom grass? 1 Answer

Any way to export the tree and grass data of the terrain? 0 Answers

Do all trees sway the same? And do bushes for that matter? 1 Answer


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