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"

Performance question : One Actor with many components or Many Actors

What is better and performance friendly ? or is it the same ?

Putting an actor with several components in the scene (like for example a BP with many static mesh components) Or place many static mesh actors in the scene one by one.

Thanks for answering.


Product Version: UE 4.17
more ▼

asked Jan 17 '18 at 07:52 PM in Rendering

avatar image

13 1 2 5

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

If you can choose, one actor with N components is more efficient than N actors with one component (root) each.

For example, if you move an actor through the world using SetActorLocation and you have the Sweep option checked, only the root component of the actor is checked for collisions, all the children components are not. They just move along with it.

On the other hand, if you N actors and move them all at once, each root component needs to be checked for collisions, so complexity is O(N) vs. O(1) for the previous case.

A similar reasoning applies to draw calls to the point that UE4 has an Actor Merge function which allows you to merge actors in the editor to reduce complexity and hence limit draw calls.

more ▼

answered Jan 17 '18 at 10:21 PM

avatar image

2.2k 10 6 12

avatar image Mush. Jan 18 '18 at 02:22 PM

Ah ok, thank you !

So, basically, the draw call is running per actor, so if I have an actor with several components (like several mesh components), the draw call will run for all these components at once because they're part of the same actor. Is that right ?

In term of performance, we can say roughly that (for example, spawning multiple static meshes) :

High Cost performance -------> Low Cost performance : Multiple Actors with one component THEN One Actor with several meshes components THEN One actor with several instanced static meshes components THEN One actor with several instanced static meshes components (of already merged meshes)

Is that right ?

Thanks a lot ! Just trying to really understand the subtles differences between actors, components, instances, ... these last days !

avatar image vr_marco Jan 18 '18 at 02:33 PM

These are pretty much the general rules. There are always exceptions of course. The best thing to do is to keep monitoring your performance as you develop to make sure you stay within your target FPS. This is especially important if you are developing for example for VR where you need to guarantee you meet strict performance targets.

avatar image Mush. Jan 19 '18 at 03:39 PM

Allright ! Thank your for answering ! I have to get more into the performance and profiling stuffs now. It could be really helpful indeed !

(comments are locked)
10|2000 characters needed characters left
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