Home Technical Talk

Modular pieces and draw call?

polycounter lvl 5
Offline / Send Message
Andre.Jonsson polycounter lvl 5
Hello everyone!
I have some thoughts regarding modular environments and draw calls. From what I understand each time you use a static mesh in, let's go with UDK because that is what I'm most familiar with, you will get a draw call.
For X material(s) on that static mesh you will get X draw call(s). Same goes for each light and so on, correct?
From what I've read draw calls are quite bad and should be reduced if possible.
So my question is; why would you use modular pieces if each piece adds one draw call? Is it to improve the workflow speed for level designers? If so when a level designer is finished with the level is it smart to merge the pieces sharing the same material to one mesh and then generate a new lightmap for that mesh?

Would appreciate an answer on this! If there is no "right" answer, which I guess there isn't, please post your opinion on the matter.

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Instancing is one good reason. A level may have upwards of 15-20 million tris in - you dont want to be storing all that as unique geometry if you can avoid it

    LODs are another. If its all in one piece you cant lod it out smoothly

    Im not sure on what unreal does but its entirely possible to batch draw calls per shader rather than per mesh which gets around the issue - not that there arent downsides to doing it that way. Its always a tradeoff.

    Generally speaking if the people who made the engine work a certain way then its probably a good way to work. You cant make gross generalisations about performance and theyre all tuned in different ways
  • rollin
    Offline / Send Message
    rollin polycounter
    If you see it from a very basic technical position you have to separate the production process and the usage in game. A modular environment could use just one material and merged to one big mesh. So just because it's modular you don't get many drawcalls. Also some batching modes can reduce the drawcalls on identically objects. So it really depends on what the engine or preprocessing tools are doing with the modular objects.
Sign In or Register to comment.