Home Unreal Engine

Draw Calls Vs Material Instances

Equanim
polycounter lvl 11
Offline / Send Message
Equanim polycounter lvl 11
I'm starting work on an environment with a surrounding cityscape and I'm debating how to approach it.

I know I want to create most of it in "building blocks" (haaa!) but I'm wondering if it would be better to approach it with CSG or static meshes.

If I do it with CSG, the scene will likely have more draw calls (because each CSG face is treated as its own object) but require fewer material instances since I can tile textures on a per-face basis. (I'd use additional meshes for details.)

If I rely completely on static meshes I'll have to tile textures via different material instances, probably a few per building, but with fewer draw calls.

Thoughts?

Replies

  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    If you're truly concerned about draw calls, be sure you have some diagnostic drivers installed so you can accurately judge what is happening.

    UDK tends to be rather good with its culling and instancing. You may wind up with 6 of one and half a dozen of the other in terms of performance given the options presented.

    Why not do it with static meshes and a multi texture material setup. You could potentially even link texture selection and tiling to vertex colors. So you could have slightly heavier meshes, but still maximize your instancing and minimize material switching.
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    Equanim wrote: »
    I'm starting work on an environment with a surrounding cityscape and I'm debating how to approach it.

    I know I want to create most of it in "building blocks" (haaa!) but I'm wondering if it would be better to approach it with CSG or static meshes.

    If I do it with CSG, the scene will likely have more draw calls (because each CSG face is treated as its own object) but require fewer material instances since I can tile textures on a per-face basis. (I'd use additional meshes for details.)

    If I rely completely on static meshes I'll have to tile textures via different material instances, probably a few per building, but with fewer draw calls.

    Thoughts?

    If this is purely background geometry then you should do it with static mesh. You should be able to organize your geometry and textures in such a way that each building or group of building will use the same drawcall. Have a look into techniques with tiling textures while still joining them together into a single texture atlas.

    If you need foreground and background buildings I would look into using separate sets of geometry - you could even use the procbuilding system which automatically creates LODs for far models.

    http://udn.epicgames.com/Three/ProceduralBuildings.html

    at the very least you could use massive LOD to switch between close and far models.

    http://udn.epicgames.com/Three/MassiveLOD.html

    BSP is just too limited to create truly optimised geometry.
  • mAlkAv!An
    Offline / Send Message
    mAlkAv!An polycounter lvl 5
    Proc Buildings will also batch identical meshes into a single draw call so you end up with less draw calls than using regular meshes.
Sign In or Register to comment.