Principle and comparison of Global Illumination (Global Illumination) algorithm of Vray)

Source: Internet
Author: User
Principle and comparison of Global Illumination (Global Illumination) algorithm of Vray)

Introduction

Vray is the Renderer used by most people in China, even though it has not been used in real programming. Some may say that is because Vray is the easiest and most simple rendering. Actually, no. Vray is in MentalRay, FinalRender, Brazil, Maxwell... Among others, the most frequently used Renderer in multiple Renderer, the reason is very simple, in addition to the common rendering engine Qusi Monte-Carlo, Photon Mapping, and Irrandiance cache (or writable Final gathering, vray has the Light Cache algorithm of Choas Group optimization. The Vray Renderer clearly divides the optical anti-lag into the first anti-lag (Bounce) and the second anti-lag. The first anti-lag has four rendering engines available for choice, in the second anti-Leech, three rendering engines are available for selection. In the absence of the anti-leech principle, four x 3 = 12 arrays are available for selection. Although Vray was set to use Irrandiance cache for the first rendering, the second anti-lag algorithm was used as Qusi Monte-Carlo ), however, when you want to adjust the rendering engine, if you don't really understand the back-up principles of these algorithms, it will make a splash. How can I configure the engine of the first anti-attack and the engine of the second anti-attack for your scenario? This is really not an easy question to answer.

At the beginning of this article, I only translated the related files of Vray, but later I added the acronyms such as Wikipedia and their understanding, then, the system will be familiar with the relevant knowledge, so the last step is to mix the content of the translation with the original article. The examination documents are placed at the end of the article. In fact, Vray uses the first bounce and second bounce words, which are easy to use and are not accurate. Because Bounce itself implies that the playing algorithm is based on Photon Mapping. At the beginning, why does Vray need to make rendering so difficult and provide so many choices? In fact, Vray just clarified the concept of a hybrid algorithm! It's like MentalRay can mix Photon mapping and Final Gathering. Vray can also use Photon mapping for the first anti-attack and irrandiance cache for the second anti-attack, it is basically the same as MentalRay. Finalrender is more accurate than linear regression. It tells you which two computing algorithms it uses to mix. In fact, these three Renderer uses a hybrid algorithm. Why should we use a hybrid algorithm? Because each algorithm has its own shortcomings and limitations. Simply put, mixing algorithms together can reduce the length and duration. In the subsequent article, we will introduce the introduction.


I. History of Renderer:

Almost all current global lighting Renderer are based on The article Jim T. Kajiya posted in 1986-The Rendering Equation. This equation tells you how to broadcast in the scene alone. In that article, kajiya also proposed using the render image as the basis, using the Monte Carlo method's rendering equation as the path tracing (path tracing ). In fact, this equation has been known to humans and has been used for some time in programming environment. However, Kajiya is the first person to apply this equation to computer modeling.


This rendering equation is just an "approximate version of the James Clerk Maxwell equation of computational Electronics ". It cannot model all optical learning phenomena. It is only based on, so it is impossible to simulate refraction, interference or two-phase differentiation. However, this equation can be easily modified so that it can calculate the effect related to the wave length, such as scattering. (Author Note: Why is the famous Renderer named Maxwell ?)

To learn more, this rendering equation is a line used by a digital model to describe light. Although it is a good model for computer modeling, it does not explain how it operates in the real world. For example, the rendering equation assumes that the light plane is thin and the speed of recognizing the light is unlimited-the two false settings do not match the real-world light plane.

Because the rendering equation is based on, raytracing is a very convenient method for solving the rendering equation. In fact, most of the Renderer's ways of calculating the rendering equation are to use the method of chasing with light.

Although rendering equations may have different rendering methods, the equation proposed by Kajiya looks like this:

This equation means: in the scene, the light is moved from x point to another point, x1, and so on. The light is moved from x2 to x1 and reflected to the sum of all the light points at x point.

In addition to some simple computing statements, it is possible for an unlimited computing period to solve this equation. However, we can achieve a close result in acceptable computing hours. Scientists are looking for a Global Illumination algorithm that can complete computation within a reasonable period of time.

There is only one rendering equation. Different Renderer only calculates the result using different solutions. If the calculation results of any two Renderer are precise, you should render the final result. This is the case in theory, but in reality, the Renderer often blocks or modifies the original rendering equation, so it is possible to calculate different results.

Ii. Rendering Engine Features:

A. Exact and approximate)

As mentioned above, we cannot calculate every formula. At first glance, there may be some computation errors, although these things are very small. Some rendering methods can be used by the user to determine the accuracy of the calculation (for example, the GI density, GI radiation number, or photon number. However, there is a deficiency in this practice, that is, the user must wait for the entire computing process to finish before they can know what the best rendering quality is. Another disadvantage is that users must have to spend a lot of time to know how to deliver the required quality at the minimum time. However, this method has a big advantage, that is, it can effectively control the accuracy of accuracy, because this algorithm can focus on difficult computing areas (dividing rendering areas into areas and forming a dynamic area, finally, combine the results.

The other method is to perform rendering in progress (progressively) mode. This method is very difficult at the beginning of computing, however, after each new calculation, the margin difference is reduced. At any point in time, we can achieve complete rendering results. Therefore, we can calculate the Renderer.

Table 1 Comparison between full algorithm and Estimation Algorithm

B. Gathering and shooting)

Method:

The light starts to emit photon to the scene. Please note that this method can be a full or approximate algorithm.

Collection method:

Starts from the direction of the camera or the scene. Note that the collection method can be a full or approximate algorithm.

Hybrid Algorithm:

The two methods of the photon method and the collection method are used together. The hybrid calculation algorithm can be a full calculation or an approximate calculation.

Table 2. Comparison between collection and Emission Methods

C. Collection Method:

The collection method can be a view-dependent algorithm or a view-independent algorithm.

Table 3 Comparison between the two calculation algorithms with or without the relationship between the two calculation algorithms

Iii. GI method supported in Vray

Vray provides different GI calculation methods-full calculation, approximate calculation, photon emission method, and collection method. Different scenarios combine different methods.

Full (exact) Algorithm

Vray supports two completely calculated algorithms: The regression force GI and the progressive tracing method. The difference between the two is that the graphic GI method can be used with the traditional image combination algorithm (Regional rendering), and it is self-adaptive, however, the progressive tracing method must calculate the entire image at a time without any self-contained functions.

Approximate value (Approximate) Calculation Method

All other methods of Vray (scatter ing, Light cache, and photon ing) are approximate methods.

Shooting photon Method

The photon ing method is the only photon method in Vray. The focal strength can also be calculated by the photon ing method and can be used together with the collection algorithm.

Gathering Algorithm

All other methods of Vray (regression force GI, optical ing, and optical fast retrieval) apply to the collection algorithm.

Mix valid

You can use different calculation algorithms in the first and second anti-inverse algorithms in V-Ray. You can use full or approximate algorithms, the photon emission method and collection algorithm are based on your needs. Possible groups are listed in the GI regression example.

V-Ray provides different computing algorithms for lighting. Let you get the best in terms of quality and speed:

A. Protocol force (Brute force)

Resolution Method-or convert it into a brute-force method, which is the most simple solution algorithm; this method is used to calculate each shaded surface point on the object surface) catch up with the half sphere at each point in different directions.

The compile method is a programming term. This program does not take any chance to improve computing efficiency, the essence of the computation is that it depends on the operation of the computer, and the possibility of all the possibilities is calculated until the most accurate answer is calculated. A typical example is the traveling salesman problem ). The hypothetical streamer needs to access ten cities. How can we use the shortest distance to ask all the cities for the promotion staff? The stress method uses the simplest method to solve the problem. It is to calculate each possible path and then select the shortest path. This method is not very efficient, because it does not use a smart method to overwrite some impossible paths.

Although it is silly to use the force method, it has something useful in development. The final computation result can be proved by the graphic force method-the computation speed is slow-but the graphic force method can be used to refine other quick algorithms. accuracy.

For example, when the question "eight queens problem" was asked to put the eight queens on a benchmark chess player, no queen can attack other queens. The potential of the legal power Association research --- 64! /56! = 178,462,987,637,760 --- 8 pawns in a 64-square-meter position. In each arrangement, check whether any queen can attack other queens.

The resolution method is easy to set and will certainly find the answer, as long as this question is resolved. However, the longer the problem is, the longer the problem is. In many real-world problems, this kind of problem often leads to a growth of several times as much as possible. As a result, the effectiveness method usually applies when there are few candidates to answer, or when there are certain questions, you can use it to reduce the number of candidates to answer. This method can also be used for more important questions than answers. For example, the answer to a question may lead to very serious consequences.

In most cases, the compaction force (Brute Forc) is equivalent to the Direct Computing algorithm Quasi Monte-Carlo ), although their nature is a little different. The Skip Monte Carlo simulation algorithm is a clever robot model, mainly because it does not count all the formulas (parent group ), and only take the test as the example. Compared with algorithms such as Photon Mapping and irrandiance cache, the latter is somewhat clever and does not count as many points as it is, the latter refers to the computation of partial points and their linear interpolation. The stress method is a good way to calculate the points produced by all the Monte Carlo charts. Directly calculate --- Direct Computing.

The Quasi-Monte Carlo simulation algorithm is similar to the traditional Monte Carlo simulation algorithm, however, unlike the traditional Monte Carlo embedding algorithm, the Monte Carlo embedding algorithm uses the quasi-random sequences ), instead of using the serial number (random numbers ). These sequences are representative of the machine rate distribution that is relevant to the problems we want to solve. Low-discrepancy sequences ), in some cases, it can improve the computing duration of the traditional Monte Carlo simulation algorithm, the Monte Carlo simulation algorithm can provide short computing time/or higher accuracy.

In fact, the low-income sequence is completely deterministic. Therefore, the doctor may assume that it is a mobile phone, but it is not. The low variance sequence is used to replace the average Gini coefficient sequence. In fact, we need to refer to this series as neither hosts nor fake hosts, however, there are some commonalities between the serial number and the serial number of hosts, and this feature is applied in the Monte Carlo method, this feature is an important component of the Monte Carlo simulation method.

The Monte Carlo method is actually a communication method. The Monte cart method is a kind of machine technology-This method uses the camera rate columns and machine rate statistics to solve the problem. The Monte Carlo method is applied to various industries, from learning to nuclear physics, to traffic and traffic. Of course, the application methods of different research domains are different. In simple research, there are dozens of different Monte Carlo algorithms.

Manhattan Project, which is an atomic program developed by the United States during its first world war ). John von norann, One of the project's host, uses the world's famous city Called Monte Carlo in Morocco) to name this method as a mysterious one.

Using the Monte Carlo method allows us to study the physical model issues that are quite difficult to solve without using this algorithm. The interaction between the two atoms is simple; it is impossible for an equation to determine the interaction between hundreds or thousands of atoms. Using the Monte Carlo method, we can perform robot operations on large systems, which are sufficient to describe the behavior of the entire traditional system.

The overall illumination calculation method is used to calculate the GI value of each Metric point. Although it is very time-consuming, this method is very accurate, and small numbers in special scenes can be displayed. To speed up the computation of the boosting method, you can use (photon ing or Light cache) together with other methods as the second GI inverse algorithm, however, we use the compile method to calculate the first anti-compaction algorithm.

B. Irradiance map)

Photo ing --- or flip into a photo sending volume, which is most collected as the Final Gathering of MentalRay. This method is based on irradiance caching. Basically, it refers to a specific metric point in the scenario, and the vertex points in the scenario are used for interpolation.

A photo refers to a light volume at a certain point in the 3D space. This light volume is reversed from this point in all directions. Generally, different points in the scene have different snapshots. However, there are two useful restrictions ,. The first is the surface photograph-This refers to the photograph of the surface of the object. This is a natural restriction, because we are usually interested in lighting on the surface of the object. The second limit is the photo of the diffuse surface-the total amount of light that waits for the light to reach the specified point, regardless of where the light comes from. To put it simply, the color of the physical surface is actually the photo of its surface. If the material is white and completely diffuse

The V-Ray photo ing effectively calculates the surface images of the scene. Because not all objects in the scene have the same room for illumination, of course, more accurate calculations should be made in many regions (for example, two close things, or a profitable place, however, the precision is reduced when there is no such problem (for example, a large average lighting area. Therefore, the snapshot ing method is self-applicable. This is realized only after multiple passes. The resolution of each pass (the pass rate of each rendering) is doubled. This approach is to use low-resolution (for example, 1/4 of the Maximum image resolution) and then gradually increase to the maximum resolution.

In fact, the photo-based ing is a set of points in the 3D space (point space). These points contain the information for lighting. In the GI pass, when a thing experiences light, v-Ray determines whether other similar points in the ing have similar directions and positions. From those computed points, V-Ray can extract various types of information from the point (for example, whether something is close to it, or is there a clear picture of the change in lighting... ). According to the above information, V-Ray can decide, the interconnection lighting at this point is just like other built-in computation functions that have already been established? Or do not perform the insert calculation. If not, it is necessary to calculate the lighting at this point and map the information to the photo. When performing real-time rendering, V-Ray uses a very advanced interpolation method to obtain the approximate value of the photo ing in the scene.


C. Photon map)

Photon Mapping, or converting to Photon Mapping, allows the Photon to start from the light source and jump in the scene. This is useful for scenarios that are either internal or semi-open. The use of the photon ing algorithm alone usually does not produce good results. However, if it is used together with a method mapped by force method or photograph, photon ing allows you to roughly estimate the position of a ray in the scene.

The photon ing has a point-like photo ing. It is also a way to use scene lighting, and it is also a collection of points in 3D spaces ). However, the photonic ing is created in different ways. It is a particle (photon) emitted by chasing the scene light source ). These phoins reverse engineer in the scene and hit various surfaces. The point in the photon map will exist in the photon ing.

Lighting reconstructed from the scene by the photon ing is different from the reconstruction method of the landscape map. Just mix and computation the content of each local point as a simple example. To use the photon ing, you must estimate the photon density at any point. The estimation of photon density is the focal point of the photon ing technique. V-Ray can use multiple methods to evaluate the photon density. Each method has its own missing points. These methods are basically used to find the most similar photon.

Note that, in general, the illumination effect calculated by the photon ing is less accurate than that calculated by the photo ing, especially when there are many scenes. The ing is self-adaptive, but the photon ing is not. Another major deficiency is that the photon ing is often computed in the field. It usually appears in the middle or corner, and the calculated brightness is deeper than the original brightness. There is also a problem with linear computing workload, just because of its self-calculation performance, this workload is greatly reduced. Another defect of the photon ing is that it cannot be modeled in the light of the sky. This is because the photon needs a surface that actually emits the photon. At least in V-Ray, the sky is not just a surface object in the scene.

However, the photon ing is not affected by the cosine angle and can be computed quickly. Therefore, it is better to estimate the scene lighting and use it with other more precise methods, such as direct calculation or photo ing.

D. Light cache)

Light cache-or is converted into a hidden light storage, which is an approximate algorithm for Global Illumination in a scenario. This method is very similar to photon ing, but it does not have many limitations on photon ing. This method was developed by the Chaos Group, which was designed for the V-Ray Renderer. The establishment of Light cache is a result of many chasing attempts from the self-built corner. The inverse attention of each channel stores the illumination information on which the system is located. This method is very similar to the photon ing. Light cache can be used in combination with internal or outdoor scenes, either simply or in conjunction with the force or photo ing method, this is not an option.

The Light cache method is primarily used to track the light from the corners. Each path stores illumination data from other points, which is a very similar photon ing. In a certain sense, it is completely opposite to the complete photon ing, because the photon ing is a path tracing the light, and the energy ing exists in the photon ing.

Table 4. Comparison between two different rendering engines of Vray

Table 5 Global lighting algorithm features

Table 6. GI matching method of the push Engine

Summary
The irrandiance cache of Vray is actually equivalent to the Final Gathering of MentalRay. These two terms are different, but they have the same nature, even though they have different inner insertion methods. In terms of the global lighting calculation method, Photon Mapping is actually the easiest to understand. Imagine that there is an automatic ball generator in a dark room, each tennis ball is covered with dark paint. The attacker rounds up the webpage inside the room to adjust the dot of the room. In this analogy, the more tennis balls are shot, the more unclear the color ball spots in the room, the less the ball spots will be. The principle of Photon Mapping is that the source emits Photon to jump to the scene, and the root component sets the condition Photon to stop the hop to stay on the scene surface. The concept of irrandiance cache (or Final Gathering) is completely different. In the image machine, it is determined that there are many locations in the scene to be placed at the collection Point (Gathering Point) these points are collected from the hemisphere in all directions by lighting information. The focus of this algorithm is to collect Final Gathering information, which should be converted into the most efficient collection, instead of the least aggregation. Light Cache is similar to Photon Mapping, but the direction of Light Cache to catch up with the Light source is not from the Light source, but from the camera corner.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.