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
0
Question by sooshicat · Jan 07, 2013 at 03:57 PM · grasscpuwindfasterefficient

[SOLVED] Which is faster and more efficient?

Just wondering which you think would be the most efficient in terms of processing in order to improve the speed of a game.

Would it be better to use Unity's grass system, where you just paint the grass on? I've found that to be incredibly slow if you're using a lot of it, although an advantage would be that it reacts with the wind without the need for animating.

Or would it be better to create a model of some grass, animate it as though it is blowing in the wind, place multiple instances of the grass object in the Unity scene, and have the animation loop?

Is one option faster or 'cleaner' than the other?

Thank you in advance :)

Comment
Add comment · Show 2
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 Owen-Reynolds · Jan 07, 2013 at 05:35 PM 0
Share

One thing to note, Unity grass is turn-to-face billboard style. Standard "$$anonymous$$$$anonymous$$O" grass is fixed in place.

You may prefer one look over the other.

avatar image sooshicat · Jan 07, 2013 at 05:41 PM 0
Share

I'm asking based on performance rather than aesthetics, but thank you

2 Replies

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

Answer by markfm · Jan 07, 2013 at 07:01 PM

The most honest answer anyone can give you is to try it yourself. Reason being is that we don't know how full you want it. The grass may seem heavy, but that is because you over indulged with your settings. Try lower the settings, we all wish to have a lush full grass field... but the reality is, you can't at this time. The one implemented in unity on a grass blade by grass blade basis is far lighter then the time you have to code.

But then again I could be proven wrong, every implementation as good as it is can be beaten, but not in the way you are saying.

i.e. Stick to unity's grass system and save yourself a headache.

Comment
Add comment · Show 7 · 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 Owen-Reynolds · Jan 08, 2013 at 02:36 AM 0
Share

$$anonymous$$ore on the built-in grass settings: the default settings are just silly high, like crabgrass in a pasture, at least on Unity3.5.5. If you play with the settings, it still gives that same solid mass of billboards. So, you figure grass is always that way.

You have to drop both Opacity and TargetStrength to almost nothing before it thins out to where you can even see the ground.

avatar image sooshicat · Jan 08, 2013 at 04:42 AM 0
Share

I think neither of you are grasping the point of the question. This is not about settings or how the grass is used, i am merely hypothetically asking if i had a field of a modest amount of grass using the unity system, then another field of the same amount of grass but instances of a grass object- which would be faster or better in terms of performance? When using the unity grass system- even VERY sparingly with the settings, i always find it to dramatically slow the game. Hence this question

avatar image markfm · Jan 08, 2013 at 11:11 AM 1
Share

Your question does not have an answer, thus we are trying to guide you. The question lies on how many blades of grass you will use. It not worth for example to use the inbuilt system for 5 blades of grass. Its no the fact that we are not understand but rather that your question does not have a straight answer. The same question would be, whats hotter an iron rod or a burning wooden stick, it logical to ask the temperature of each before attempting the question.

avatar image sooshicat · Jan 08, 2013 at 11:24 AM 0
Share

Using the hypothetical two fields in my previous comment though... Both fields the same size, one field has 200 blades of unity grass, the other field has 200 blades of instanced object grass. In comparison to one another is there any difference in performance? Are you saying for larger areas of grass it would be better to use unity's system but for smaller areas, an instanced grass object? Surely a large amount of unity grass would be slow as hell. Apologies if I am appearing rude or anything, I am just trying to figure out the best way to do this without slowing the game too much. The same question would apply to trees too. Say I wanted a forest with 50 trees- Unity's system or an instanced tree mesh?

I would try it myself but I thought someone on here might have already asked themselves the same question.

avatar image markfm · Jan 08, 2013 at 11:57 AM 0
Share

Oki looking at the question from a technical point of view:

Unity has an inbuilt system whereby it instantiates the grass as a plane and uses an aplha based texture to show the grass blades. You would most probably do the same thing, but include a script to rotate the blades towards you etc.

If you could program a system which meets your own requirements only, then it would be faster as there aren't all the other parameters, however if you use unity grass and maximize its features then the performance hit would be pretty much the same.

A large amount of grass on any side would be slow, think about his from a Unity developers perspective, if there was an a lighter and better way to implement the system, they would have used that..

The only reason I would use a self created system would be to avoid the terrain performance hit. Grass is expensive, there is no way around that. What is most expsnive is the Draw calls, something which has been solved by another user..

https://www.assetstore.unity3d.com/#/content/582

I suggest you purchase that.

Show more comments
avatar image
1

Answer by GXMark · Dec 30, 2014 at 08:08 PM

I've been tackling this same issue in my game. I have noticed that a complete grass redraw occurs even when you change a patch of the terrains height map. You can achieve this using the setHeights and using the offsets in the parameters. Unfortunately, unity still completely redraws the grass system and not the patch of ground under the grass which is really all that needs updating.

I think its an optimisation bug they could easily fix.

The author above mentioned the question of a comparision of a self made grass system versus the unity grass system. Please refer to the advanced foliage shader on the asset store as a benchmark since this system can place good quality foliage as gameobjects. But if i were a betting man i don't see how you are going to really get compariable performance with a native implementation inside unity's terrain engine.

A work around for this issue could be to reduce the detail draw distance or density on application of ground height changes and then for example on mouse release reinstate the density and draw distances. I found this to be a compromise to maintain ground modification performance in my game during gameplay.

Hope this helps someone

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

12 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

Related Questions

Shimmering waves of wind-blown grass possible? 1 Answer

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

making grass move at different speeds 0 Answers

Wind blowing over trees and grass in Unity 3 1 Answer

How can I give an object realistic wind? 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