Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Tree Impost Texture terrain memory

Discussion in 'World Building' started by TurboHermit, Nov 17, 2020.

  1. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    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...

     
  2. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    Maybe this is not the right subforum? Is there a general performance forum?

    I'd figure open world terrain optimization would be here.
     
  3. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    739
    I would also like to know the answer to this.
     
  4. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    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?

    We're on 2019.3.4f1, URP 7.4.3
     
  5. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    739
    it's still broken
     
  6. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,303
    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.
     
  7. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    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.
     
  8. joeysipos

    joeysipos

    Joined:
    Jul 28, 2015
    Posts:
    41
    Any luck figuring this out?
     
  9. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    40
    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!
     
  10. joeysipos

    joeysipos

    Joined:
    Jul 28, 2015
    Posts:
    41
    Ok, thanks. I will give that a go!
     
  11. joeysipos

    joeysipos

    Joined:
    Jul 28, 2015
    Posts:
    41
    Just for anyone looking, yes the tree imposter textures still remain there even in the standalone build... Uggg