- Home /
Optimizing vegetation.
Hi, I'm currently working on a scene that has a lot of grass in it - I used the terrain tool in Unity, and painted the grass on to it, nothing fancy. However, it raised my draw calls to more than twice the amount it was before.
Looking at the island demo from Unity, they have roughly the same amount of different plants as me, but their vegetation is actually much more dense, and with roughly the same detail settings. And yet, their vegetation amounts to 300 draw calls or so, while mine hits close to 1000...
I've scoured the internet trying to find out the reason, but I have not been able to find a single article or thread that deals with this problem. Am I missing something essential here?
As far as I can tell, my settings for both the terrain and the vegetation are low to moderate. Because of a technical issue, I have more than one terrain in the scene and someone suggested that might be the cause, but removing the second terrain didn't improve the situation at all.
Any help?
Answer by SilverStorm · Mar 20, 2014 at 07:49 AM
Anyone who comes across this in 2014 - Remember to Use a Prefab as the Base and On that prefab to UN-TICK RECEIVE SHADOWS AND CAST SHADOWS - this was the solution to this - It will have saved heaps of time and draw calls...
Answer by djarcas · Jan 18, 2013 at 01:32 PM
I got an answer on this directly from a unity dev; the parameter to fiddle with is the UNDOCUMENTED 'detail resolution per patch', which appears to be 'how many bits of grass to batch into a single draw call'. The default is 8. Crank it to as high as you can, see if that helps.
This is the solution. Without having to sacrifice your shadows or use a prefab for grass.
Thanks
Answer by spinaljack · May 03, 2010 at 02:51 PM
You can adjust the setting to swap out terrain details at closer distances so things like trees and grass get less detailed and trees become billboards etc.
http://unity3d.com/support/documentation/Components/terrain-OtherSettings.html
Your answer
Follow this Question
Related Questions
how to import custom plants and grass into unity 1 Answer
Vegetation problem 1 Answer
How to optimize custom grass? 1 Answer
Is Terrain Glitched???? 0 Answers
Detail mesh pipeline 1 Answer