I’ve been doing some memory profiling and found a bunch of objects called “Tree Impostor Texture” in the Render Texture settings. Though I can’t find anything about this specific name, I believe it belongs to the auto-generated tree billboards of the Unity Terrain system. I could be wrong, since we’ve used a bunch of third party plugins before, however since we’ve deleted them from our project and use custom solutions.
All tree prototypes we use on the terrains have LODGroups on their prefabs, and since we’re using custom billboard impostors, we have no need at all for the Unity terrain impostors. I was wondering if it was possible to remove this memory cost somehow, perhaps by disabling an options somewhere via code? I couldn’t find any exposed options for it however…
I thought it might’ve been the list of tree instances but actually TerrainData is a different category in memory that is also loaded. At this point it seems like it’s some kind of leftover from the automatic tree billboarding. Anyone know if Unity removed it at some point if you’re using LODGroups?
I think under the hood the terrain system still generates billboard textures for any tree with a LOD group. But the name “Impostor” makes me doubt the terrain created this, since the term “Billboard” is used throughout vanilla Unity.
Aye that’s true and we did rely on third party packages before. My first guess was Amplify Impostors, but we thoroughly purged it from the project (and also it doesn’t have any “tree” specific functionality).
That leaves Speedtree, which I know has some kind of impostor system but I believe you need to explicitly enable it on export. I’ll take another look at it.
I think in the end it was only in editor profiling, but not on the build. Presumably they cache it as soon as a terrain loads in so you can swap it to the auto-generated billboards quickly, but it seems to get stripped on build when not used. It’s been a while since I profiled specifically for this though, so I would suggest making a build on your target platform and taking a snapshot with the memory profiler!