Help with weird “Cuda Error: Out of memory”

Hey, can anyone help me… I just wanted to do a quick clay render to see some shadow issues but I keep getting a “Cuda Error: Out of memory” message come up. I’m running the render off of my GPU which is an 8GB 1080 GTX so I cant really image a problem.

I turned off caustics and put the samples at 64 and still I’m getting the error. I cant image the scene being over 8GB… Would anyone be able to offer any advice and maybe try the render with their PC? (blend file bellow)

blendca.blend (7.3 MB)

Hi. If you’re using Micro Displacement / Adaptive Subdivision memory can spike. Command line rendering can improve performance. See the docs and [tip] Render lighter, faster: “Keep UI” and have “UV/Image Editor” window closed
Couldn’t test your file.

Weird that it’s stopping at 6.5GB though?

1 Like

Hi.
You see if you can use more optimized Modifiers setup on wheels/tires to keep the number of vertices controlled:
https://docs.blender.org/manual/en/dev/modeling/modifiers/introduction.html

I’m not sure about the purpose of those two solidify modifiers.

As you are using denoiser, it may also be convenient to use a smaller size of tiles, such as 480x270

I’ve experienced this issue recently on a brand new laptop I specifically bought for Blender, and I seemed to have solved it by using smaller render tiles.

I had them set at 200 or 256 for X and Y, as these worked well with many projects when GPU rendering.

However, during heavy geometry renders, I’ve switched those to 128x128 or 64x64 and was able to render completely, even as those dimensions do take longer, since there are more tiles to be rendered.

Inspecting your settings, I see you have the render tiles set to 512x512.

This almost certainly seems to be the problem :slight_smile:

I’d recommend trying 256x256, then 128x128, and then 64x64 until you get a fully renderable result :slight_smile:

Best of luck with your project!

Okay, upon further inspection, this is what I’ve found (in addition to the perhaps-too-large-for-your-GPU render tile sizes):

the tires were the main problem: excessive vertices.

The treads were the main issue there.

Also, the hubcaps were fused with the body of the vehicle.

When the subsurf level for the tires was anything above 1, then the CUDA error would appear due to memory issues.

A quick fix I implemented was to instance the tires, treads, and hubcaps, and separating the tires from the treads so the tires could be further subsurfed while the treads were left at 1 subsurf level.

In the example blend, I replaced the tires with ALT D’d copies of one tire (even as I noticed the front tires were somewhat slimmer). I also applied thickness modifiers. At the time, I simply wanted to see if this was even renderable :slight_smile:

To put it through a real test, I set it at full HD resolution, with 256 render samples and 256x256 tiles.

Peak memory was a mere 675.1 MB :slight_smile:

Here’s a look:

Attached is an example .blend file for your review:

blendca-Example.blend (9.8 MB)

The area lights kept producing strange results that seemed to suggest subsurf was too low, especially on the back of the vehicle, so I swapped those out for mesh (plane) lights, which, on my system, seemed to render faster while giving better results.

An odd artifact kept appearing in the windshield (lower right), and that appeared to be an overlapping face (not enough distance between faces), so I seemed to have corrected that with a slight ALT S.

I hope some of this can be helpful to you!

Take care, and best wishes on your project!

1 Like

@obloquy If your purpose is rendering, then you should be using normal map for your tyres instead of creating all that geometry physically. It’s just too much. (Same applies for your other objects)
Normal or Bump map gives the illusion of depth for such micro-details on low-poly objects. Example:

Thanks for the command line tip. :+1: I just tested and it literally reduces the peak memory by 3-4 times (and render time is noticeably shorter).

2 Likes

Many thanks to everyone who answered. Robert T (thanks again) and you’re absolutely right, the main problem was the geometry on the tyres which when I removed (and decreased the tile size) worked perfectly. Also going through and turning down the sub div levels down worked a charm too.

Also thanks as well filibis, should’ve thought of that before I bothered to array a pattern for the tyres! ha

Many thanks all!