Materials and VRAM


In GPU rendering, VRAM is a precious commodity. Even with improvements in out of core memory (where assets are stored in system RAM, which adds to render times) and hardware technologies like NVLink that allow for GPU cards to pool memory into a large, single base, it is still necessary to be mindful of how assets can consume VRAM. Efficient use of VRAM will produce faster renders and allow for more data to be rendered with the resources at hand.

What follows are some tips and pointers to help with managing resources to best fit within the VRAM available in OctaneRender®.
**

SYSTEM VRAM CONSUMPTION

Operating systems will reserve a large portion of VRAM for system use, housekeeping and so on. This is unavoidable, though new drivers are trying to reduce this footprint by a notable degree. It is not unusual to see as much as 25-30% of VRAM unavailable to Octane to render. This will be evident in the Live Viewer memory display found in the info panel.
**

MATERIAL VRAM CONSUMPTION

Octane materials are comprised of a variety of nodes that serve many purposes. Some of these nodes are containers for assets like image textures, procedural texture generators and so on. In many cases, materials are created with many different occurrences of a variety of nodes that can contain expensive assets (usually high-resolution images). With many materials built in this manner in a scene, VRAM consumption will be unavoidable. This should be kept in mind with the resources that are constructed and assigned.

TEXTURE RESOLUTION

The best texture resolution is determined by how large an asset appears in a given scene, the available amount of VRAM, etc. Scenes with many high-resolution textures consume VRAM, as will displacements, subdivision surfaces, etc., in consideration of the other factors mentioned here.

TEXTURE COLORSPACE

Colorspace is as important a consideration as resolution when it comes to image textures. This is particularly important with incorporating an ACES workflow into the pipeline.

MATERIAL COPIES OR DUPLICATES

It is best to ensure that you use your VRAM as efficiently as possible. One way to do this is to ensure that you are using just one material for objects that are copies of each other. If you have ten copies of a tank, for example, and ten copies of the material applied to the tank, you are wasting VRAM. Instead, assign just the same one of the materials to the tank, and delete the copies. Your materials in your example are using high resolution textures in multiple channels, and this will chew through VRAM quickly, so really pay attention to that.

IMAGE TEXTURE POINTERS

Next, regarding the image textures themselves, here are some considerations:

  • Image texture format is important. For highest quality results, use the TIF or EXR formats, as these are lossless formats that can be compressed. A good compromise between quality and size is the PNG format, though PNG files will take longer to render, due to the way that they are compressed. The JPG format is also common to find, however the suffers quality issues due to compression artifacts.
  • Always use the Image Texture node for loading in texture maps. This node is far more efficient and faster than the Cinema bitmap node.
  • Always make sure that the Image Texture node Type is properly set for the image that you are using. For colors, use Normal. For grayscale, choose Float. For things that are to be masked, choose Alpha.
  • Always make sure that the bit depth mode is set properly. That is the button that defaults to the label “Automatic.” You can choose from Automatic, 16-bit float, 32-bit float.
  • You can use image compression if you wish. These are the options from the previous menu are; RGB Floating point -> 8bit(BC6); RGB -> 4bit(BC1)(No alpha); RGBA -> 8bit(BC3)(faster); and RGBA -> 8bit(BC7)(high quality). These compression options will save your VRAM consumption. Sometimes these options can lead to instability, however, and are a combination of GPU card drivers and other issues. if you experience any instability using these compression options, then switch back to Automatic and try again.