Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Draw call question

Hello, I have noticed, that when I look closely into draw call count, I have always 3 draw calls per skeletal mesh, and 2 draw calls per static mesh. Both meshes have only one material. Tested on multiple meshes including stock ones. What does other draw calls stands for? I thought they are used for shadows and post processing, but draw count is still unchanged despite being on empty level with shadows turned off.

Product Version: UE 4.19
more ▼

asked Jun 29 '18 at 06:43 PM in Rendering

avatar image

Predator CZ
16 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Without knowing the details of your project, I will make these assumptions:

In the case of the Static Meshes, you will have one draw call for the geometry, and another for the material (if it's not too complicated).

For the Skeletal Mesh, you might have an additional draw call for the skeleton (mesh, material, skeleton). Or it might have a more complex material.

more ▼

answered Jan 31 '19 at 05:50 PM

avatar image

216 4 4 11

avatar image Predator CZ Feb 01 '19 at 09:04 AM

Thank you for your answer, but I think you're partially correct. Theese are my assumptions.

1st draw call is for vertex buffer/object itself. Where is updated vertex per index. 2nd draw call would be for constant/uniform buffer where projection matricies and other data are stored. This is updated per-frame. 3rd draw call would be for animated bone matricies for skeletal mesh. Again updated when engine needs to reevaluate bones (animation tick).

Materials are converted to shaders themselves, they have nothing to do with draw calls.

Of course I have no proof that it works that way.

avatar image Doctor_Kannon Feb 19 '19 at 01:34 AM

Materials do affect draw calls.


avatar image Predator CZ Feb 19 '19 at 09:23 AM

Material complexity (or shader instruction cost you mentioned) has nothing to do with material count itself. Every mesh object will be split into buffer chunks by materials, so one material(shader) will have only one buffer. So if mesh will have 2 materials, it will be splitted into 2 separated buffers, doubling draw calls. That is the case of video you posted. In my orginal post, I had only one blank material.

I must also warn you, that this video is really super bad example, there are much better ways to merge materials than using "If" statement. You can edit UV channel on model itself and create texture atlas for it, or create additional UV channel and using lerp/add for blending between them. Much less instruction cost and more error prone, since IF is not 100% reliable, because of floating point arithmetic.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question