Search Unity

MeshRendererSystemV2 and culling

Discussion in 'Graphics for ECS' started by Sylmerria, Mar 21, 2019.

  1. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Hi guys,

    I'm wondering why the culling was done by iteration of all entities with a mesh and not via an octree :/ doing a octree or a linear octree in DOTS is possible ( look this ) so I suppose there are more technical reasons at that but I don't see them.

    Any clues ?
     
    Last edited: Mar 21, 2019
  2. Fabrice_Lete

    Fabrice_Lete

    Unity Technologies

    Joined:
    May 5, 2018
    Posts:
    55
    There's a talk about this here:

    The short answer is that this initial preview of the hybrid renderer has been built with the MegaCity use case in mind, where we could leverage the existing structure of the data to get efficient culling.
     
  3. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    @Fabrice_Lete Thank for answering :)

    yeah I see that conf ( which is great by the way ) but that system works only for static scene.

    My case is I create my level procedurally so I can't have ordered datas like mega-city demo :/

    Do you mean ECS rendering will be completely rewrite ? if yes, it's at top of your todo list ? :p
     
    Last edited: Mar 21, 2019
  4. Fabrice_Lete

    Fabrice_Lete

    Unity Technologies

    Joined:
    May 5, 2018
    Posts:
    55
    Just like with everything related to DOTS at this point, you can expect significant improvements :) But in the current state of the hybrid renderer, there are many things which aren't provided out of the box yet.

    That being said, you can force spatial coherence of your chunks by using shared components. I can't guarantee it will work well in your use case but it's probably worth giving it a shot.
     
    Sylmerria likes this.
  5. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Ok I will tried spatial hashing to group chunks, more easy to do with moving objects.
    Thanks