Home Technical Talk

Polygonal foliage vs cutout plane foliage - which is cheaper?

polycounter lvl 7
Offline / Send Message
Ravenok polycounter lvl 7
To test this I made a scene (in this case on unity), placed 600~ planes with a simple cutout shader, and another 600 polygonal leaf models with the same cutout shader (no texture applied). I switched between the 2 types and checked frame rates, batching, etc.
I played around with other shaders, too.

Results in terms of performance show that there's very little difference unless I'm using different shaders, however batching with the polygonal objects is much worse.

Does anyone have experience with the innerworkings of this kind of stuff and could shed some light?

Replies

  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    I am not sure what Unity does when you don't have any textures applied to it, it probably doesn't calculate the pixel shading. Although this test is not so good if you don't have a bottleneck around it, did you place tons of trees all around? Framerate will only change if you really have tons of stuff around. Batching will convert everything that is static and same material into one drawcall if you dont have any setup visibility, there's not much you can tell there.

    Also your title seems a bit misleading with your text, it sounds to me you have -
    A: A cutout shader with textures applied
    B: A cutout shader with no textures applied

    or is it

    A: A cutout shader with textures applied
    B: A mesh cutted out on the leaf boundary with no textures applied and simple shader.
    Mind showing the scene?
  • Ravenok
    Options
    Offline / Send Message
    Ravenok polycounter lvl 7
    bugo said:
    I am not sure what Unity does when you don't have any textures applied to it, it probably doesn't calculate the pixel shading. Although this test is not so good if you don't have a bottleneck around it, did you place tons of trees all around? Framerate will only change if you really have tons of stuff around. Batching will convert everything that is static and same material into one drawcall if you dont have any setup visibility, there's not much you can tell there.

    Also your title seems a bit misleading with your text, it sounds to me you have -
    A: A cutout shader with textures applied
    B: A cutout shader with no textures applied

    or is it

    A: A cutout shader with textures applied
    B: A mesh cutted out on the leaf boundary with no textures applied and simple shader.
    Mind showing the scene?
    What I have is:

    A: A cutout shader with a texture applied which gives it the shape of a bunch of leaves.
    B: A simple mesh modeled to the shape of the same bunch of leaves, with no textures at all.

    I will create a new scene with materials I can show and share it. I'll create a bottleneck too somehow. I was hoping the sheer number of meshes I'm using would be the bottleneck.
Sign In or Register to comment.