Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HybridRenderer V2 Instantiate Static Objects + Culling per Chunk

Discussion in 'Graphics for ECS' started by charleshendry, Aug 9, 2020.

  1. charleshendry

    charleshendry

    Joined:
    Jan 7, 2018
    Posts:
    95
    Hi,

    I'm trying to create a large grid based map where I'm instantiating entities from a few prefab entities I have in a subscene. So far these are all static objects which are part of a city scene. I think they're currently still being picked up as dynamic objects as the localToWorld is being recalculated each frame. On HybridRendererV1, I was adding the FrozenRenderSceneTag, but not sure how to set static entities on V2.

    Also, the main performance bottleneck seems to be culling I think. Its calculating culling on a per entity basis. Instead of this, I'd like to set culling on a LOD level (similar to what MegaCity had implemented I think). The small grid building/street entities would be grouped into larger grids using LODGroups, so I would want culling only on that low LOD level. Or maybe it can be implemented separately from the LODs with shared component data which groups several entities per large grid area.

    Any advice much appreciated, thanks.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,752
    Not your specific question, but for subscenes/conversion you can add the StaticOptimizeEntity component (monobehaviour) to any gameobject to be converted as static entities (no translation/rotation etc added.)
     
    charleshendry likes this.