Out of Video memory while painting roads, editor closed with hours of work lost.

Hi, I’m painting road textures rather than using road meshes. After a few hours of painting the roads the editor crashed saying out of video memory. I’m using a 970 with 3GB video RAM. Either I’m using the wrong kind of card for the development of games with UE4, or I should be using meshes rather than painting textures, or there is something else I should be doing to prevent the editor shutting down. I initially tried using splines with meshes with no issue but ran into issues with pavements and junctions. Needless to say, the solution of painting the roads wasn’t even remotely near completion, so I have a big problem. Even if I knock my textures down to 1024 for the road, I’ll still end up running out of memory too soon. Any advice would be appreciated.

Painting roads is probably going to use too much memory without getting enough detail in the road.

Hi Darth,

Given that this is a close down rather than a crash I can only assume it’s a design flaw rather than an actual ‘bug’. The workaround/solution seems to be to enable ‘FPS and memory usage’ in project settings and save when the memory usage starts to get close to your RAM limit. Not that system RAM is the same as video RAM, but hey ho, seems to have let me get through a solid 12 hours of painting without coming up with that error again.

Your comment about the memory usage certainly leaves me concerned, as I abandoned meshed because landscape spline roads would not work for me in terms of having pavements and junctions, and blueprint splines had their own set of issues for me. What seemed to logically make sense to me was to paint the road and use meshes for the pavement. I assumed that because I would have to apply a texture to the road mesh, I might as well just not bother with the centre of the road at all and just paint it on, and then add pavements via splines (there is method in the madness).

Ultimately I think what is puzzling me is why painting a texture onto a landscape should be more memory costly than having the texture natively on a road mesh. Anything you can offer in terms of an explanation would be appreciated. Thanks.

A road mesh has much less data, it’s like a vector graphic vs. a raster graphic. For example, I had to do some 3D models of airports, to do the lines on the runways I cut them out of meshes rather than making textures because it wouldn’t get enough detail in the textures for something big.

In the future you should ensure auto save is turned on and saving every 10-15 minutes. Losing hours of work is much worse than the relatively minor interruptions it causes. If auto saving is taking a long time, at least make sure you are manually saving every 30-60 minutes. If necessary download a timer app of some sort that alerts you after a set amount of time to remind you to save.

The engine crashing is obviously not ideal, and the issue you raised does need to be looked into, but taking steps to save/backup your work is a must with any kind of software development. Even if the editor never crashes on you again, it is a good habit to get into saving and backing up your work often as you never know when crashing or data corruption may strike.

Hi DotCam, thanks for the advice, yes 12 hours without saving was a tad foolish really, I confess that the auto save is turned off through my doing as I found them to be cumulatively more than a minor interruption given the time it takes for it to save and I got a little engrossed. Funny you should say save 30-60 minutes manually though as I have found this timeframe is indeed a nice compromise and spot on as a solution to the out of video memory issue which also works as a good practice in general. Ultimately I probably need to get myself a solid state drive to speed up loading and saving although strangely the engine can a take a long time to do either without really taxing the mechanical drive/cpu/memory at various stages of saving, so it does get a little difficult to know where the bottleneck actually is. I take the paranoid approach of backing my project up after every chunk of work I do, onto another drive, then onto yet another drive that is raided on offsite location. The video memory shutdown was a good prod for me to save more often and not get too blasé about it :slight_smile:

Hi Darth, thanks for the explanation, I appreciate that, it certainly gives me pause for thought on my approach

One more thing that might be helpful for you if you need to do more painting is to go to:

Edit -> Editor Preferences -> click the Performance tab -> enable the “Show frame rate and memory” setting.

This will show you your current memory usage in the top right corner of the editor, so you can keep track of how close to running out of memory (RAM not VRAM) you are.

Hope that helps! :slight_smile:

Thanks DotCam, that really helps. :slight_smile: