《2022年VR渲染教程 .pdf》由会员分享,可在线阅读,更多相关《2022年VR渲染教程 .pdf(26页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Visualization Insider Critical VRay Settings Part I 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 26 页 - - - - - - - - - Visualization Insider 2Introduction To say that VRay is a complicated program would be an understatement! Ironically enough, however, it ha
2、s become the most ubiquitous engine in the visualization industry because of, among other things, its simplicity. Although it contains a large number of settings which should ideally be separated from critical settings and grouped into an advanced section all alone, it is nonetheless a fairly easy p
3、rogram to digest when you know which settings are critical and which can be left for exploration down the road. We believe knowing VRay means knowing how to troubleshoot your scenes. When you render a scene, you either get a result you want or dont want. If you get what you want, great - but if you
4、dont, and dont know how to fix a problem, such as blotchiness, noise, flickering, etc, then you are bound to spend precious time testing numerous settings. Even when you do get the results you want, you may not realize that you can achieve the same or better results in less rendering time. Rather th
5、an explaining the critical settings in a top to bottom manner, starting with the top-most rollout and ending with the bottom-most, this discussion presents VRay features in a more logical manner, from most critical to least critical. For example, there is an option to disable glossy effects in one o
6、f the first rollouts, Global Switches; however, it wouldnt make sense to discuss an option for a concept that has yet to be explained. Therefore, such a setting is reserved for later. For the purpose of this discussion, we are defining critical settings as those which tend to require attention at le
7、ast once during the course of a typical visualization animation. This means that while a particular settings use may not be guaranteed during any given visualization, its use will probably have been at least considered as an option because of its special qualities or characteristics that it offers a
8、 user. By the same token, having not listed a setting does not at all mean that it is not something worth exploring, but rather it is a setting most likely not as widely used, as unique in its affect, or as practical in a production environment. At the end of Part II of this discussion are a few gee
9、-whiz type features that may not be as practical as those presented earlier, but are nonetheless, interesting enough to make mention. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 26 页 - - - - - - - - - Visualization Insider 3Indirect Illumination When light s
10、trikes an object, it illuminates the object with Direct Light. After direct light bounces off the object, the light illuminates other surfaces as Indirect Light (also known as indirect illumination, global illumination, or GI). GI in a scene is approximated through the use of complex algorithms that
11、 require an incredibly large number of calculations to complete. Like all advanced render engines, VRay has several options for making this approximation and each has their own distinct advantages and disadvantages. The Indirect Illumination rollout controls which methods are used. Within VRay, indi
12、rect illumination is categorized into two areas. Indirect illumination that is directly visible by a cameras view or visible in the reflection and refractions from other objects is referred to as a Primary Bounce. Indirect illumination that simply used in the overall calculation of GI in a scene is
13、referred to as a Secondary Bounce. VRay uses several different methods to approximate these bounces and each contains parameters that control the quality of the approximation and the time it takes to make the approximation. This discussion looks into the most widely used primary and secondary bounce
14、s types; the Irradiance Map and Light Cache , respectively. Well return later to see which settings in this rollout warrant further discussion as a critical setting. Irradiance Map An irradiance map is a method for storing the calculation of radiant energy, or light, which strikes a set number of po
15、ints in 3D space. With a 3D point map of these stored illumination values, VRay can approximate the amount of illumination that arrives at every point on every surface, and thus, better determine how to color the pixels in a rendering. What makes algorithms behind the irradiance map method so great
16、is that they approximate GI more accurately in areas that require more detail, such as shadow transitions and places where different surfaces interact, and less accurately in areas where greater detail is not necessary, such as areas with unvarying illumination. To do this, VRay renders a cameras vi
17、ew in a number of different passes, starting with a lower resolution pass and progressively adding higher resolution passes. With each successive pass, VRay determines if the GI of each area of the rendered view is adequately approximated by samples taken in the previous pass. If so, no further samp
18、les are taken if not, more samples are taken. With each pass, the resolution of the irradiance map pass is doubled, and therefore, VRay can potentially quadruple the number of samples taken. It would be impractical and far too time consuming to calculate a sample for every pixel in the rendered view
19、, so instead, VRay takes what it believes is the required number of samples (to approximate the GI) and interpolates (or estimates) the areas in between. The results of these samples are stored in the irradiance map and the accuracy of the irradiance map is directly dependent on the number of sample
20、s and the quality of those samples. The settings in the top part of the Irradiance map rollout (shown below) control both of these factors, while the bottom half deals with animations. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 26 页 - - - - - - - - - Visual
21、ization Insider 4Min /Max Rates The Current preset drop-down list at the top of the rollout contains numerous configurations for the six grayed-out settings below it. These presets provide a quick and easy way to achieve good settings for various levels of accuracy needed in the irradiance map. Ther
22、e is also a Custom setting that gives you individual control over the six settings below it that are otherwise dictated by the presets. The first two settings that should be discussed are the Min rate and Max rate . These settings have the most direct impact on the number of samples taken during the
23、 calculation of an irradiance map. Before going any further, lets take a close look at the purpose of these two settings. The following exercise helps demonstrate what their role is. Exercise Specifying sample density with Min / Max rates 1. Open the file irradiance.max. 2. In the Global switches ro
24、llout, enable Dont render final image, as shown below. This prevents VRay from covering up the irradiance map with a rendering, therefore, allows us to see the results of the irradiance. 3. In the Irradiance map rollout, enable the Show calc. phase option, as shown below. This allows us to see the v
25、arious resolutions of the irradiance map as theyre being rendered. 4. Render the scene and stop it after the first buckets are processed (this should only take approximately 5-10 sec). 5. Click on the rendered window and scroll your middle mouse button upwards to zoom into the rendered window. Conti
26、nue scrolling into the window until you see an 8:1 zoom factor and use the scroll bars to get a closer view of the first bucket in the top left corner. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 26 页 - - - - - - - - - Visualization Insider 56. Count the num
27、ber of individual squares, from left to right, that make up the bucket. You should notice that there are 64 individual squares horizontally and vertically that make up each bucket. What does this mean? Well, if you look in the System rollout, you will see that each Render region division, i.e. bucke
28、t, is 64 pixels in both the X and Y directions. This means that there is exactly the same number of squares in the irradiance map as there are in the rendered image. Therefore, the irradiance map resolution is the same as the final rendered image when the Min rate and Max rates are set to 0. In this
29、 case, the rendered output size (as specified in the Common Tab of the Render Scene dialog box) is 640 x480; therefore, the irradiance map resolution is 640 x480 as well. This is illustrated below. 7. Now change the Min rate and Max rate to -1 and render the image again. If you zoom into the render
30、window again, you should now see that there are only 32 pixels horizontally and vertically that make up each 64x64 pixel bucket. This means that the irradiance map resolution is ? the final rendered image resolution. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页
31、,共 26 页 - - - - - - - - - Visualization Insider 68. Reduce the Min and Max rate once more to -2 and render the image again. If you zoom into the render window again, you should now see that there are only 16 pixels horizontally and vertically that make up each 64x64 pixel bucket. This means that the
32、 irradiance map resolution is ? the final rendered image resolution. So far, we have kept the Min and Max rate values the same. This was done to simply the discussion up to this point; however, by leaving these values the same, we are not allowing VRay to become adaptive to its environment, which is
33、 what makes irradiance so great in approximating GI. If we separate the Min and Max rate values, we allow VRay to apply a larger irradiance map resolution where greater sampling is needed, and a smaller irradiance map where less sampling is acceptable. To see how this works, lets continue with the e
34、xercise. 9. With the Min and Max rate still at -2, render the scene again. Notice that the render window displays the message Prepass 1 of 1, as shown below. This means that only one rendered pass is being made and this is because both the Min and Max values are the same. Click Canel to stop the ren
35、dering, if necessary. 10. Change the Min rate to -3 and render the scene again. Notice now that the render window displays the message Prepass 1 of 2 and then Prepass 2 of 2, as shown below. This means that two unique passes are rendered, the first one dictated by the Min rate value and the second o
36、ne dictated by the Max rate value. For every pixel on the screen, VRay made a determination about whether the samples taken in the first pass were sufficient to approximate the GI. If not, more samples were taken in the second pass, 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - -
37、 - - - - - 第 6 页,共 26 页 - - - - - - - - - Visualization Insider 7potentially four times as many (twice the resolution means four times the area). The more the Min and Max rate are separated, the more passes are taken and the more adaptive the irradiance map becomes. These next 2 sets of images summa
38、rize the value of adaptive sampling with irradiance maps. In the left image below, you can see that a large number of samples (displayed as dots) are taken throughout the scene, with little care to areas that need more attention than others. This is because both the Min and Max rate were set to -3 a
39、nd only one sampling pass was made. The result is a decent image but at the cost of greater rendering time (7.5 secs). In these next two images, you can see that the same level of quality is achieved in the GI in less time (5.7 secs). Notice how samples were taken in greater density in certain areas
40、. So what are good Min / Max rate settings for a typical visualization? Well, as was mentioned in the introduction, knowing VRay really means knowing how to troubleshoot. Ideally, you want to 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 26 页 - - - - - - - - -
41、 Visualization Insider 8use the lowest settings that give you the look you want without the undesirable effects that sometimes plague a scene where irradiance maps are used with low quality settings. Lower quality settings obviously mean faster render times. But what might be good settings for one s
42、cene may not work so for another. Nonetheless, the presets offer a great place to start and if you experiment a little, youll probably find a preset that provides the best mixture of speed vs. quality. At 3DAS, we generally use a Very Low for test renders of large scenes, a Low preset for test rende
43、rs of small scenes, and a Medium preset for production renders. If we determine that a Medium preset allows for too much noise or too little detail, we often switch to a High preset. But as you will see in the next few sections, there are other settings within the Irradiance map that should be addre
44、ss besides just the Min / Max rates. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 8 页,共 26 页 - - - - - - - - - Visualization Insider 9HSph. subdivs The next most critical setting in the rollout is the Hsph. subdivs value. At each point that a sample is taken, rays
45、are traced out from the sample, mathematically speaking, to determine the amount of light arriving from each direction and improve the quality of the GI approximated at each point. The more rays that are traced, the more accurate the sample becomes. In simplistic terms, if you place a virtual hemisp
46、here above each sample that is taken and trace rays from the sample through each subdivision of the hemisphere, the more subdivisions, the more rays that are traced. The image below gives a very rough graphical representation of this process. The actual number of rays that are traced are equal to th
47、e square of the Hsph. Subdivs value, although this can change depending of settings with the QMC Sampler rollout (discussed later). By default, HSph. subdivs are set to 50, however, this value is often much higher than necessary and can lead to excessive render times. Because of the impact this sett
48、ing can have on both quality and render times, some experimentation may be in order. At good value to start with is 20 and if no problems exist in the GI of your scene, then you should not increase the value. If problems such as splotches arise, then experiment with small increases in this value. Va
49、lues above 50 should be avoided because of the increase in render times that result (at the benefit of indiscernible gain or gain that can be achieved through other settings with smaller render times). Likewise, values below 20 should be avoided because the savings in render times are not worth the
50、great loss of quality that can result.名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 26 页 - - - - - - - - - Visualization Insider 10Inter. samples When you create a simple circle, like the one shown in the far left image below, four vertices are created automat