Article: Content Creator Blog - Draw Calls and Materials

Fascinating (really). I love how these blog lessons address important and complex stuff while keeping the explanations short, simple and pictorial.

I can follow everything said in this one, except for this little bombshell; "It is also worth noting that the benefits of reducing draw calls decreases as polygon count increases. In fact, you can't have a 100k mesh with a single draw call - the game won't allow it."

It seems to contradict everything Windwalkr and others have been telling us for years about using as few materials as possible, put all your images into just one file if you can, etc. So I was expecting the article to elaborate but on this point, it leaves me none the wiser .
 
Last edited:
It doesn't contradict anything we've said before. Perhaps you're reading too much into the statement? The benefits decrease to some extent, but they don't go away.


At 1k vertices, going from 2 materials to 1 will roughly double your performance. Going from 10 materials to 1 could give you a 10x performance boost.

At 100k vertices, going from 2 materials to 1 won't even save you a draw call. Going from 10 materials to 1 will save you a few draw calls, but the benefits are relatively low compared to the vertex cost. Going from 100 materials to 10 is still very worthwhile.
 
Hi guys,
EXCELLENT lesson with illustrated examples :) !!
Suggestion : make the illustrations a little larger : it's hard to read the labeled texts ...
Question : what is this tiny little turquoise dot named "Map #4 bitmap" ? I can't guess its origin ? Where does it came from ?
Cheers,
Philippe
 
Hi guys,
EXCELLENT lesson with illustrated examples :) !!
Suggestion : make the illustrations a little larger : it's hard to read the labeled texts ...
Question : what is this tiny little turquoise dot named "Map #4 bitmap" ? I can't guess its origin ? Where does it came from ?
Cheers,
Philippe

Suggestion: Click on the image to get a full size version ;)

(also added some text to indicate they are clickable)
 
Hi Deane and Tony,
Thank you :) ! I knew that, but I find that, in the full size version, the text is hardly readable, especially on the gray labels ...
Cheers,
Philippe
 
....

At 100k vertices, going from 2 materials to 1 won't even save you a draw call. Going from 10 materials to 1 will save you a few draw calls, but the benefits are relatively low compared to the vertex cost. Going from 100 materials to 10 is still very worthwhile.

I thought that the poly (tri) count was still a factor in the draw call count. 100k polys, with all that supporting data, must be a significant "chunk" (pun intended!) of memory. :D

I like the series of articles as it confirms much of what I have managed to glean from many posts by Chris, Paul, Zec and others. Perhaps we need to revisit some of the HowTos to draw this all together. Or maybe add some new ones.

What about adding some help "hooks" to Preview Asset back to the WiKi reference pages and/or articles?
 
I thought that the poly (tri) count was still a factor in the draw call count. 100k polys, with all that supporting data, must be a significant "chunk" (pun intended!) of memory.


I'm not really sure what you're getting at here. Poly count and draw call count are basically unrelated. Both affect performance though.

chris
 
Me too. After opening those pictures in a separate browser window, I needed to use the "Zoom" function to make the images larger.


.
I'm looking at this on an inexpensive tablet and after double-clicking in the images they are perfectly clear. And I am due for a cataract operation!
Mind you that doesn't mean I have the slightest idea what you guys are on about, well I sort of do...................I'll get my coat...........
Mick
 
Reading the Wiki on efficiency in content creation, I see we are only supposed to use a normal map on the first LOD level. How do we do that without using another material? And anyway the normal map is there, so why not just use it at all LODs?

Thanks,
Mick
 
I'm not really sure what you're getting at here. Poly count and draw call count are basically unrelated. Both affect performance though.

chris[/COLOR]
Put simply, I thought there was a limit of polys per chunk, and each extra chunk caused an additional draw call.

I'm probably confused again. :confused:
 
Reading the Wiki on efficiency in content creation, I see we are only supposed to use a normal map on the first LOD level. How do we do that without using another material? And anyway the normal map is there, so why not just use it at all LODs?

That sounds like pretty old advice, probably dating back to 2009 or earlier. The objective was probably to reserve higher-cost materials for geometry that was close to the observer, and use cheaper materials in the distance where the difference isn't as noticeable. That's possible "without using another material" because you're probably already switching materials at some point in your LOD chain, so ensuring that the new material is not normal-mapped is free. However, it's definitely not advice that I'd recommend today:

* The cost of normal mapping is entirely trivial compared to everything else we're doing in the TANE shaders. There is a slight increase in texture bandwidth requirements, but given that we're talking about distant LODs, you're probably either going to be using smaller texture or a low MIP anyway, so this doesn't amount to much.
* The material savings are per-fragment; not per-polygon, per-vertex or per-mesh. Since there are typically far less fragments on a distant object, you're unlikely to save much by optimizing the material. An exception would be if there was massive overdraw (which should generally be avoided anyway) or if the majority of the screen was occluded by thousands of repeats of the object in question (eg. a tree).
* With modern techniques, the benefits of normal mapping far outweigh the costs. A non-scientific example: if you can save 1% performance but it costs you 50% visual quality, that's not a good tradeoff. Worse, losing the normal map is likely to mean that you'll require more vertices and polygons to compensate visually, and that WILL cost you noticeable performance.

Short version, don't do this any more. If you'd like to point me to the relevant section on our wiki, I'll update it (or you can).

chris
 
Put simply, I thought there was a limit of polys per chunk, and each extra chunk caused an additional draw call.

No, you're right, which is why I stated that reducing material count on that large a mesh wouldn't reduce draw calls. To explain in more detail:

* If you have 100k polygons, then you pretty much mush have at least two draw calls.
* If you're using 2 materials, then you MUST have at least two draw calls.
* If you're subdividing efficiently, then you will have Material A with ~50k polygons, and Material B with ~50k polygons. That's two draw calls. Even if you replace the materials with an atlas, you still run into the polygon limits and end up with two draw calls, so you've failed to save a draw call. There are other reasons to avoid unnecessary materials, but they're less important. Still a good thing to do if you can, but not as critical as saving a draw call.
* If your subdivision is inefficient, you might have Material A with ~30k polygons, and Material B with ~70k polygons. That's three draw calls (~30k and ~65k + ~5k). Using an atlas will get you back to two draw calls, so that's a win.

(Note: the limit is actually on the number of vertices in the chunk's vertex buffer, rather than the polygon count.)

chris
 
Great answers, to both Mick's question and mine. VMT.

The third and fourth points you made in response to mine are thought provoking. There is a UV Mapping atlas addon tool for Blender that some of us have been using to map different meshes to a single texture map. I'm hoping it can be used to implement the texture atlas as described in the new WiKi page on that subject.
 
Likewise thanks for a thorough and clear explanation.

I can't immediately find the article about LOD that said to only normal map the highest quality mesh. (This is a common problem for me and the Wiki, getting back to items I want to read again).

I will find it, but in the meantime it discusses building a locomotive, with illustrations, if that's a clue to anyone about where it can be found.

Mick
 
Back
Top