Get better rendering performance in V-Ray
James Cutler explains how to improve your renders in V-Ray by taking control of the sampler settings
V-Ray uses a modified version of the Monte Carlo algorithm called Deterministic Monte Carlo (DMC). This makes the results the same each time for increased predictability and adaptability. The DMC sampler controls how samples are to be taken for particular values. It isn’t to be confused with the anti-aliasing Adaptive DMC image sampler, which actually determines how many samples are generated for a particular value. These two methods work in a similar way, but overall the DMC sampler is always on and working with whichever anti-aliasing image sampler is used.
A single primary ray is cast into the scene from the camera view until it intersects an object’s material. V-Ray then calculates how the material reacts to other objects and lights around it by casting secondary rays from the point of intersection. The information is then returned to a blank canvas as a single sample. Here, it paints an RGB value on to a pixel. The results wouldn’t be accurate enough if only a single sample returned for a pixel. So V-Ray determines whether it needs to send further samples by the use of importance sampling. V-Ray takes into consideration material colour, reflection strength, blurred reflection amount and distance from the light source when deciding where and if it should send more samples.
Adaptive amount controls how many samples are cast as fixed samples. Once the fixed amount of samples is reached, V-Ray becomes adaptive and decides if any more samples are needed. The default value of 0.85 means 15 per cent of the samples cast will be fixed, and the remaining 85 per cent will be adaptive. If a particular value is beyond the average number of samples that already exist, it will cast further samples until it hits the noise threshold, otherwise it could go on forever. Smaller thresholds mean V-Ray must do more calculations and fewer approximations, causing render times to increase.
The min samples are the least number of samples a value has. If set to fully adaptive, V-Ray won’t make a smart decision on how many samples a material needs. With a minimal value of 8 it will at least make a fixed assumption before becoming adaptive.
Global subdivision controls the maximum amount of subdivisions all values have within the scene. This affects depth of field, motion blur, irradiance map, brute-force GI, area lights, area shadows, glossy reflections and refractions. If a material has a subdivision of 8 and the global subdivisions are set to 2, the material has a maximum of 16 subdivisions. This is the same as setting the global subdivisions to 1 and setting the material subdivisions to 16.
The anti-aliasing filter is a global control for distributing samples where there’s high contrast between pixels. A sample is equal to the square root of a subdivision. Four max subdivisions equal 16 samples, which is the maximum number a particular value can reach. It might not need all of the 16 samples – it may use only half if V-Ray deems the results acceptable.
If you’re using the clr threshold, when a pixel colour is higher than the threshold value, it will cast more samples for that pixel. If Use DMC sampler threshold is ticked, V-Ray will use its value instead. The subdivisions in a material are connected to the image sampler, so the maximum amount of subdivisions it can receive is either the material’s own subdivision value or the max subdivisions in the image sampler, whichever is greater.
If the image sampler has a maximum subdivision of 5 and a material has a subdivision of 50, the material subdivisions are divided by the maximum image sampler subdivisions (50/5=10). Apply the square root and you get a maximum of 100 samples for that particular material. Here, the local subdivisions do most of the work.
If you raise the maximum subdivisions above the material subdivisions to 100, you actually get fewer samples for that particular material (100/50=2). The square root of 2 gives you only 4 samples for that particular material. But what’s different from before is that the image sampler has a greater adaptability between the maximum local subdivisions of 50 and the maximum global amount of subdivisions of 100.
If you increase the image sampler and the material subdivisions at the same time, the values can become muddled, and you may cast only a small amount of samples. It’s best to first work out the correct image sampler settings, and then if a particular material in your scene has noise, you can locally increase the subdivisions. The more blurred a reflection or refraction is, the higher the subdivisions must be.
View the sample positions using the VRaySampleRate render element
The VRaySampleRate element shows a pixel’s colours in shades of either red, green or blue. The blue areas show fewer samples and the red areas show the most.
Find out if the maximum amount of samples has been reached
If there’s no sign of red, it means the maximum subdivisions are too high and V-Ray hasn’t needed to go up to that level. This would be a result of a global method using high image sampler subdivisions.
A good range of samples means improved predictability
Ideally, you would want areas that are flat and simple to be blue, and the edges of geometry where there’s high contrast between pixels to be red. Increase the maximum material subdivisions and keep the image sampler subdivisions low to gain a better understanding of where most of the samples are going.
James Cutler runs MintViz Workshop, a resource for any CG artist, designer or generalist who is looking to develop their skills
Discover 20 brilliant 3D artists to follow on Behance, over at Creative Bloq.
on Monday, February 4th, 2013 at 3:46 pm under Guides, Technique, Tutorials.
You can subscribe to comments.
You can leave a comment, or trackback from your own site.