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"

Extremely Slow When Having over 1000 Objects in the Level

When I simulate the level with over a thousand objects in it, the editor runs extremely slow, and I checked that I have enabled the right graphics card. Is there a cause to this? And is it still gonna be like this after I have my game packaged?

Product Version: UE 4.21
more ▼

asked Nov 29 '18 at 10:39 AM in Blueprint Scripting

avatar image

47 4 4 10

avatar image Tuerer Nov 29 '18 at 11:51 AM

What do those objects do? Are they just meshes or blueprints with some functionality?
Try launching a Standalone game instead in the editor. See what changes.

avatar image ANoobyBird Nov 29 '18 at 12:50 PM

Thank you.

Yes, these are blueprints with some functionalities. I`ve improved the blueprints a little bit and now things become really slow when the number of objects reaches 10000. And there seems to be no difference between a launched standalone game and editor version.

avatar image Tuerer Nov 29 '18 at 01:14 PM

Do these BPs have anything peformed on ticks or timers with lots of iterations per second? Or maybe timelines or delays?
I once tried spawning about 40-50 BPs that should have rotated depending on their movement vector, with that rotation executed on ticks. That didn't end well. I had to drop the alignment functionality and disable ticks entirely, then it worked well enough.
As for 10000 BPs... that's quite a lot, actually. I wonder what they do.

avatar image ANoobyBird Nov 29 '18 at 01:53 PM

Yes, some of them are spawned in a loop body, and they themselves have operations that contain delays, and the delays I`ve set up should have made them do whatever they do (which is to spawn the rest of the actors that are different from themselves when it comes to it) in a single second. So could these iterations be influencing the performace? Since, you know, theoretically they should be very fast.

And just for fun`s sake, let me mention a previous issue before having this current issue. I was attempting to combine tick events with foreachloops, which gave me an infinite loop error. And after a day or so I decided not to mess around like that.

avatar image Tuerer Nov 29 '18 at 02:16 PM

In my experience, that would influence performance a lot; even though those operations are quite fast and simple, they have to be performed for thousands of times every tick or other period of time.
Do you mean that those operations are finished within the first second of each BP life? And after that second, they do nothing?
Or do those operations continue performing throughout the entire lifetime?
In the first case, you can try totally disabling any activity of the BP once the operations are comleted. Like, disable Actor tick, Clear and Invalidate timers etc.
In the second case... well, the perspectives aren't good, I'd say.
Either way, I'm sorry to say that, but I don't believe you can achieve high framerates with such a high number of functioning BPs with the functionality including latent nodes and stuff.
Is it maybe possible to achieve what you're trying to achieve otherwise? Maybe you can explain your goal a bit, and people here might give some ideas.

avatar image ANoobyBird Nov 29 '18 at 02:49 PM

Well, they should be finished within the first second or at most the first few seconds, given the total count of 1000 or 10000 and the according delay, and then most of them do nothing. But the user can still interact with them and even move them at a certain speed so maybe I need to keep the ticks on. And actually I am trying to get the second case working for some certain BPs...

What I`m trying to achieve is for the users to be able to create and modify and delete a huge (hopefully arbitrary) number of those actors, there are limitations of course, the users can only change some specific properties of the actors to some certain extent. The actors for which I am trying to get the second case working are those that should be dynamic and moving randomly in a range every tick...

If these couldn`t be done in blueprints smoothly, could they be done in C++? Though I haven`t yet learned coding games in C++.

avatar image Tuerer Nov 29 '18 at 03:02 PM

Wouldn't it possible to implement all those interaction functions within the character blueprint and only change the actors those functions apply to when needed, and make all the internal functions based on events/interfaces called by the character?

avatar image ANoobyBird Nov 29 '18 at 03:27 PM

Sorry, should have specified that the functions and interactions are indeed applied by events yes.

But still need timers to keep them moving at a certain speed when these functions are applied and until their movements are finished. So essentially the delays and timers are for visual effects, so that they move gradually toward the goal instead of teleporting. But visual effects aside, the only reasonable way I could think of to spawn really large numbers of actors is to use iterations.

And especially for those actors which move randomly in a certain range all the time, the only way I could think of is to enable ticks.

avatar image Tuerer Nov 29 '18 at 03:40 PM

Idk then. Thousands of actors with functions performed by tick... I can't see how that might be done without massive framerate loss. You should try to come up with some other way to do what you want.

avatar image ANoobyBird Nov 29 '18 at 03:55 PM

I`ll surely try.

Thank you.

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

3 answers: sort voted first

Well c++ is much faster but with the amount of Ticks running events i dont believe he will see any performance gain, I believe first: make sure that you dont have any errors, you know does "Accessed none trying to find my nose" errors not the exact error but you know what i mean, Those errors can definitely ramp up serious frame Loss really fast.

Second:, uncheck "start with Tick Enabled in your blueprint defaults and use "Timers" Setting the interval anywhere from "0.011 to 0.023" (Anything higher will tick slower) across all of your actors, using random float or something, this way all actors arent running at the same interval. maybe even implement a function in your game mode where according to the actors distance it would set its interval, kind of like a priority system.

Third: LOD's make use of them vigorously.

Fourth:Skeletal Meshes, use Bone LOD's (Reduce bone count the farther away it is from player camera)

And in the as jozi341 said C++, At least the big calculating cpu intensive operations

Just a few things you can do hope it helps any! Good Luck!!

more ▼

answered Nov 30 '18 at 11:59 PM

avatar image

56 2 5

avatar image ANoobyBird Dec 02 '18 at 06:28 AM

Thank you.

Your suggestions have been very helpful and I`m starting to see tremendous improvements on the performance of my project.

avatar image porckchop Dec 02 '18 at 07:27 AM

Glad i could be of some help, if there is anything else i can help with dont hesitate to ask, Good Luck!

avatar image porckchop Dec 02 '18 at 07:32 AM

Oh and soon ill be releasing a quick and easy way to LOD all of your meshes at once, with just a few clicks & 100% Plug n Play so look for it in the marketplace soon. if your interested, ok. :)

avatar image ANoobyBird Dec 02 '18 at 11:34 AM

Thank you. I`ll go look for it. Have you decided its name yet?

avatar image porckchop Dec 02 '18 at 06:10 PM

Not yet ill see what we come up with this week :)

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

Push em into C++. C++ is much faster than BPs and when it comes to thousands of actors with functions, there is no way doing it in blueprints without performance drop. If you don't know C++ but have any basic experience in coding in any language, start learn it :) There are a lot of tutorials for beginners and it looks scary from start but within few days/ weeks you will be able to make simple functions for your actors... Check comparsion between C++, nativized BPs and pure BPs:



The other MUCH simplier way is to nativize your blueprints, basically translate them into C++ code. Check documentation: https://docs.unrealengine.com/en-US/Engine/Blueprints/TechnicalGuide/NativizingBlueprints

more ▼

answered Nov 29 '18 at 03:56 PM

avatar image

102 6 9 13

avatar image ANoobyBird Nov 29 '18 at 04:15 PM

Thank you.

I haven`t learned C++ yet, but I mean to do it.

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

Well here's that LOD tool i mentioned, tell me what you think, Ive put this baby thru hell and back and works amazing over 10000 meshes in a little over a minute. Fast, Easy, just click and go. https://youtu.be/YaHsUNBU6UQ

more ▼

answered Dec 13 '18 at 08:44 AM

avatar image

56 2 5

avatar image ANoobyBird Dec 13 '18 at 10:51 PM

It`s actually much more convenient and efficient than I thought it would be! Really great tool that can save tons of time and make a difference in the development.

avatar image porckchop Dec 14 '18 at 04:27 PM

Now how much would people be willing to pay for this on the marketplace thats what has me locked down :( I mean we could use the income for our project development.

avatar image ANoobyBird Dec 14 '18 at 05:38 PM

Perhaps an online survey or inquiry would help.

Maybe you can even put different versions of this handy tool in the marketplace, for example it would cost a bit for the core features and some more for extensional features, so that different people may choose according to their own preferences.

(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