x

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"

Video memory getting filled with unused textures?

Hello,

I'm running a project that spawns a bunch of static meshes of cars. Each of these cars has a dynamic material used for paint (from the Automotive materials pack) so they can all have random paint colors.

Now, when I spawn all the cars in a level blueprint, then let the level run then completely reload the level (with a call to the Load Level node) everything works fine. I can run this process as long as I want.

However, to get a performance increase (and increase the size of the level) I stopped reloading the level when I want different car meshes spawned and instead call the Get All Actors of Class node, loop through all the cars and destroy them. I then call the process that respawns all the cars. This also works, but after about 10-15 cycles of this, the project crashes, popping up a window that says "Out of video memory trying to allocate a texture!"

Do I need to explicitly delete all the dynamic materials created when spawning the cars somehow? This whole thing feels like garbage isn't being collected if I don't reload the full level (which I'd rather not have to do).

Any help will be appreciated, thanks!

Product Version: UE 4.18
Tags:
more ▼

asked Apr 12 '18 at 08:34 PM in Rendering

avatar image

RelativeQuanta
1 2 2 6

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

1 answer: sort voted first

In an attempt to figure out what was filling up the memory to cause my crash, I added a blueprint call to execute the memreport console command. Now I no longer get memory overflow crashes and no indication of what was going wrong in the memory report. As soon as I remove the memreport command, I get out of memory crashes again. So this call clearly does something. (Crash message below)

alt text

So my problem is gone, but I don't understand why. My best guess is that asking for the memory report forced garbage collection that wasn't happening earlier.

Leaving this open since I have no idea why the memory issue stopped. Thanks!

more ▼

answered May 14 '18 at 03:20 PM

avatar image

RelativeQuanta
1 2 2 6

(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