Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about draw calls
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#2
RE: Question about draw calls

I'm no engine coder, so I'm not 100% sure, but here's how I think things are:

First of all, the number of drawcalls depend on 1.: The number of separate meshes and 2.: the number of different materials that are on screen at the same time.

Furthermore, if you have the texture multiple times in multiple model folders, the engine obviously can't know that it looks the same. It will thus lie in memory multiple times. (duh... Wink )
If several materials point to the exact same texture file, it will only lie in memory once. Since the number of drawcalls depend on the number of materials though, that doesn't get reduced. You'll just save memory.

If several meshes use the same material, that will reduce the number of drawcalls. You'll still get a drawcall for each separate mesh though, so for maximum drawcall reducing you would have to also combine them into a bigger mesh.
This, however, isn't necessarily better for the overall performance in the end, since instancing the same small mesh multiple times will save memory compared to having one big mesh lieing around in there. In addition to that, you might also lose performance depending on how the engine handles culling. (= throwing out meshes that are not visible) If it can only cull whole, separate meshes, having one big mesh that sprawls through your entire level can hit performance quite hard.

So it's always a bit of a balance act between memory and render time, depending on the inner workings of the engine at hand. Maybe someone with more knowledge of how hpl works "behind the scenes" can help you with that.

Here's a nice article about reducing drawcalls, btw. It's for Unity, but the general techniques shouldn't be too different. (Apart from the fact that hpl doesn't have the built-in functions mentioned, like the auto mesh-combine, you'd have to do that by hand)
(This post was last modified: 04-24-2013, 02:07 PM by xxxxxxxxxxxxxxxx.)
04-24-2013, 01:52 PM
Find


Messages In This Thread
Question about draw calls - by JonnyAnomaly - 04-24-2013, 12:32 PM
RE: Question about draw calls - by xxxxxxxxxxxxxxxx - 04-24-2013, 01:52 PM
RE: Question about draw calls - by JonnyAnomaly - 04-24-2013, 02:23 PM
RE: Question about draw calls - by JonnyAnomaly - 04-25-2013, 08:31 AM



Users browsing this thread: 1 Guest(s)