Search Unity

Distant trees - Sprites facing camera? Static? Or what?

Discussion in 'General Graphics' started by Vel_1828, Jun 19, 2017.

  1. Vel_1828

    Vel_1828

    Joined:
    Apr 12, 2014
    Posts:
    53
    Hello!
    We're making an open world game. We had to dump SpeedTree due to various reasons, so our trees are just normal game objects with LOD.

    The farthest LOD is a Sprite, which should be facing camera (a.k.a. billboard) . BUT when we do that, it needs to be Dynamic (non-static) so it can rotate towards camera with a script. But when it's dynamic, it cannot be loaded with Occlusion culling, which will be very bad with X thousand of trees around the world!

    What should we do...? :C
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    I can't offer much help because I haven't done anything like this, but I think you want to look into using BillboardRenderers with BillboardAssets created by you at runtime instead of speedTree.

    From the BillboardRenderer API doc: "BillboardRenderers that share the same BillboardAsset can be rendered in a batch if they are next to each other in the order of rendering"

    Manual
    https://docs.unity3d.com/Manual/class-BillboardRenderer.html

    API
    https://docs.unity3d.com/ScriptReference/BillboardRenderer.html
    https://docs.unity3d.com/ScriptReference/BillboardAsset.html
     
  3. BakeMyCake

    BakeMyCake

    Joined:
    May 8, 2017
    Posts:
    175
    Some older games that didn't bother with billboards used two perpendicular faces with the same texture.
    Depending on your needs it may or may not be a solution for you.