Search Unity

grid-based culling/DrawInstanced system?

Discussion in 'General Graphics' started by JoeStrout, Apr 20, 2019.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I'm toying with the idea of making a VR roguelike game with my younger son — so we would have grid-based maps composed of walls (that need not be flat, e.g., cave walls tend to bow outwards), floors, and ceiling tiles. As this is for mobile VR, performance is really key.

    So it seems like the right thing to do is to use some sort of ray-casting to figure out which cells can be seen, skipping all those that are occluded, and then draw what's visible (ideally in near-to-far order) using DrawInstanced.

    Simple enough in theory, but enough work that I'd be happy to take a good off-the-shelf solution if anybody happens to know of one.

    Any recommendations?
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Test how far Unity's built-in Occlusion Culling system gets you?
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Not so far. Mostly because it requires design-time bake, and my levels will be procedurally generated at runtime.

    But thank you for responding. :) I do appreciate it.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Hmm... but perhaps SECTR VIS would do it?