By default, Vray 's color mapping is set to linear. This setting means that the render data is not altered before displaying it on your screen. But since monitors are not set up to respond linearly to this data, your renderings will have far too dark mid-tones. In other words, it will lead to renderings which are not phyically correct. This tutorial focuses on how to set up Vray to make more physically correct renderings. On the way, it will shed some light on Vray's quality control center: the QMC-sampler. First download the file LWF.rar (scroll down for a link to this file). Unpack the file, open and click render. You will notice that the rendering is quite dark. (please note that supplied file can slightly differ from the rendered images shown here, since some settings were lost after this tutorial was made) In the VfB there is a small button with sRGB. Click on this button. You will notice that the scene is suddenly much brighter and shows much more detail. What's happening is that Vray now adjusts the data for your monitor. In general, a monitor does not respond linearly to input data. If it did, then the gamma of this monitor has a value of 1, a linear gamma, and you wouldn't need to use the sRGB button. Most CRT monitors have a default gamma of about 2.5. This means that the midtones are much, much darker when displayed then they should be. If you calibrate your monitor, you will most likely choose a gamma of 2.2 which is a worldwide standard. sRGB also assumes a monitor gamma of 2.2. Therefore this tutorial assumes that you have calibrated your monitor to work with a 2.2 gamma. At this point you might wonder why you should bother thinking this gamma thing. Keep in mind that the textures, digital photos ,and scans you make are also adjusted to display correctly on your monitor. In other words, without you knowing it, they have been assigned a reverse gamma curve (1/2.2) to make them display correctly. In order to make physically correct lighting calculations (renderings) though, Vray uses linear data internally and also assumes that it is offered linear data to work with. This means that you should use textures that have their inverse gamma curve removed, or use textures that are created in linear space from scratch. More about this later. Setting up Vray There are two ways in Vray for Rhino to make physically correct renderings, each method having its benefits and drawbacks. Method 1: using linear color mapping and the sRGB button When using this method there are a few important things to note. Vray has a sophisticated rendering engine that heavily makes use of importance sampling and early termination (for an explanation see RenderingTerminology). Because of this, Vray uses less samples in dark areas then in bright areas. Since Vray is not aware of the fact that the image will be corrected for displaying after rendering, it will be neccessary to lower the noise treshold in the QMC sampler in order to get good quality renderings. Lowering the adaptive amount can also help. NOTE: THE FOLLOWING IMAGES WERE RENDERED WITH PRE-CALCULATED LIGHTCACHE Step 1 The image below shows the result with default QMC settings: Step 2 Next, the noise threshold was cut in half. As you can see there is hardly any difference, both in quality and render time. This means that the noise threshold is no longer the limiting factor. The reason can be found when opening the QMC GI tab. Its subdivisions are set at 8 (default). Step 3 Set this QMC GI noise threshold to 20 and set the noise threshold in the QMC Sampler to 0.1 (ten times as big as the default noise threshold) As you can see the result is very fast, but very noisy. Step 4 Cut the noise threshold in half and re-render: Step 5 Again cut the noise threshold in half and re-render: Step 6 Again cut the noise threshold in half and re-render: As you can see, the noise in the image is getting less and less and the render time more or less doubles when noise treshold is cut in half. If you look carefully you can see that the area shadows from the direct light have not improved mh from the previous rendering. Step 7 Open the light properties and increase its subdivisions from 8 to 20. Also cut the noise threshold in half and re-render: Method 2: using gamma correction color mapping In contrast with the first method, you can also gamma correct your image during rendering. In this case, using Gamma correction colormapping, there are two values to set in the color mapping tab: the Multiplier and the inverse value. The multiplier acts as a global light multiplier. This means, if value is set to 2, you globally multiply the lights and GI in your scene by 2. Setting this value to 0.5, will decrease the lights and GI by 50%. The second value is the inverse gamma value of your display. In case your monitor is set to 2.2, this value has to be set to 0.4545 (=1/2.2). The nice thing about using this method is that Vray's QMC sampler is aware of the gamma correction in advance. This means that in contrast with the first method, you get higher quality renderings with default QMC settings. This also means that with default settings, images will take longer to render than with the first method. Step 1 The image below shows the result with default QMC noise threshold at 0.1 (similar to step 3 with Method 1) Step 2 QMC noise threshold cut in half (similar to step 4 with Method 1) Step 3 QMC noise threshold cut in half (similar to step 5 with Method 1) Step 4 QMC noise threshold cut in half (similar to step 6 with Method 1) Step 5 QMC noise threshold cut in half and light subdivisions set to 20 (similar to step 7 with Method 1) Step 6 Setting QMC noise threshold back to its default (0.01) gives similar render time/quality compared to the last image from step 1:  Linearize textures As mentioned earlier, Vray needs to be offered linear data to make physically correct renderings. This means that either you correct your textures or make them with a linear profile from scratch. Most textures can be corrected the easy way by overriding the bitmap gamma in the bitmap loader. If you make a new material, and add a texture to the diffuse color slot, you should use the following settings: Just note the gamma override setting. By doing so, you will 'remove' the burned-in gamma correction from the image, which effectively linearizes the image. One way to correct textures to linear gamma is to convert them to 16 bit mode, then convert to a linear profile. In Photoshop, you can convert to 16 bit using the menu: Image --> Mode --> 16 bits/Channel. Then convert it to a linear profile (in menu: Edit --> Convert to Profile... then select a linear profile like AIM RGB =Trinitron D65 G1.00. This profile can be downloaded here. Look for AIM Working Spaces. For installation, refer to your Photoshop help file.) Rendering with textures applied For example, this is what a rendering without corrected textures could look like... ...and this is after correcting with 'override gamma' for all textures at 0.455: If you consider the following textures were used, it is clear that the gamma corrected textures resemble to original files much better. (textures shown here were made smaller for displaying here) Further reading: To learn more about gamma correction you can read the article Linear workflow reloaded. |