Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
36
Found in
4.3.4f1
Issue ID
614962
Regression
No
Unity grass builds patch meshes at runtime which causes cpu spikes
To reproduce:
1. Open repro.unitypackage
2. Open scene test. It contains a terrain populated with grass and a camera that is moved along the terrain via animation
3. Enter play mode and open up the profiler (set the cpu to only display rendering) - notice the spikes. If you expand the overview you can see that they are caused by Terrain.Details.BuildPatchMesh
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Variable is set to a different value from the selected enum value in the Editor dropdown
- TreeView Child display toggle styling becomes reversed when clicking and dragging it
- Null is returned when using FocusOutEvent.relatedTarget
- Unity_BaseInstanceID is always zero when rendering multiple meshes and instancing with the same buffer
- UI Document button's text does not resize relatively when size in percentage (%) is used
Ziggy90
Aug 30, 2019 13:50
In Unity 2019.1.8f1
Ziggy90
Aug 30, 2019 13:49
Just ran into the same issue with Terrain.Details.Render on iOS -> 20 seconds freeze
Funnyguy77
Jun 02, 2017 00:23
Seeing this issue in 5.6.1. Hopefully gets fixed soon, in the meantime will try to play around with tweaking detail res per patch. :)
ActionScripter
Mar 10, 2017 15:17
I've run into this issue in 5.5.1 as well. Makes dealing with large grassland areas frustrating.
Mikael-H
Oct 13, 2016 11:39
Still a problem in 5.4
I can see that this is not easy to fix but would appreciate if the manual mentioned this issue and how to work around it
BearShark1993
Jul 09, 2015 02:40
I had this problem and I think I figured out a fix (atleast for me) When first creating my terrain I noticed grass and details were really dragging my performance down due to the increase in draw calls. I looked up solutions and one was to increase the detail resolution per patch from the default 8 to 64 which drastically reduced my draw calls.
However after developing my scenes further I noticed in my builds the spikes caused by Terrain.Details.BuildPatchMesh you guys are talking about. So I looked through all the detail options in the terrain and everything was set to the default values except for the detail resolution per patch.
So long story short I halfed the 64 to 32 ran my build and it worked!!! no more spikes!!!!. however it does come at the expense of increased draw calls. So in the end I had to make compromises. Curious to know if other people messed with that value and that's where the problem started.
Black Lodge Games
May 27, 2015 23:01
Still suffering from this in 5.0.1 :(
mrobert
Jan 09, 2015 02:08
Increase the Smallest Occluder Size when computing your Oclussion Culling to a value greater than your biggest detail mesh. 25 worked in my case but your mileage might vary.
ZTORION
Sep 27, 2014 20:52
Note that there is a workaround if you have enough memory (for most terrains about 100-200MB):
Just set collectDetailPatches to false.
http://docs.unity3d.com/ScriptReference/Terrain-collectDetailPatches.html
ZTORION
Sep 27, 2014 14:36
This makes the terrain details effectively unusable for any scale of project. It should be marked as regression, because this was not present in Unity 3.5