Vray 1.5 memory allocation failure tutorial

17 Sep, 2011 renderstuff (Staff Author)
This article is written for V-Ray 3d rendering plugin version 1.5. You may find that some particular interface options have different names, are implemented elsewhere, or not applicable for the newest V-Ray and another software. Regardless of that, current article is written in educational story style and can be useful for anyone interested in 3d rendering concepts and methods. To get the up-to-date interface manual for your software, please refer to the official documentation.

In the last tutorial about the control of DMC Sampler’s adaptability, we learned how to affect the quality and speed of V-Ray rendering globally. In this tutorial, we will look into the settings of the V-Ray:: System rollout.

English is not your native language? Read the thanslation of this tutorial on the following languages:

French translation by Dorian Fevrier: Les paramètres de V-Ray - Le Raycasting

Official Russian version by RenderStuff: Оптимальные настройки V-Ray – Raycasting

This tutorial answers the following questions:

- How to avoid the 3ds Max crash when it is not enough RAM?

- What should I do when V-ray turning off during rendering?

- How to deal the RAM lack in V-Ray?

- How to render the scene with many millions of polygons?

- How to make computer work faster during rendering?

- What is raycasting and how V-Ray accelerates its work?

- What is BSP tree and how does its structure look like in V-Ray?

- What is the difference between Static Raycaster and Dynamic Raycaster?

- When does V-Ray use paging or swapping?

- How to switch V-Ray for working with dynamic raycaster?

- What are the Vray buckets?

- Why do we need the VRay rendering logs?

- How to change the V-Ray rendering process priority?

- What should I do if V-Ray crashes during the Light Cache calculation?

- How to calculate the best amount for Dynamic Memory Limit?

best v-ray engine settings 3.2 by renderstuff

V-Ray Crash Problems

There is one disgusting thing while rendering complex scenes in V-Ray. It can make most V-Ray users nervous. It can even fully disarm someone, killing any enthusiasm to continue any further work on the current scene. Especially unexpected and tricky this thing becomes when one is working on the commercial rendering with clearly defined deadline. All forums and discussion boards about V-Ray renderer are just snowed under with the pleading requests for help in completion rendering of heavy scene :D

Of course, we are talking about the lack of RAM during rendering, which is the prevailing reason of 3ds Max and V-Ray system crash.vray memory lack crash inserting the RAM stick

Why is this happening? What causes this error? Can’t you do anything simple? Can it really be true that to complete a big project we inevitably need to increase the amount of RAM, installed in computer? Is it true, that the only way out is to go to the computer store and buy a few more sticks of RAM?

To answer these questions, let us see how V-Ray uses the memory and what tools of managing the process of its use are available to us.

In any software, the memory management and the way of placing the data there is a very complicated and routine material. Well, at least it is a true for 3d artist. There is absolutely no sense to go deep into describing the data arrays and the ways of addressing to them. Such details are deeply rooted in the programming field. For easy managing the RAM of any software at a professional level, you have enough to know only the general idea about the processes occurring in it. Especially, considering that the user is entirely limited to the proposed interface. V-Ray is not exception here.

Raycasting, the Basis of V-Ray Rendering

Before start the rendering, V-Ray has to load into RAM the scene geometry for operative using it during calculation of the final image. This is the initial aspect of the entire rendering process. After realizing such necessity of renderer, the importance of memory management in the rendering immediately becomes clear. But, of course, we wouldn’t just stop on this and will follow the order of rendering step by step.

Once data is loaded into memory, V-Ray rendering can begin. The calculating of each pixel starts with the basic operation, namely the "probing" the geometry. This is done by using a special algorithm, the so-called ray casting. The essence of this algorithm is that camera shoots a ray, which that flies until it hits some object in the scene. Each ray intersection is fixed and thus V-Ray determines the location of geometry in the scene, its basic properties and other information required for further rendering.

Disadvantages of Not Organized Data

The process of calculation of the single raycast, i.e. the ray intersection with geometry and the determining of its properties, is not time significant. However, the number of raycasts during photorealistic rendering can exceed manyfold the number of rendered image pixels. For example, the HD 1920x1080 resolution render is made of more than 2 million separate pixels. This scale changes the situation fundamentally, making the raycasting process very resource-intensive.

Let us take a formal analogy to the technically complicated raycasting algorithm. This analogy will greatly help us understand the specific problems of memory management in V-Ray.

So, let’s imagine the scene geometry as a set of usual green tree leaves, and the raycasting algorithm as a tireless ant, which have to find the most delicious yellowish leave amongst all green ones. In our analogy, this yellow leaf will embody the needed data about the geometry, hit by a raycasting ray.

Initially, the data on the scene geometry, which will be loaded into memory, is arranged randomly in terms of raycasting process. Let us similarly suppose that all the leaves were chaotically thrown into pile.

Our hard working ant knows that he needs to find a yellow leaf among the myriad of unnecessary for him green ones. How can he do this? Of course, he will have to go sequentially through a bunch of green leaves, starting from the closest to one, until he find the one and only yellow leaf.

uuorganized data like a leaves pile, ant hardly finds the yellow leaf

He will have to approach first leaf and see whether it is yellow. Then, come up to the second and look if he needs the second leaf. After this, he has to go to the third one, and again check if that is yellow. Thereby, our ant needs to go through literally every leaf until he finds the desired yellow one.

The situation when the ant reaches the yellowish leaf at the beginning of his search is probable. However, there is also absolutely no guarantee that the yellow leaf not be the latest in pile. In such case, to find a single yellow leaf, our ant would have to go over the whole pile of greens.

A similar situation can occur with unorganized data on the scene geometry. Raycasting algorithm will be forced to sequentially go through all the geometry for determining the properties of a single point in the scene, which was intersected by raycasting ray.

This method of finding the required information is too tedious for our imaginary ant, as well as for the computer’s CPU, which instead of actual rendering has to busy oneself with non-rational searching of data in memory.

BSP tree and Convenient Data Structuring

To expedite the process of determining the properties of the scene geometry by raycasting, V-Ray organizes all the geometry into a special convenient structure.

V-Ray lays out the geometry on the shelves of the hierarchical tree structure into RAM. This structure is called the Binary Space Partitioning (BSP) tree. It is a special method of presenting an array of data as a binary tree structure.

The BSP general idea is that scene with all geometry is subdivided into two parts. This action creates the two branches extending from the origin (the scene), which is called the Root of the tree. After the first subdivision, each of the data branches emanating from the root, are again divided in half, forming new branches. Points from which the new branches emanate called the Nodes of the tree. The process of dividing the geometry of the scene and the record the tree structure branches in memory lasts as long as it reached the limit, which is set in the BSP tree parameters. The result of the last division of branches is called the Leaves of the tree. In that way, V-Ray creates the branched structure of the whole scene geometry, which is great for the quick search of the properties of the required area in the scene.

For the obvious presentation of how this happens, let's go back to our entomological example. The analogy with leaves and leaf-seeking ant perfectly illustrates how the initial organization helps in finding the needed data.

bsp tree vray acceleration structure speeds up search of a yellow leaf through the nodes and root scene

If we do not throw the leaves to a disordered heap, but carefully arrange them on the branches of a tree, we can significantly speed up the process of finding a yellow leaf. In such situation, our ant, avoiding all unnecessary branches, can go straight to the needed destination. That happens because he does not need to check all the leaves. Instead, he can almost immediately see the path that could lead him to the place where the yellow leaf grows, and quickly climb there by his strong legs.

According to this principle, V-Ray structures the geometry in the scene, catching the one more opportunity to save our precious time, even on such seemingly insignificant operations.

The basic principle of rendering at this level is quite simple: load, structure, found the necessary properties, and render :)

Now, when we met with the principle of structuring data for raycaster, we can proceed to the next step, which users come across on the way of rendering big scenes in V-Ray.

Static Raycaster & Loading the Entire Scene into Memory

As we already know, to start the rendering process the scene geometry must be loaded into memory. In the previous chapter, we looked at the tree structure, the accelerator of raycasting process.

However, as we mentioned at the start of the lesson, there is one rendering issue left. Everything goes smoothly during rendering, as long as the RAM amount, physically installed on your computer, is enough to contain the whole scene geometry.

The fact is the V-Ray has different types of raycasting algorithms. The simplest of them is the so-called Static Raycaster. It loads the geometry of entire scene into memory at once.

Imagine that we are going to start rendering a scene with many millions of polygons, so for its entire loading the available RAM amount is not enough. What happens then? Unfortunately, in this case the one of the most unpleasant V-Ray surprises occurs. It is the program crash.

v-ray exception, unhandeled exception: memory allocation failure, general windows error example

Software crash is the appearing of the unexpected critical error that prevents further normal work of the program. This like V-Ray fault happens when the free RAM has been exhausted and further filling of the geometry to the memory is simply impossible. The message about creating in memory the geometry tree structure «Current Task: Buliding static raycast accelerator ...» is usually the last thing rendering artists see Rendering information window. After that, the rendering, together with the work of 3ds Max and V-Ray, spontaneously break off, causing the error report window.

In our analogy, for example, it is an attempt to use excessively branched tree for the location of leaves. Too heavy tree that carries a huge amount of leaves and branches simply collapses, rooting out from the holding it ground.

creashed bsp tree because of the very big size in memory (ground)

The only way out of this situation without increasing the amount of RAM is to abandon the one-time entire scene loading approach. Instead, we have to load sequentially its certain parts, rendering of which should occur only at given moment of time.

As might be expected, V-Ray has such a way to load the geometry into the memory. This method is embodied in a special, dynamic type of raycaster, which is designed exactly for such situations.

Dynamic Raycaster & Loading Portions of Geometry

In contrast to the basic raycasting engine called static, the Dynamic Raycaster allows us to load only a certain part of the geometry, needed for rendering of the current image part.

Dynamic raycaster loads into the memory only a certain portion of the geometry, not exceeding a specified number of megabytes. Once the loaded portion has been used in rendering of the current image area, the occupied part of the RAM is cleared and the new piece of geometry loads to the freed place. Obviously, the new geometry portion will be used to render the following part of the image.

Rendering using dynamic raycaster eliminates the memory overflow problems not only due to the exact memory limit. Dynamic raycaster knows how to use the operating system’s potential in memory management. This means that even if the current image area calculation needs to load objects, the total size of which exceeds the established memory limit, the operating system still is able to allocate a resource for the successful continuation of the rendering. In particular, Windows will use the so-called paging (or swapping), which is the ability to save the data that cannot fit in the physical memory to HDD.

Despite the aforementioned advantages of dynamic geometry loading, we must realize that if dynamic raycaster was the really universal solution, then an unreliable crashing static raycaster would be simply needless. However, V-Ray uses the static raycasting engine by default.

The loading and unloading of the data spends our precious time, as any other operation. Even if we set the ideal (for our situation) RAM limit, the use of dynamic raycaster will significantly increase the overall rendering time. Moreover, in case of need to use paging, the rendering time will increase even more.

Shortly, these are the all the basics of raycaster work with memory and the problems of its using. Now, when we met with the principle of raycaster, let us look at its practical configuration and management tricks.

Raycaster Params: Binary Tree Settings

raycaster params of a vray system rollout screengrab

Let's start with the settings provided in the Raycaster parameters area of the V-Ray:: System rollout.

The first three parameters describe the properties of the raycasting acceleration structure, the BSP tree. They are quite abstract, so let’s begin with determining the effect of each of them.

Max tree depth is a parameter that limits the depth of the branches of a tree. It specifies the number of divisions of the scene space. The numeric value of this parameter reflects the maximum number of levels from the root to the leaf. The higher the Max tree depth value, the more a tree becomes branched.

Min leaf size limits the structure of a binary tree by a minimum size of the leaves. This option allows us to stop the division of the geometry in the scene by setting the value of the minimum leaves size in system units. Small ​​Min leaf values size let not to limit the branching of the tree, and thus it grows as much as the previous parameter defines.

Face/level coef. determines the maximum number of triangles (minimal units of geometry) contained in a single leaf node. Smaller values of Face/level coef. can produce more branched tree, with lots of leaves.

As we know, V-Ray uses the organization of the scene geometry in a form of a BSP tree to accelerate the raycasting process. It is logical to assume that the deeper our tree structure, the smaller its leaves, and the smaller the units of the geometry each leaf contains, then the more space in memory we need to hold tree’s branches and the greater is the potential raycasting speed it can provide.

However, there is a limit in such acceleration. After a certain threshold, further division is not reasonable, since the excessively branched structure of a BSP tree makes the work with itself too difficult. The raycasting algorithm may spend the computational resources for walking through the huge BSP tree, ruining all the gain in speed.

So, what is this limit and what is the best BSP tree size for getting the maximum raycasting speed?

The answer for this question is not very encouraging. Only experimentation work can help in finding the optimal BSP tree parameters. There are no fast settings for any scene. For best raycasting speed, the each specific scene must have the individual BSP tree settings.

When rendering still images, the messing with numerous experiments on the above parameters is completely unreasonable. Just because the spending lots of time for saving the same time is nonsense. You may agree that it is an absurd to make 10 times the final rendering in the search for BSP tree optimal settings, to eventually make the same rendering the eleventh time 10 minutes faster :D

However, the parameters of a BSP tree are not just a demonstration of technical abilities of the rendering engine. Their purpose becomes clear when it comes to animation. Suppose we need to render sequence of 1000 frames. Then we can safely perform an experimental selection of optimal BSP tree parameters. Even if the choice of the best values will take up to 10 or 20 final renders, and the rendering speed of each frame will increase by 20 seconds, such effort is very useful. After all, this optimization can easily save about 5 hours of computing time.

In practice of static rendering, the need to change the values ​​of these parameters exists only in theory. It can only make sense when we want to free memory to suit some other needs, so we reduce the size of the BSP tree at the price of slowing the rendering time.

In the best V-Ray settings, the parameters responsible for the BSP tree structure should be set to the default V-Ray values, without making any changes without well-considered necessity.

Raycaster Params: Configuring Dynamic Raycaster

Dynamic memory limit is parameter that determines the limit of memory available for dynamic raycaster, in megabytes. It defines the maximum amount of RAM to be used for every geometry portion during the work of the dynamic raycaster. Literally, established in this parameter number of megabytes is divided between computational threads of the current computer. Low values ​​of dynamic memory limit can significantly reduce the raycaster performance; they may lead to the frequency increase of loading-unloading the geometry portions. Additionally, small values can cause the regular use of slow paging. From the other hand, the very high values ​​may slightly slow down the renderer and greatly affect the comfort of work in operating system. The value of 60-80% of the total amount of RAM, installed on your computer, gives the best performance. That value we should use in universal V-Ray settings.

Dynamic Memory Limit calculator

Try this JavaScript dynamic memory limit calculator to determine the optimal number of megabytes for using in this parameter on your computer:

Installed memory (RAM), GB:
Operating System:
Dynamic Memory limit, MB:

Next Default geometry parameter determines the method of loading the geometry into memory. Here we can select the type of raycaster, which will calculate the geometry of the current scene. The default geometry parameter is a drop-down list from which you can choose the type of raycaster.

Before describing the default geometry options, we should mention the VRayProxy and VRayFur objects. The feature of rendering such objects is that no matter what is selected in default geometry; these exact objects are calculated by dynamic raycaster. Such a feature is implemented because these like objects are extra high polygonal, and it is better to load them by portions for avoiding the program crash.

Static is the most trivial raycasting mode. When we select static, all the data about the scene geometry is entirely loaded into memory before rendering.

Dynamic is the compromise mode of default geometry. Dynamic raycaster does not load all the scene geometry into memory at once. It loads the geometry data by portions. The number of megabytes set in dynamic memory limit determines the maximum portion size.

Auto is the initial default geometry option. In this mode, V-Ray decides which objects in the scene are better to calculate with static raycaster, and which are with dynamic. This decision is based on the properties of the particular object. Whether this object should be calculated with dynamic or static raycaster depends on the polygons and instances number of this exact object. This is a hybrid method of loading geometry, which combines the work of static and dynamic raycasters.

If we compare the types of raycasters, then we can conclude that dynamic is the most unpretentious, but also the slowest raycaster. Using it, we are free from the 3ds Max memory overflow issues, however, due to the need to fill and clean the limited amount of memory continually, rendering speed substantially slows down. When rendering with static raycaster, it on its one manages all RAM resource, available to the system. Static is the most productive, but also the most unstable mode. If all the geometry can completely fit in memory, then the rendering is as fast as possible. After all, we do not need to dose the geometry, wait for clearing the memory to load the next portion of data, and use the sluggish paging. However, if we have more data than can fit in available RAM, it will immediately cause the downfall of the program. Just recall the picture with a broken tree :)

Nominally, the default geometry set to auto. Auto is the most universal mode, so it is reasonable to use it in the Best V-Ray Settings.

Buckets Options

The settings of render region division zone of V-Ray system configurations let us choose the size of rendering portions and the order of their calculation.

render region division  of a vray system rollout screengrab

Render region division or, as it is called, the bucket is the minimum region, to which the final image is divided for sequential multi-threaded rendering. The idea of such a partitioning is similar to the idea of Number of passes function work in Light Cache. Buckets are these little squares that quickly (and sometimes not :D) ​​running around the frame buffer, gradually opening the final result of rendering to our view.

It may sound banal, but the actual rendering process, which is considered a model of multitasking, is not multi-tasked actually. The exact computation cannot be performed by more than one core, even with the multi-core CPU. You can imagine how long will the rendering last, if we use only a single processing core, while other are idle. This situation is completely unacceptable and, of course, we need a way out it. The solution for this is the equal division of the rendering process between different computing threads. The rendering is divided into many independent parts, in other words, into many small renderers, and the each of them can be computed by a separate processing thread. Thus, uniform computation is divided into several parts, allowing the full load of all computing pipelines of the system. This is how the little images, called buckets, render. When the bucket is rendered, it is displayed in a frame buffer. The rendering result is like a puzzle, assembled from small pieces into one final image :) In order for the final render does not look like a jigsaw puzzle or a mosaic, with clearly distinguished borders of neighboring cells, buckets are the subject for mutual interpolation.

Let us take a look at the exact buckets parameters.

X and Y values ​​determine the size of the bucket in pixels horizontally and vertically. By default, these two numeric fields are dependent and equal. Although, it is enough to press the button L (lock) and the independent Y value becomes available. The X and Y determine the size of bucket in pixels until the drop-down list next to X is set to Region W/H. If it set to Region Count, then the numerical values ​​in the X and Y determine the number of buckets, to which the final render will be divided horizontally and vertically.

Obviously, if the final image is divided into many portions, then the more computing resources V-Ray have to spend on interpolating their neighboring boundaries. At the same time, the small bucket is a guarantee that one rendering portion catches the minimum amount of geometry. That is good factor, because bucket is exactly that portion, which the dynamic raycaster loads into RAM.  Reducing the size of the bucket can be useful, when filling the bucket objects exceed the limit of memory, available to a single thread. A smaller bucket could theoretically take less amount of geometry, so it can possibly save rendering from the use of paging. The long and short of it, this situation is difficult to predict, so the default values ​​64x64 and Region W/H are the best for starting V-Ray configuration.

Region sequence is the option that specifies the type of portions rendering sequence or, in other words, the pattern of buckets rendering. We can choose the one of the six rendering patterns - Top/bottom, Left/right, Checker, Spiral, Hilbert curve, and Triangulation.

From the name of the first four of them it is quite to guess a way they render. With the Hilbert curve mode, the buckets follow each other in a form of a snake out of blocks, just like in game on first mobile phones :)

The last and the most interesting mode is Triangulation. With it, buckets plot the triangles of different sizes, consistently covering all areas of the frame buffer. The main feature of Triangulation is that its pattern gradually covers very dense image areas, what is very useful for dynamic raycaster work. With such a pattern, there is a high chance that the part of geometry used for rendering previous bucket, can be used for rendering the current one. This certainly saves computational resources, avoiding unnecessary operations of loading and unloading of data to limited memory amount. It is for this reason, even if you like a snake or a checker pattern, in starting V-Ray settings always use a Triangulation as a pattern for rendering buckets.

Reverse sequence can reverse the direction of buckets calculation. For example, if the rendering pattern is set to Left/right, the activation of reverse sequence option will make the buckets computed from right to left, i.e. in the reverse direction. This feature does not really affect the rendering process. However, it can be very useful in cases when rendering of the scene stopped before completion for some reason. Then the rendering can be resumed by activating the reverse direction so we can continue to render the scene from the not-rendered part of the image. In the Best V-Ray settings, the changing of this option has no practical sense.

Previous render is an parameter to specify an action performed with the previous image into a frame buffer during rendering of the new one. The Unchanged mode allows us leave the previous rendering unchanged. Cross and Fields modes let us cover the previous render with the corresponding pattern. Darken and Blue modes allow us to darken or give a blue tint to the previous renderer for highlighting the contrast. The most useful of these modes is the default Unchanged, which allows us easily watch the changes in the new render, comparing to the previous. That is the mode we should use in the optimal V-Ray configuration.

On this, all the important system configurations of V-Ray end. Following zones and setups of V-Ray:: System rollout are secondary and do not significantly affect the actual rendering. However, we will surely learn how to use them also.

Frame Stamp Statistics

Next, in V-Ray:: System rollout, is the Frame stamp area, which manages the only function with multiple parameters.

frame stamp  of a vray system rollout screengrab

Frame stamp enables adding the stamp with statistical information to the image of final rendering. With this feature on, we can add to a render a stripe with different technical information. This info can be the current frame rendering time, the name of the CPU, the current version of V-Ray, and even the size of the final image in pixels. This particular feature is designed for special occasions. For example, it may be useful when testing the scene for determining the optimal size of a BSP tree. Enabling Frame Stamp also may help you to boast before colleagues the new computer and the speed it renders the most difficult scene :) Of course, enabling this function is useless as for the starting V-Ray settings.

Distributed Rendering Setups

The following area of a V-Ray:: System rollout activates and opens the configuration of a distributed rendering mode.

distributed rendering  of a vray system rollout screengrab

This is one of the most revolutionary features of modern rendering engines. Distributed rendering allows us to render a single image using the computational power of multiple computers. To do this, the computers must be properly configured and be in a common network. V-Ray can distribute and send separate buckets to different available computers, and then collect the results of their calculation in a single frame buffer.

This is a very rich and interesting topic, which will be revealed on the RenderStuff pages in future. For now, the rendering of an image by multiple computers is far from the idea of starting V-Ray settings, so we do not need to activate the distributed rendering function.

Log of V-Ray Rendering

Next area is VRay log. It is entirely responsible for single similarly named V-Ray log function.

vray log  of a vray system rollout screengrab

Unlike Frame stamp, the usefulness of this function is obvious. Enabling the Show window checkbox in the VRay log settings, opens the information window called Vray messages during rendering, which will show logs of V-Ray. It is very convenient to see information about the rendering process. Such information can be different warnings, errors, and just the statistics. For example, VRay log is indispensable in the process of configuring the aforementioned distributive rendering. Vray messages can clearly display which computers took part in the current rendering, and which are idle. Such awareness allows us to save a lot of time and prevent many problems on the initial stages of rendering.

VRay log additionally makes the records to a text file, the path to which you can specify in the box below the Show window checkbox. It can be useful if 3ds Max has suddenly crashed. In this case, we can always open the written file using any text editor and look for error messages, among which is the one that caused the crash.

A numeric value Level indicates the depth of the ongoing statistics. The one (1) in this parameter means that the log will contain only the error messages. Two (2) is the errors and warnings. Three (3) specifies that logs must display the errors, warnings and general informational messages. Four (4) in this parameter tells V-Ray to log all the events that happen during rendering.

In order to be well informed about the most important events during rendering, in the nominal starting V-Ray settings, the Show window option must be enabled and statistics Level should be set to three (3).

Miscellaneous options

Next, are the Miscellaneous options. This zone contains all the remaining secondary system parameters  of V-Ray.

 mascellaneous options  of a vray system rollout screengrab

MAX-compatible ShadeContext (work in camera space) is a feature that allows V-Ray to work with so-called camera space.

The case is that V-Ray nominally performs all calculations in the scene space. In other words, the V-Ray itself uses geometry coordinates relative to the whole scene space. However, some plug-ins, especially the older ones, work with coordinates relative to the current camera. Activation of work in the camera space allows V-Ray to work with these plug-ins, bypassing the problem of incompatibility. That is why, in the starting V-Ray configuration, we must always keep the MAX-compatible ShadeContext option active.

The option Check for missing files enables check for missing files, such as not found textures or proxies in the current scene. The result of this check is immediately displayed as a warning in the log. Nevertheless, we usually know about the missing files in the scene. Just remember the popping out list of missing files when the scene is loaded into 3ds Max. In practice, the missing files check before actual rendering is more annoying than useful, and therefore, we are better turn off this function when setting the starting configuration of V-Ray.

Optimized atmospheric evaluation is an option that disables shading on the scene objects that are inside or outside the zone of atmospheric effects. When the option enabled, renderer does not shade the objects, which are slightly visible through the opacity of atmospheric effects. The enabling of optimized atmospheric evaluation can save significant computational resources on skipping materials calculation for barely visible objects. In such case, V-Ray first calculates the atmospheric effect and estimates the visibility of objects in advance. Since that evaluation, the non-visible objects are treated like those that do not need the shading. Of course, the automatic determination of the objects visibility through atmospheric effect is not always perfect. There may be a situation, in which the object actually is visible enough, but still not shaded. In the Best V-Ray Settings, this function should nominally be disabled.

Low thread priority is an option that automatically assigns the low priority to the rendering process in the operating system. The same can be manually done using the Windows Task Manager on the Processes tab. Low thread priority option use can relieve the computer a bit, freeing up computing resources for other applications. It allows us to work with those comfortably, even during rendering. However, resource-intensive applications can still lag despite the activation of the Low thread priority.

Additionally, assigning the low priority to any process reduces its effectiveness and, as a result, slows down the computation speed, which is very unacceptable in most cases. Therefore, in starting V-Ray settings, this option must be turned off.

Last part of Miscellaneous options section are the Objects settings, Light settings, and Presets buttons.

Objects settings and Light settings buttons call the Options windows of objects and light sources settings, similar to those that can be accessed by clicking the right mouse button on the selected objects in a viewport. These features are not actually the V-Ray settings, so they have no relation to the optimal V-Ray settings.

Presets is a function that allows us to save the settings of the current scene to the V-Ray profile and its further loading into any other scene. Using this feature can leave us from routine of setting the same checkboxes and values from project to project. This function is directly related to the nominal starting V-Ray setup. If we configure V-Ray and save its setting to profile, then we can easily use them in any new scene.

This function is obvious even without further explanation, but, in any case, its practical application and its alternatives will be described next tutorial in detail.

GI Maps Out of Control

It is noteworthy that all the described in this tutorial settings, which control the scene geometry data management, are not related to the management of GI maps data in RAM. This means that regardless of what the BSP tree size is, what kind of raycaster we have selected, and what the memory limit is, the GI maps will be fully loaded into memory and will occupy there as much space as they need.

It is a real situation, when the render passed all preparatory stages, associated with loading geometry into memory, and even started the rendering of GI maps, such as Light Cache. Then, having rendered certain amount of LC, the rendering crashes, showing the hated V-Ray exception error. This happens because the memory that remains after loading geometry is simply not enough to keep the LC information.

Unfortunately, there are no elegant solutions for solving the memory overflow during GI calculation. However, some way out exists. The most obvious is to reduce the GI maps size, by lowering the visual quality of the final rendering. There is also another compromise. We can go the way of subdivision, simply breaking the rendering of one image into several parts. For example, it is possible to render entire image using smaller region renders. For example, we can render first half of the image using region render, and then render the remaining half, moving the borders of region there. Of course, if we render Light Cache only for half of the current frame, then its map will take twice as less memory than when rendering the whole image at once.


That is the all the system settings and features of V-Ray that every V-Ray rendering artist must know.

We hope that this tutorial will help you in difficult situation when project deadlines are close, and 3ds Max suddenly crashes. Now, when you understand the basic principles of working with V-Ray renderer system settings, you are able to manage the rendering of huge scenes, regardless of your computer’s RAM amount.

All, have easy settings and beautiful 3d renderings!

18 Sep, 2011 maksvel
18 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
As always excellent material 👍 What is interesting is the next lesson?

18 Sep, 2011 Andrey
18 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thank you for another useful splint. You, as always at the height of the guys! Well done! 🙂

19 Sep, 2011 Denis
19 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Plyusanul 👍😁

19 Sep, 2011 Maks (Staff Author)
19 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for all the good reviews! 🙂 The next lesson will summarize all the optimal settings V-Ray and describe the ease of use and methods of their V-Ray as a whole.

19 Sep, 2011 Denis
24 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Tried calculator - it works ... There was a fair question: Why does your calculator Dynamic memory limit is significantly different for different operatsionok, for example, I put 1 GB of RAM, Dynamic memory limit for Windows XP was 420 MB, and for Windows Vista and Windows 7 is only 100 MB?

26 Sep, 2011 Anton (Staff Author)
26 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello! Nominally, the operating system uses a certain amount of physical RAM to your needs (naprmer GUI), after the exhaustion of that, the operating system starts using the swap. What immediate impact on the overall performance of the entire computer. It is important to do everything possible to avoid having to use swap, and the system does not start to slow down. Calculator Dynamic memory limit allows for this feature and trying to reserve, for the needs of the recommended amount of system RAM. For different versions of the operating system recommended by a different amount of physical memory for the actual needs of the system. That is why, for different versions of Windows recommended size Dynamic memory limit, taking into account the needs of the system is different. In short, if you want to know how many megabytes put in Dynamic memory limit, just use this calculator. More is not necessary to think out anything😉

26 Sep, 2011 KostYAn
26 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Explain please, dynamic memory limit is allocated only for dynamic geometry (ie, proxy, displacement and fur vireevskogo)?

19 Sep, 2011 Denis
26 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thank you for the clarification, Anton! 👍 Now everything fell into place. Judging from all Windows XP said the most rational in the use of this method.

27 Sep, 2011 Aleksey
27 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
I have Windows 7 and 8 gigs of operatives, ie, your calculator should I put in the Dynamic memory limit 6200, but this figure is not Max podnimaetsya above 3000, floor and should be?

19 Sep, 2011 Maks (Staff Author)
27 Sep, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Kostyan, indeed, paramaetr Dynamic memory limit sets the amount of memory to render objects reykasterom extremely dynamic . Do not forget that some of the objects are calculated using dynamic raycaster no matter which mode is selected default geometry 😉 Denis, Windows XP simply less demanding on system resources and, of course, with it, you can use more memory to the needs of V-Ray 👌 Alex, apparently you are using 32-bit operating system or 32-bit 3ds Max and V-Ray, which can not be used more than 2800-3000 MB of RAM, due to technical limitations. In other words, your 5 gigabytes of RAM are currently out of work. Of course, in such a situation, it should not be. Make sure that you have a 64-bit Windows and install the 64-bit 3ds Max and the corresponding V-Ray, then you can use the recommended values ​​and at the same time the possibility of your computer fully.

12 Oct, 2011 Victor Skea
12 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for the useful information. It has long been looking for a teaching literature in the yard, which is written by a living language and with an explanation of the subtleties and tricks. From the official manual makes me sick already, because of the common surfaces and an explanation of the principles, without going into "what is good and what is bad." But I'm here now set the memory limit on 14400Mb. And consumption is not affected. It is used as a 25% memory and uses. Although the scene is 1.5 million polygons and 150 kinds of material pieces, most of which with a bump texture and all the works.

26 Sep, 2011 Anton (Staff Author)
12 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial


Do not bothered so much as it uses. The renderer uses as much as he needs from what you gave him. Simply puts the best for your computer system and value, and more to this question does not come back😉

In addition, if you look in Windows RAM consumption, it only introduces you to the confusion. It does not show objectively. And with the SuperFetch , so you will not see in the life of the real memory consumption, because the system itself is purposefully his scores "to the eyeballs»😁

12 Oct, 2011 Victor Skea
12 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello Anton. I could and would not bother it. But the problem is that the max (2010 x64) became shamelessly fall. And the most vile way he could fall at a time when I press on CTRL + S. Instead, to save the last of my work and efforts he invites me to complain to Autodesk. I may not be out there looking for the source of the disease, because the symptoms are very different, for example, the menu is turned off, when I will bring upon her arm. But more often he falls of course, when I least once porenderyu scene v-ray 1,5 SP4. But what is curious when I render using, falls occur much less often v-ray RT.

26 Sep, 2011 Anton (Staff Author)
12 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial

The solutions for 3ds max crash problems described in this tutorial are related only to crash during rendering complex scenes in V-Ray.

Here, look at the discussions 3d max crashes and V-Ray is very slow, there may be the answer you want 🙂

12 Oct, 2011 Victor Skea
12 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial

Thank you very much for the help! 🙂

18 Oct, 2011 negro
18 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial

18 Oct, 2011 kiteman
18 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for this article, very interesting. I have resolved many questions I always wanted to know.


18 Oct, 2011 RenderStuff (Staff Author)
18 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for the kind comments 👌

19 Oct, 2011 Pedro
19 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial

it's work in vray for sketchup?

18 Oct, 2011 RenderStuff (Staff Author)
19 Oct, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello Pedro,

Despite there are little distinctions in some parameters, this article is a true for all the V-Rays. The V-Ray raycasting principles, described in current tutorial, are applicable in V-Ray for 3ds Max, V-Ray for Maya, V-Ray for Rhino, V-Ray for SketchUp, V-Ray for Softimage, V-Ray for Cinema 4d, and V-Ray for Blender.

15 Nov, 2011 George M.
15 Nov, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello RenderStuff,

I have a problem for quite a while and I hope you can aid me. When I try to render for the first time after opening a scene, the render, computer, everything goes unresponsive for a while (like 5-8 minutes) when it calculates the static raycast in V-ray. After that, everyting goes to normal and continues rendering. This happens only once after I open the scene in 3ds Max. If I close 3ds max and open the scene again it happens again. The Raycast is set by default values. If I merge the objects into another blank scene, the problem goes away but only for the first 2 or 3 saves. Can you give me perhaps some advices?

Thank you!

18 Oct, 2011 RenderStuff (Staff Author)
15 Nov, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello George,

This is definitely a lack of RAM for the scene you are trying to render. You should either buy a few RAM sticks, or bring the optimization into your scenes creation approach. Make sure you have adequate polygon count for your 3d models, use the Instances for objects in scene as much as you can, check if the used textures number and resolution are optimal.

As for why it happens only the first time, it's simple. The data filled in memory only once; all the following times the much of data stays ready to use 🙄

15 Nov, 2011 George M.
16 Nov, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thank you for your prompt and efficient answer

Well..things make more sense now 👍 My scene is very heavy indeed. I excluded this possibility for a while because I thought 8GB RAM was enough. Now that you told me, I rechecked the RAM usage and it goes suddenly to 99% when is raycasting. I will try to do some optimization maybe some vray proxys and instances as you suggested.

I also read your other tutorials, and I have a small question regarding gamma 2.2 workflow which I use it for some time but I still have some gaps. I will post it there.

I hope I'm not very annoying posting a lot of questions. 😁

18 Oct, 2011 RenderStuff (Staff Author)
16 Nov, 2011 # Re: Vray 1.5 memory allocation failure tutorial
We have recently decided to make the hardware upgrade and found that the DDR3 memory is very affordable nowadays. The $50 can bring you next 8GB of RAM. If your system works with DDR3, of course 🙂

George M., surely ask your questions in appropriate tutorial. If you will have a question, which is not related to any of present tutorials, feel free to create a new discussion 😉

28 Dec, 2011 moroz
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello Anton. Recently I faced with the problem of this nature: grass recently downloaded (IGrass) Ineta her seat and began Multi Scatterom (grass course in the proxy translated), still using trees evermoushenskie (also proxy), use of materials in the scene a little bit. The bottom line is that used to do roughly the same job, but he did the grass and trees are the same used to render and I was much faster. Now, when using 2.7 GB oberativki (I only have 4GB) window pops up instead of rendering so to speak is considered prepassa message of this kind: "Unloading geometry" .I suppose that the RAM memory is not hvataet.Dolgo suffered but on what that resource subtracted that it is possible in speaker Memory limit register 0 and Max will use all the free pamyat.Sdelal well, but a miscalculation dragged on for a very long time and percent worked only 50% of its capacity. Prompt, please, as you can probably save render time in my grateful situatsii.Zaranee

26 Sep, 2011 Anton (Staff Author)
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Hello! That's right. In Dynamic mode, the renderer fully loads allocated to it 2.7 GB oberativki and passes control to the operating system memory. Which, in turn, not the name of free memory available (because it just "ate" the renderer), starts to load data in the swap file on your hard drive. And on this, everything slows down at the stage of loading geometry (Unloading geometry). Sticking Dynamic memory limit to zero, probably (I did this once did, this can only guess), the renderer passes the stage of loading geometry in RAM and immediately transfers control to the operating system memory. And she simply decides resource-intensive process is immediately pumped directly into the swap file, leaving memory for other applications. Like the instinct of conservation😁 It turns out that in this case the geometry of all the information is not in the fast RAM, and the slow hard drive. Of course, in this case, the renderer will last forever 🙂 rational way out in this case is only one - buy more RAM. Topic since now the memory prices are very fallen. A good reason to upgrade. Irrationally - to render the scene region to have less load geometry and it's all for the current renderer was placed in a free memory, no swapping to disk.

28 Dec, 2011 moroz
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial

Thank you, Anton. Bought 8 GB of RAM today and I'm happy! The render of the same scene took only 15 minutes instead of 2 hours.

28 Dec, 2011 moroz
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Here again carefully read your guesses about the memory access on slow hard drive and a question. Now there are SSD drives and they are much much faster than usual. So if you have it and do not have enough RAM and display in speaker Memory limit of 0 will the render to go faster, because The hard drive will be faster due to its speed of exchange processes ???

19 Sep, 2011 Maks (Staff Author)
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial
moroz, put DML zero iznchalno this strange idea. Perhaps, in some versions of V-Ray (eg for C4D), the value of Dynamic Memory Limit = 0 means automatic limit definition. But for V-Ray for 3ds Max, this option is not enough that the undocumented, in practice, it looks exactly like the actual refusal to use memory renderer directly and transfer of the care of the operating system. Therefore, there is no situation in which the value of 0 will give at least some performance gains. As for the SSD, it is definitely faster than HDD and, in the case of the swap with a shortage of physical memory, its use will allow for faster loading of textures and a little speed up rendering. But this speed (in the most expensive SSD - up to 150-255 Mb / s) can not be even compared with about RAM speed (cheapest ddr3 - up to 10-30 GB / s).

28 Dec, 2011 moroz
28 Dec, 2011 # Re: Vray 1.5 memory allocation failure tutorial
Thanks, now everything is clear and understandable, it is interesting all the same as how this works 🙂 Yes virey exhibiting zero DML performance will give it no longer clear, but there is a possibility otrendrit scene if insufficient RAM (if you have enough patience😁), well this IMHO.U me basically this option works for 3d max design 2010 and VRAy 2.0 and VRAy 1.5 took place.

12 Jan, 2012 Natalia
12 Jan, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Thank you very much for your stuff! 👍 All classes in the same breath. Everything is very detailed and easy to understand !!! Respect authors 👍

24 Jan, 2012 Rekha Maurya
24 Jan, 2012 # Re: Vray 1.5 memory allocation failure tutorial
outstanding explanation......gud job :🙂

18 Sep, 2011 maksvel
1 Feb, 2012 # Re: Vray 1.5 memory allocation failure tutorial
👍 I would like to know when there will be lessons in renderer with an emphasis in animation?

26 Sep, 2011 Anton (Staff Author)
1 Feb, 2012 # Re: Vray 1.5 memory allocation failure tutorial

6 Feb, 2012 Homelioff
6 Feb, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Having read the first lesson in're ready to render, I was unable to stop and read all of the material which is then stored in one sitting) Very informative, structured lessons! After their study finally had the feeling that I know V-Rey and I understand the essence of his work! Customize everything as suggested in the lessons, to render his old scene for 20 minutes in a decent quality, though not so long ago I it rendered the 9 hours and the quality was at the same level. If we take into account scale and contrast, the picture has become much better than before, even without Photoshop, and to disconnect Antialiasing filter in Photoshop really become much more room for further processing! Thank you very much for these lessons! This is the best stuff I've seen during its 3D training)

7 Feb, 2012 uiti
7 Feb, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for these Vray tutorial, help me a lot!!!

20 Feb, 2012 vªN²
20 Feb, 2012 # Re: Vray 1.5 memory allocation failure tutorial
you're a genius!!!!............thanks. 😁

5 Mar, 2012 Peps
5 Mar, 2012 # Re: Vray 1.5 memory allocation failure tutorial

When I render an image, the rendering window has two buttons: pause and cancel, but pause is inactive. Is there way to make it active?

6 Mar, 2012 gibson1980
6 Mar, 2012 # Re: Vray 1.5 memory allocation failure tutorial

No way 🙂

26 Sep, 2011 Anton (Staff Author)
6 Mar, 2012 # Re: Vray 1.5 memory allocation failure tutorial

Peps, the fact is that the Rendering dialog doesn't origin from V-Ray options.
This is a standard interface for rendering of 3ds Max itself, as well as the Pause button is.
No matter which renderer is used in 3ds Max, this dialogue is showed.
For example, Scanline supports the pause function, the mental ray too, so this button is active with them.
But not with V-Ray. That's why during V-Ray rendering, Pause button is disabled and appears grayed out.
gibson1980 is absolutely right 🙂

5 Mar, 2012 Peps
7 Mar, 2012 # Re: Vray 1.5 memory allocation failure tutorial

Thank you, hope the developers would work on pause.

27 Jun, 2012 James
27 Jun, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Been in the game for 8 years and I have found your tutorials to be BRILLANT! Answered questions that i have been mulling over for years. The best write ups on vray i have read - period.

28 Jun, 2012 APVM
28 Jun, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Great article, thanks !!

Questions; I use SU8 + VRay

Is it possible in VRay for SU to choose between static or dynamic raycasting? If so, where can I find it? It doesn't appear in the system-rollout.



19 Jul, 2012 Antonio Neto
19 Jul, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Congrats for this nice informative website.
I have one question:
Do you know what's the diference between the types of build tree low, avarege, high?
What's the pros and cons?
If the render will be faster or slow?

4 Aug, 2012 matias
4 Aug, 2012 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for all your tutorials, really great stuff.
Could you do a tutorial showing to compose a image en post, with the vray specular,vraylighting, vray reflections maps?
Sorry my english, hope you can understand me.

10 Jan, 2013 Lydia
10 Jan, 2013 # Re: Vray 1.5 memory allocation failure tutorial
I almost cried reading this!!! you two are the best!!

23 Jan, 2013 Ioan Alex
23 Jan, 2013 # Re: Vray 1.5 memory allocation failure tutorial
THX !!!

16 Jun, 2013 Guilty
16 Jun, 2013 # Re: Vray 1.5 memory allocation failure tutorial
Thanks you soooo much for this you are the best

27 Jan, 2015 Prashant
27 Jan, 2015 # Re: Vray 1.5 memory allocation failure tutorial
Thanks for the best teaching ever 👍

Add a comment


Anti-spam challenge (please check if you agree with this and uncheck if not)
Yes, I am a spam-bot.
Yes, I am a human.
Terms of Service

RenderStuff © 2008