Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Help to Create Hybred Render System for TOP-DOWN Game Stype

Discussion in 'Graphics for ECS' started by Opeth001, Dec 14, 2019.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,129
    Hello Everyone,
    im looking for advices to help me create a Hybred Render System for TOP DOWN game style with Frustum Culling.

    This is how the idea look like in my head.



    Note:
    * All Rendered Entities are Static.
    * This system have to be really Lightweight cause we are targeting Low end Mobile devices.

    my Questions:

    1) what is the Most efficient way to cull/Disable all entities that are out of range by Chunk if possible?
    * the first idea i had is set SCD to each entity in conversion flow and define it's region in a way to get them all separated in different chunks, so later we can easly cull them by chunks using regions values.

    2) how does the Frutum Culling works and is there already something ready to use ?

    3) what is the most efficient way to Collect (Mesh + Material) of all Entities validated as visible by the Frutum Culling ?

    4) how the hybred renderer is gaining performance by static entities ?

    5) do you think this can be efficient enough to run flawlessly in low end devices ?
     
    Last edited: Dec 15, 2019
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,326
    The computational discrepancies between low-end and high-end devices on the CPUs is much less than the discrepencies on the GPUs. RenderMeshSystemV2 does exactly what you describe (except for the fact that is uses ChunkComponents rather than SharedComponents) with the optimization of only updating the culling of individual objects that are close to the camera's frustum.
     
    Opeth001 likes this.
  3. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,129
    my project is Using URP and the current Hybred Renderer is not compatible with it.
    so is their a way to change the Current RenderMeshSystemV2 to use Graphics.DrawMeshInstancedIndirect instead ?
     
  4. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,326
    Does your low-end mobile platform even support DrawMeshInstancedIndirect?

    You might want to look at Project Tiny's new samples which use a different renderer.
     
  5. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,129
    That's a lot of informations in one answer XD

    i didnt know that DrawMeshInstancedIndirect is unsupported by some devices, i though it's a just a way of rendering in batches.
    how can i know if a device supports the DrawMeshInstancedIndirect ?
    for the moment we are preventing all devices under the Android 6.

    ill take a look at it thanks!!!
     
  6. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,326
    It used to be not supported for devices which didn't support compute shaders (OpenGL ES 2.0 devices). But they changed up some stuff with SRP (something weird was going on with light indices) and now I am not so sure that that is true of if they have it emulated. I would write a simple test that uses DrawMeshInstancedIndirect on your low-end hardware and see if it works.
     
    Opeth001 likes this.
  7. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,129
    im sorry but i didnt get what you mean by this ?
    i just took a look at Tiny's new samples and they are using the Regular Hybred Renderer.
     
  8. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,326
    I haven't figured out why the Hybrid Renderer is in that project, but there's the code for Tiny.Rendering which is a different renderer. Unfortunately I haven't been able to play with it much to say more about how the two conversion systems play together and not interfere with each other.
     
    Opeth001 likes this.