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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Static mesh draw calls?

So, if I understand this properly the engine has a feature to use 1 draw call for all copies of one mesh, right? I try to use "stat scenerendering" to see how many draw calls I spend. There're many lines but I guess the "Mesh draw calls" shows me the number I want. Right now it's 300-600 draw calls but I have only 3 static meshes in my scene plus around 100 copies of them and a few BSP meshes.

So does that feature works by default or I should turn it on somewhere? I have 5-6 BSP cylinders with 64 sides each. May the engine count each side as one draw call?


Product Version: Not Selected
more ▼

asked May 29 '14 at 10:58 AM in Rendering

avatar image

13 6 8 11

avatar image DarthB May 29 '14 at 11:01 AM

Take a look at InstancedStaticMesh

The technique you want to use is refered to as instancing!

avatar image Fungy Jun 02 '14 at 09:13 PM

Is there an easy way? A checkbox or something? I cant even code a "Hello world' =\ I just want to reduce my scene draw calls, i thought instancing feature is implemented in the editor.

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

2 answers: sort voted first

The engine does not automatically issue one draw call for many components using the same mesh, however components using the same mesh and material do get reduced state setup overhead during rendering. Instancing is the hardware feature that allows many meshes with one draw call, and can only be done with an InstancedStaticMeshComponent. The reason we can't use this all the time, and that you have to set it up manually, is that quite a few of the per-object features that normal components support don't work as a InstancedStaticMeshComponent. For example - lightmaps, and most of the settings under PrimitiveComponent / Rendering. Some of these are due to limitations of instancing and some we just haven't implemented yet.

Also, hardware instancing actually increases GPU cost, because all the per-object work has been moved to the vertex shader. So if you have a lot of high poly meshes, instancing will reduce the rendering thread (CPU cost) but increase the GPU cost to render them.

In summary, components using the same mesh and material will render faster automatically, but with the same number of draw calls as if they used different materials.

more ▼

answered Jun 03 '14 at 12:02 AM

avatar image

1.9k 31 11 72

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

Instanced Static Meshes Easy To Use in BP

You can do exactly what you want in BP only !

You need to use the "Add Instance" function of the Instanced Static Mesh Component that you add to some actor in your game.



more ▼

answered Jun 02 '14 at 10:17 PM

avatar image

10.6k 446 345 1088

(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