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
37
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
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
TKDHayk
Dec 07, 2023 02:33
Guys is there any news on this? Im seeing this in Unity 2019.4.4.
im willing to upgrade to a newer Unity version if this issue has been resolved.
I do have lots of grass in my scene. But these spikes are happening even when the player is standing still and the camera is standing still . Moreover, there are no dynamic effects on the grass, except for Unity's default Grass Sway. Global illumination is off. Why would Unity be culling some patches of grass if the camera is not moving? This is an annoying little spike that doesn't logically seem to need to exist. Could I get some help to resolve this Mystery? Could Unity fix this please?
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