Professional Documents
Culture Documents
V-Ray Crash Problems
V-Ray Crash Problems
V-Ray Crash Problems
- How to
t avoid thee 3ds Max crash when it
i is not eno
ough RAM??
- What should I doo when V-raay turning off during reendering?
- How to
t deal the RAM
R
lack in V-Ray?
- How to
t render thee scene withh many millions of pollygons?
- How to
t make com
mputer workk faster duriing renderin
ng?
- What is raycastinng and how V-Ray acceelerates its work?
w
- What is BSP tree and how dooes its struccture look liike in V-Rayy?
- What is the differrence betweeen Static Raycaster
R
an
nd Dynamic Raycaster??
- Whenn does V-Raay use paginng or swapping?
- How to
t switch V--Ray for woorking with dynamic raaycaster?
- What are the Vraay buckets?
- Why do
d we need the VRay rendering
r
loogs?
- How to
t change thhe V-Ray reendering proocess prioritty?
- What should I doo if V-Ray crashes
c
durinng the Ligh
ht Cache callculation?
- How to
t calculate the best am
mount for Dyynamic Mem
mory Limitt?
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.
Why is this happening? What
causes this error? Cant 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.
He will have to appproach first leaf and seee whether it is yellow. Then, come up to the second
s
and look if he needds the seconnd leaf. Afteer this, he haas to go to the
t third onee, and again
n 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 computers CPU, which instead of actual rendering has to busy oneself with nonrational searching of data in memory.
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.
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 systems
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.
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 trees 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.
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.
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 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 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.
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.
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.
therefore, we are better turn off this function when setting the starting configuration of VRay.
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.
It is a reeal situationn, when the render passsed all prepaaratory stagges, associatted with loaading
geometrry into mem
mory, and evven started the renderin
ng of GI maaps, such ass Light Cach
he.
Then, having
h
rendeered certainn amount off LC, the ren
ndering crasshes, showinng the hated
d V-Ray
exceptioon error. Thhis happens because thee memory that
t remainss after loading geometrry is
simply not enoughh to keep thee LC inform
mation.
Unfortuunately, therre are no eleegant solutiions for solv
ving the memory overfflow during GI
calculattion. Howevver, some way
w out exissts. The mosst obvious is to reduce the GI map
ps size,
by loweering the vissual qualityy of the finall rendering. There is also another ccompromisee. We
can go the
t way of subdivision
s
n, simply breeaking the rendering
r
off one imagee into severaal parts.
For exaample, it is possible
p
to render
r
entirre image usiing smaller region rendders. For exaample,
we can render firstt half of the image usinng region ren
nder, and thhen render thhe remainin
ng half,
movingg the borders of region there. Of coourse, if we render Lighht Cache onnly for half of the
current frame, thenn its map wiill take twicce as less meemory than when rendeering the wh
hole
image at
a once.
Concclusion
That is the all the system
s
settinngs and feaatures of V-R
Ray that every V-Ray rrendering arrtist
must knnow.
We hoppe that this tutorial
t
willl help you inn difficult siituation when project ddeadlines arre close,
and 3dss Max suddeenly crashess. Now, when you undeerstand the basic princiiples of worrking
with V--Ray renderrer system settings, youu are able to
o manage thhe renderingg of huge scenes,
regardleess of your computerss RAM amoount.
All, havve easy settiings and beautiful 3d reenderings!
The tutoorial is writtten and prepared by:
Anton (Ren
nderStuff)
Max (Rend
derStuff)
Professional 3d modeler working at Ren3d, has seven years experience in creation of various
3d objects. Author of 3d models, co-author & theoretical editor of all RenderStuff
publications.