Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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

Link doesn't work

avatar image Gamershaze · Nov 16, 2014 at 06:43 PM 0
Share

Here: http://answers.unity3d.com/questions/360854/vegetation-animation-on-non-terrain-mesh.html

That is the correct URL to what Seith was trying to link. He also had the correct link, but a period was somehow placed at the end of the URL; sending people off to the wrong place.

In the future though, please try to Google rather than bump an Answer from 2012. This was actually the first Google result, and matched.

avatar image Seith · Nov 16, 2014 at 08:59 PM 0
Share

Oops, hadn't noticed that. I just removed the period from the link. Thanks Gamershaze.

avatar image wildcat6 · Sep 05, 2018 at 12:40 PM 0
Share

The question is how to place vegetation on a custom mesh. Your link is about how to animate vegetation already on a mesh...

So please answer the question^^!

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 think 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 this 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 which grass should be instantiated. Also, considering how this 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 think 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

Ok, so you can't paint grass on a custom mesh. That's a bummer. But do you mean that it's impossible to have grass on an overhang ledge in Unity? Or trees/bushes on a big rocky arch?

avatar image Eric5h5 · Nov 12, 2012 at 07:41 PM 0
Share

You can place them manually, or create your own vegetation painting system.

avatar image Seith · Nov 12, 2012 at 07:48 PM 0
Share

Oh, I see. But if I place them manually on my custom mesh, will they still behave like vegetation with built-in animation?

Or will the fact that I didn't paint them on an "official" terrain mean that they will just be static models, like they're made out of concrete?

avatar image Eric5h5 · Nov 12, 2012 at 10:03 PM 0
Share

They will only be animated if you animate them.

avatar image
1

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

bumping this 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 graphical so I am not sure if this would work for everyone but I am just posting this 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.

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 make lag free terrains 1 Answer

Dense foliage on Android seen from above, performance, can it be done? 1 Answer

Hovering trees and grass 0 Answers

Optimizing vegetation. 3 Answers

Multiple terrains and how LoD works 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