Analysis of cryengine Rendering Engine

Source: Internet
Author: User
Opengpu is getting cold these days,

This article is about napoleon314's analysis. The layout is messy. Sorry, read it patiently. This is a good thing. Watch out for his own implementation. It's a technical madman, why does ogre shine in the next age ~~~ Effort

-----------------------------------------------------------------------

Reproduced from: http://www.opengpu.org/viewthread.php? Tid = 2870 & extra = Page % 3d1 & page = 1

-----------------------------------------------------------------------

This post may be a strange one, but I believe in hacking.ProgramHe is also very supportive of klayge's R & D. He hopes to send some original materials to the author and klayge's roles, and even have some troublesome questions. He also hopes the author can answer them, if klayge's R & D involves these things, it would be better.
As a new engine developer, In order to quickly and effectively improve the rendering quality of the engine, he used various methods to parse the rendering method of cryengine. Here, I will share my experience and achievements with you from a professional perspective. If you are a professional graphics programmer and want to discuss with you about this amazing engine, if you are a newcomer or enthusiast, this will become a rare source of Chinese materials.
Cryengine is currently one of the most difficult engines to snoop, compared to the illusory and GBSource codeCryengine is much more mysterious. Few people say they have this engine, even if there is only one eval. Although there is a free version of education, as far as I know, only Peking University has applied for authorization. It took about million yuan to buy an authorized game. It seems that Changyou and jiuyou are the only one. However, the more powerful the engine is, the more irresistible it is. When I have an analysis tool like perfhud and pix, how can I not want to disassemble this mysterious and magical engine.
Crysis is often accompanied by criticism of the highest quality of praise and hardware killer, but I think even so, cryengine can still be called the engine with the best optimization and load in the world today. In fact, the engine design is mainly aimed at load capabilities, and the pursuit of images should be games. But in turn, it is certainly impossible to have the largest picture quality without the powerful load of engines. Any engine can be used as a hardware killer by art, but under the same circumstances, engines running out of images like crysis certainly have powerful load capabilities.
The main advantages of cryengine optimization are as follows:
1. Material sorting: According to the perfhud results, cryengine calls dxapi in the most concise way. So many materials have only such a concise State switching process, which is amazing, in contrast, ogre, GB, and other three-stream engines are much worse. The sorting of materials has been achieved. The time saved here has become the basis of crysis's complicated and ambitious scenarios.
2. Technical Choice: This is what I admire crytek most. So many next-generation rendering technologies are so harmonious that they both have performance and effect. I have studied many of its rendering techniques. I am deeply touched. Why can I select technology so appropriately? Later I saw a paper of their LPV, which has such a budget.

,

This was suddenly realized. It turns out that they are so professional and have made such an assessment in advance. It is no wonder that technologies have been optimized so efficiently and harmoniously.
3. Defective optimization: This is often ignored or considered wrong. Many people think that they would rather slow down and require no technical flaws. In fact, this is not correct. I don't want to hide it. In the face of the shocking effect of crysis, how many of them will be very concerned about its technical flaws and feel unbearable? However, in cryengine, all the flaws have gained valuable time, so that it can add so many rendering technologies to a game to achieve the effect of crysis.
With these differences, cryengine becomes such an alternative and provides a monster-like load capacity. Of course, some people will say that cryengine is not the fastest, because at the same speed, the phantom picture may be better. Yes, indeed, the illusory irradiance technology provides a cheap GI effect. However, the limitations brought by this technology make the illusion completely incapable of significantly changing the scene illumination, because the main light source is pre-rendered. This item has been supported in cryengine3, and also has the magical dynamic GI of LPV. In this case, the concept of full dynamic scenarios pursued by crysis is actually part of the realistic on-site experience. Of course, more performance overhead is required. This is because crysis has been changing around the clock, which brings an unprecedented on-site experience.
Next, I want to make a detailed analysis of the rendering technology used by crysis. Of course, there are also some questions that I don't understand. I hope you can give me some suggestions and help.

Crysis is made with cryengine2. cryengine3 is lucky to see it. Here, let's talk about the exact cryengine2 rendering process.
As we all know, cryengine2 does not use deferredshading, so it cannot support too many light sources, mainly rendering around the Sun, and uses a very complex pixelshader to achieve beautiful materials, therefore, zpass pre-rendering becomes necessary. Otherwise, many useless pixels will be rendered by complicated pixelshader. Of course, this is the same as deferredshading and cannot support blend. Therefore, there are only two types: normal and alphatest. To enable Prez, zpass must be rendered. First, normal objects are rendered, and then objects with alphatest are rendered. (Of course, the shader's texkill is used for rendering, and there is no state switching. In fact, the standard zpass does not require colorwrite, but crysis uses this opportunity to output the depth to an r32f. Because the line of sight is octal, It is mapped to [0, 1] by a factor of 0.000125. the sky is 2. With the depth of G-buffer, you can actually do a lot of things. In addition to the light, many post-processing operations can be performed using this depth buffer. With the depth, ao computing and shadow will be performed first, which are the calculations of the screen space. Then, each rendering object will sample the two graphs. AO is an rgba, r channel is used to store ssao results, and g channel is used to store 2.5dterrainao results. Then perform a blur operation. The shadow has a mask, and the parallel light is generally R. The remaining three channels can be used to store three point light sources or spotlight. Then, a r16g16b16a16f is rendered with a high HR range. This time, depthfunc is already equal, because the depth is fully filled. Of course, for the sake of Prez, it is still common, then alphatest, and then a large number of fragments will be seen, because the Z detection will block a large number of pixels. The total number of colored pixels is almost the screen pixel, unless two triangles are in the same fighting state as the depth, of course the probability is very low. After completion, blend rendering will be performed, mainly for particles, glass and other things. Hdrtonemap and hdrhighlightbloom are required. After completion, there will be an edgeaa, of course, there should be a tooth resistance process, but it must be turned off during debugging. Edgeaa is post-processing for tooth resistance. Only depth is used to extract edges. Then there is a glow, which will probably increase bloom like the flame. After that, sunshaft is used to add beautiful Ray and beam, and colorgrading is performed to complete the final rendering step. In this way, you can see the crysis screen. Is it general? It doesn't matter. If you like it, I will continue to analyze some technical points of cryengine rendering to explain the story behind the shocking screen. It's a bit late today.
I wrote some thoughts after reading klayge before going to bed. klayge is an open-source engine that I like very much. It is difficult to develop a practical engine that is as powerful as a commercial engine without powerful financial support for open-source engines. Klayge is actually helpful in researching some new APIs that support ogl3 or 4, dx11, and some interesting technologies. Its fontAlgorithmThe design is really unique and shocking to me. I am trying to find a way to make it clearer. The engine like ogre and irrlicht has neither powerful practicability nor advantages. I personally do not like it. Klayge has recently produced FFT water. It is very helpful for me who can only see siggraph1999. I remember that the last time I went back to ogre, there was a water body plug-in, and I also made FFT fluctuations, however, the practice of refreshing vertices with real-time CPU is still a bit too much. This is a new demo, which is really exciting.
I would like to ask the author why your deferredshading does not support HW's AA. Instead, it uses a post-processing method? Since dx10, can the MRT be aa now? Is there any obstacle?
Finally, I posted a self-rendered image. Although it is much worse than crysis, the rendering technology is similar. In fact, if time permits, I really want to write an engine by myself. It is not a common trouble to change the ogre to this type. The Ogre rendering system is too classical to adapt to modern technologies, as a result, I can't take over and call dx. Otherwise, either the performance will be lost, or the performance will simply fail to be realized. However, because of DX9, after deferredshading is used, only post-processing can be used to resist teeth. In fact, super sampling can be used, but the performance is hard to bear. The Material System of ogre is not flexible. In my anger, I used linear filtering in a unified manner, and the material was quite messy. The next step may be to try LPV. After all, GI is quite happy.

Continue to update. First, let's talk about the terrain Technology of cryengine. Terrain technology is a core technology of cryengine. In order to achieve the over-the-horizon of 8 kilometers, the terrain has been carefully optimized. Cryengine's terrain mainly uses a data structure that is still a height chart. In cryengine2, we can see that it supports very limited sizes and does not seem to be a seamless big scenario of dynamic loading technology. For this reason, we have explored the details of the crysis sandbox. Cryengine's terrain is not a morph transition but a direct mutation, which surprised me very much. Generally, the sudden changes in the terrain are so dazzling that it is unacceptable, however, in crysis, I was totally unable to realize this. After repeatedly playing with it, I found that the Overhigh-density vegetation overlay completely blocked by the vegetation, vegetation also changes without human body, so we can only feel the sudden changes in vegetation details, but cannot feel the sudden changes in terrain details. Because no Morph is required, the flexibility of the cryengine terrain is shown. It can be switched to a unit with a minimum of 2 m * 2 M. However, the further down, the actual unit for drawing is still merged, I am still not fully aware of the details of the specific dashboard. If anyone knows it, I hope I can tell it without hesitation. Thank you very much. However, it is quite clear that its level of detail (SLS) determines the accuracy of the mesh based on the two standards of visual complexity and distance. I will post a wireframe first:

 

It can be seen that the grid precision is not uniformly reduced from near to far, but the weight is reduced based on the block's visual complexity. During this period, there are quite a few surface supplements, to ensure that there is no t-joint. However, because Morph is not required, it is relatively easy to fill in the Cross-level dashboard.
In addition to the level of details, the surface materials are also an outstanding feature of cryengine. The details of the surface materials of crysis are absolutely unique at present, however, it is a special practice of cryengine to support the use of surface details technology with so many materials. Cryengine does not use any layer-4 mixture, but is divided by a single layer. When a layer of material is flushed to the terrain, cryengine generates a material coverage range, that is, each material has an independent IB segment when being drawn, the biggest advantage is that each layer can use independent rendering technology without affecting other layers. For example, there are only one or two terrain layers in Parallax, however, the overall improvement has been made to the terrain details in other layers. In addition, because the terrain is eight kilometers away, it is impossible to use the blend tiling details. Just a few hundred meters out of the details, it is switched to only one pre-generated large texture, virtualtexture technology has been applied here. When tiling and virtualtexture are used at the same time, the terrain distance of cryengine has a good performance in detail, and the performance can also support the line of sight of eight kilometers.
Of course, there is also a magical voxel Technology in cryengine's terrain technology. Voxel is actually a very old concept. It should be a Delta in the terrain. However, the voxel technology at that time was not very suitable for the current graphic pipeline. cryengine only used voxel as a part of the data storage for special terrain, and finally used some algorithm, generate a mesh that is seamlessly connected to the height map terrain, so that the cliff and cave can be implemented using terrain in the engine. Models are usually used for these purposes, and different systems can easily produce seams. This is why crysis features are so rich.
However, I haven't thought of the voxel generation algorithm, or I want to know how to implement it. I don't know if Yan Minmin has had such a solution, or has seen the literature about it. If klayge can integrate a similar algorithm, it would be better.

We hope to see virtualtexture and GI of klayge. At present, I am also working on some solutions. It is really good to have such a reference. I may consider integrating lightmass and a real-time GI solution into seamless scenarios.
Continue to update
Cryengine shadow is my favorite cryengine solution. It is scientific and practical, which shocked me. In the current hardware environment, cryengine's shadow system is a perfect real-time shadow solution. The first thing to note is that although cryengine2 is not deferredshading, there is still a depth graph available, so you can calculate the shadow in the screen space, which can save a lot of sampling for PCF, compared with VSM, the number of samples is less. In this way, we have the following conclusion: PCF is suitable for shadow sampling with high real-time performance, because the number of sampling times is small, and VSM is more suitable for shadow with low-frequency update, because VSM can be pre-sampled, after sampling, the shadow can be generated quickly. In this way, as long as the shadow is not updated, the VSM does not need to sample the shadow. With the above ideas, we have the cryengine shadow solution. First, we use four 1024 d24s8 as the layer-4 PSSM. According to my visual test, the distance between PSSM and PSSM is about-. Because objects in the distance are usually in the thick fog, in fact, the gain of distant shadows on the screen will be relatively weak. The close shadow distance makes the layer-4 1024 of cryengine obtain a very high shadow definition. This layer-4 shadow is not updated in real time, and cryengine controls the shadow. However, it is not felt in the game, but cryengine3 clearly saw the trace of the Frequency Control in the video of gdc2009. VSM is used to render the shadow of the terrain. As we all know, there is no shadow in the wow terrain. At first I thought this was correct, and later I found that the original wow light would not change, therefore, this shadow is acceptable even when the shadow is not stretched. However, if the sunlight changes dynamically or even gets very long, the shadow without shadow will leave the shadow of the object blank, it is quite ugly, so it is necessary to render the shadow of the terrain. However, the shadow of the terrain is generally blurred, because the distance is relatively long. Therefore, for the terrain of PCF, the shadow edge is too stiff, so cryengine chose VSM, rendering the terrain on a 1024 r16g16f, and then performing a blur operation, due to the large area of shadow rendering of the terrain, coupled with the static terrain, and the slow variation of light, the terrain shadow update frequency is very low, so that the overhead of terrain shadow rendering will be relatively small. While rendering the terrain shadow, cryengine also adds a cloud shadow to make the shadow complete and realistic. The use of semi-precision in VSM is actually very risky. VSM is not like PCF. If the VSM using statistical algorithms has perfect real numbers, it will be extremely perfect. Unfortunately, the floating point precision is limited, to make the shadow of VSM have a blurred edge, high precision is necessary. Generally, 32-bit floating point is used, and the half-precision will cause very obvious bar distortion near. However, the distortion of cryengine still exists, but it is not very obvious. The main reasons are as follows: first, the terrain itself is a low-frequency detailed model, so the shadow distance is usually relatively far, second, the shadow distance used by cryengine is close. Therefore, the depth range is small, so the precision is naturally high. Therefore, cryengine effectively uses PCF and VSM to simulate a very efficient and perfect shadow. I have been using this solution.
For sampling, PCF sampling is generally inferior to VSM because PCF is a comparison of binary results and it cannot be used for pre-sampling such as mipmap, linear sampling, and AA, this is also the advantage of VSM, but in DX9, there is an hwshadowmap solution. With perspective correction sampling, linear filtering can be used to obtain the PCF with four Difference values at one sampling, on this basis, we can perform multiple sampling times to produce very gentle results. Generally, shadows are prone to jitter when the animation or light changes. This jitter is very eye-catching because of the Sawtooth jitter of the sampled texture. There are two solutions to this problem. VSM can use AA, while PCF uses random sampling. Random sampling is not easy to feel jitter because high-frequency jitter is not easily noticed by the human eye. There is an article on gpu2 describing a random sampling method. However, the sampling method on GPU is relatively primitive, so it is not very practical. cryengine makes random sampling a new realm. First, the method on the GPU is to continuously sample a random texture to obtain random information, but this is obviously a waste because random information can be obtained after one sampling. The method used by cryengine is to pre-generate a sampling point set with a circular distribution, and then sample a random texture. The rotation angle of the point set is recorded on the random texture. In this way, a random sampling is performed, all the points will change accordingly. It is also the rotation of These vertices that make the shadow edge softer. In the GPU method, the UV of random sampling is the screen space. Such random sampling points shake frequently and are easily noticed. Cryengine uses a method with a normal perspective of the optical space to obtain a random texture UV that is only related to the distance and angle, which can reduce the jitter. After the above improvements, cryengine's shadow sampling effect is very good. Although it is not as good as savsm, it is much better than the previous PCF shadow effect, and random sampling is pushed to a new height.
For shadowpass, PSSM needs to put the shadow in four sm, so the sampling will encounter several pass problems, such as wow, directly sampling the four graphs, will certainly cause invalid sampling, the performance will be relatively low, while GB will use a large image to store, locate by transformation, and then sample, while cryengine uses another method, using the template, the template can extract the pixels required for each layer, and then sample the four passes to obtain the final shadow. Theoretically, the full screen shadow should be the best, because the Sampled Image is smaller, there is no waste of repeated sampling.
The following is the result of my use of this solution. Because of the relationship between the engine and time, I have no shadow distance, so it is a full-distance shadow. my line of sight is 400 meters, I used PSSM of 2048x4 and terrain shadow of 2048g32r32f. Because of my distance, there will be VSM distortion due to severe inaccuracy when using semi-precision in terrain shadow, so there is no way. cryengine is quite accurate in this distance, with a slight deviation, this will lead to unacceptable distortion.

 

 

 

The Ao in cryengine is the first time that ssao has been applied to the game. Once it is used, it gets hot with real-time indirect light. Cryengine's Ao technology is not currently the best, but its blur is the fastest, because the ultra-fast blur enables it to apply fullao instead of halfao, because fullao's use, the AO of high-frequency objects such as leaves and grass has become better, so in general, it is also a good AO solution. Since the rendering system of cryengine is not normally available, there are more or less problems with the AO obtained by only depth sampling. Therefore, it can only be said that this is currently only in the depth of AO, which has better results, because of its strong global nature, the algorithm scales the ray length based on the distance, so the cryengine AO is very conspicuous, unlike some AO, which is easy to be ignored when the effect is far away. Cryengine's Ao is fully accurate, which may cause a large overhead. Therefore, cryengine optimizes the sampling. The main sampling uses the original screen size graph, then, the scaled-out half image is used for surrounding sampling, which saves some sampling time and also causes distortion of a vertical bar. This can be seen in crysis, the entrance to the snowy day is obvious. In terms of Random Graphs, cryengine uses a 4*4 graph with a total of 16 types, which makes its miscellaneous very ugly, but brings convenience to blurao, because only four sampling times and linear filtering are required, the AO effect can be completely smooth, which is much faster than NVIDIA's hbao. However, such AO still has many disadvantages, such as the black behind the role, the obvious trace of low polygon mosaic, And the pixel Deviation Caused by blur, therefore, it is easy to see bright edges in AO in crysis, but this does not affect the overall quality of AO. But what is it. I am using this Ao solution because high-frequency objects such as grass leaves are doing relatively well.
Cryengine also has a pre-computed terrainao, so I have no chance to see it now.
Here are two my results:

 

 

My conclusion is that in the distance, and the grass leaves have a good performance, but if there is normal, there is still a lot of room for improvement.
Is ao in klayge similar to hdao in DX? I feel that the AO line can hook up very detailed AO lines, but the overall performance is not as good as this. No wonder it is called hdao. If it can be matched with some low-frequency AO lines, it would be better to look at it. NVIDIA's hbao effect is also quite good, that is, blur always appears, but it can better solve the traces of low polygon mosaic, so it is still a good solution. In the future, I will try a better ao. At present, there is still no satisfactory solution.

Recently I used the cryengine and unreal editors respectively. In contrast, the unreal editor is more professional. Although cryengine is powerful, it is not necessarily the most successful commercial engine. The unreal material connector makes the unreal effect more scalable. In contrast to cryengine, it only has more powerful built-in rendering functions. As an engine, there are still some gaps with the accumulation of unreal. Of course, speaking of the effect, cryengine cannot work out a dynamic solution than the static GI presented by lightmass. At present, many people still think that the illusory indoor effect is more perfect, even if it is at the cost of dynamic light and shade.

I continue to update, in response to [url = space. php? Uid = 4025] The oc I asked before kuguoxin198 [/url]. Here I will briefly talk about the OC concept in cryengine. In fact, I think so too, however, the essence of the GPU is quite different from this. However, after seeing the practice of cryengine, I seem to have a back-to-back, and I am very confident in doing the same. Of course, the oc I am talking about refers to the OC of query. Other OC methods using CPU are not discussed here. Query is similar to read-back. You need to wait until the video card command is executed to get the result. If the frame is in a crazy query, the OC will directly hit the frame rate. There is a kind of optimization OC solution in the GPU essence, but this solution only reduces the number of queries in frames, and does not solve the problem that queries directly lead to idle processors, therefore, the performance gains are very limited. If you use this solution to make a game, the scenario size will be quite limited. The cryengine OC is still expected to be queried after the frame header, that is, begin. The advantage is that begin has waited for the video card to complete all operations, therefore, the query after the in operation will be quite fast, and the precious CPU cycle will not be wasted because of synchronization. After the results are obtained, a frame is too late and can be applied directly during rendering. Of course, the CPU load can be greatly reduced when the scenario manager cull is in the next frame. However, in that case, the OC result requires two frames to be delayed. cryengine may be one of the two types. I guess it should be delayed by two frames, after all, for cryengine, the valuable CPU has to compute almost all the physical resources of the next generation. It is necessary to save these resources when the scenario scale and line of sight are so large. At this time, someone will find that it is not a result error, the two frames will be more serious than the one. The truth is true, but this is the defect optimization I mentioned before. It is still cost-effective even if there are flaws in the performance improvement, after all, the OC error is not unacceptable. The reasons are as follows:
1. if you want to increase the scale of the scenario on the same generation hardware, many of the technologies with the level-of-detail (dashboard) will lead to jumps and sudden changes, and some distant things will suddenly disappear, the disappearance caused by OC only increases the chance of disappearance.
2. originally, we had to use a very rough or even deliberately increased model proxy for OC. This roughness would in turn reduce the chances of OC errors, so OC errors can be greatly reduced, if there is a particularly dazzling disappearance, you only need to increase the proxy.
3. There are not many opportunities for high-speed camera movement.
4. It turns out that crysis's crazy beating mutation is completely covered up by large-scale scenarios and ultra-high specifications.
Our requirement for OC is to increase the average frame rate with a minimum frame rate without dropping at least. The perfect solution is to free up GPU and CPU at the same time, rather than seamless. The following figure shows the OC result of cryengine.

 

 

It can be seen that the OC is not so precise, and the accuracy of the OC is not helpful to the performance. At present, there seems to be an OC engine called umbra, which may be more refined than crytek.

Next, let's talk about HDR. HDR is a strength of cryengine. It can also be said that cryengine has pushed the HDR effect to an unprecedented level, in short, the rendering result of a photo like cryengine is most closely related to its HDR.
As we all know, HDR is one of the most popular technologies in recent years. If an engine does not support HDR well, it will certainly be listed as a top-class engine. Both cryengine1 and unreal3 have successively supported this revolutionary technology symbolic of the future. There is a fundamental difference between HDR and Bloom. Although many people think it is similar, more than bloom HDR is the essence of HDR. Even if we say that HDR is the current generation (the next generation a few years ago), it is far from the root of the top-level rendering technology. Real light may bring about several hundred times the brightness gap, but the devices used for display can only have a fixed range of limited brightness, with limited LR (low range) it is a challenge for devices to represent the world of HR (High Scope). In the end, we need a technology to dynamically map hr to LR devices, which is HDR. Photos are a model of this effect. Photos are LR (low range), which is the same as in the game. Why do we think the photos are better restored, this is because the photo has an exposure process. Generally, the photo is usually exposed, and if you take the photo yourself, you will often encounter poor exposure, exposure is actually a process of HDR ing, and human eyes have similar processes. The super highlight that LR cannot present is usually in the form of a halo, which is not determined by others, but is naturally formed by a photosensitive device like the human eye when recognizing the world, when you see the photo halo, you will find it bright, which is actually a potential implication of the human brain. Of course, the human eye range is much higher than the display device, so the goal of HDR is to move closer to the photo. Thus, the most critical technology of HDR is tonemap, which is not called HDR without tonemap. Tonemap is not that easy, and the effects of common methods are not ideal. For more information, see the HDR-related content in dxdemo. This tonemap effect is useless. Cryengine2 has made a major breakthrough in this regard, which makes the rendering Effect of cryengine so close to the photo that it is hard to recognize.

PS: Amazing!

 

Comparing the HDR effect in unreal3 with cryengine, I found that the tonemap range of unreal3 is very small and can be felt a little while going out of the room, while the tonemap of cryengine2 has an exaggerated effect, generally, the ground becomes almost black when the device starts. Such a wide range of tonemap enables cryengine to truly achieve HDR, and compared with the gray restoration of hdrlighting, cryengine's restoration makes the scene exceptionally brilliant, and the charm of HDR is played out by cryengine. The comfort of cryengine HDR is especially evident for those who are disgusted with the high saturation caused by Bloom. The high saturation gives people a sense of nausea, and the low saturation is also a very big role of HDR, but usually see HDR always makes the scene not so brilliant, cryengine version HDR breaks this, making people shine. Most of the amazing things cryengine brings us are because HDR is so brilliant.
After analysis, I learned about the extraordinary features of the cryengine HDR, and once again I deeply lamented the strength of the Japanese people. Cryengine's HDR does not use the tonemap formula described in the tonemapping literature. Linear tonemap not only restores the difference, but also obviously weakens the contrast, making the scene non-normal and not angry. Secondly, lwhite is used as the threshold to increase the contrast, however, if the threshold is too low, it will lead to over-exposure. If it is too high, it still cannot solve the problem of reduced contrast. That is why DX hdrlighting cannot be used. However, cryengine uses a better tonemap method called exptonemap. In fact, this is also a long time ago, and no one actually implements it. As the name suggests, exptonemap will gradually squeeze the color away from the average brightness, and squeeze the non-uniform speed, which produces a very interesting effect, and this can well squeeze the bright and dark colors at the same time, this ensures that the effective contrast can be restored well and the average color will no longer appear. However, exptonemap alone is not enough. It may be noticed that cryengine's bloom is also very real. cryengine has more bloom layers and better effects than the illusory halo. In fact, Bloom is reinforced in cryengine. Bloom is divided into two parts: brightpassbloom and extraglow. Brightpassbloom is usually the bloom in HDR, but the implementation in cryengine is very different. cryengine shares six gaussianblur, adds two halfsamples, one brightpass, and one finalmerge, there are a total of 10 batches, and each buffer is 64-bit. Therefore, cryengine has spent a lot of resources to generate Bloom. Of course, the results are gratifying. Overlay the gaussianblur results of Layer 3 gaussianblur of 1/2 1/4, and a very hierarchical Bloom is displayed, which is added to the HR color before tonemap, this effectively prevents bloom from increasing too much saturation and makes bloom look very hierarchical. The same is true for extraglow. The difference between layer-3 superposition is that extraglow is lr, which is used to process bloom of objects of special materials. This gives the final effect of cryengine.
It is worth mentioning that the normal HDR effect is required, and the sky with HDR is very important. For static sky, you can go down to the HDR sky box. For dynamic Sky, you need to calculate atmospheric scattering. Cryengine's atmospheric scattering computation process is invisible, so I did it myself by referring to the document siggraph1993. In the end, we were pleasantly surprised by cryengine. HDR took me a long time, but from the perspective of my modifying the Ogre curve, the completion of HDR improves my rendering features at one time, showing how remarkable the effect is.
The following is my early screenshot, which demonstrates the hdrtonemap process. We can see that the color restoration process is very good.

 

 

 

Next we will talk about colorgrading. colorgrading is actually a collection of filter effects, which uses many practical filters. At the end of the engine rendering, some filters can be used to make the screen suitable for actual needs, making the rendering results easier to control. This idea is very recommendable, and all of them are centered around artistfriend. One of the effects is worth mentioning, that is, colorsharping. The calculation method is to convert scene-sceneblur * D and D into a small value. I don't know who invented this method, minus the fuzzy part to highlight the details.


After several times of filter processing, the rendering results are still quite good.

 

 

I have also added this feature in my rendering, and the effect is quite good. It is said that cryengine3 has enhanced this effect and I don't know what to add to it.

In the case of 1024x768, his four points are
0.000928, 0.000326
-0.000244, 0.001250
-0.000937,-0.000326
December 0.000244,-0.001250
Of course, it is carried out in linear sampling, and sunshaft also uses this kernel for blur.
Cryengine's kernel is odd and rarely symmetric.

Ssao does not improve the image quality of crysis. It just makes up for the lack of Indirect lighting in dynamic scenarios, but its effect is still far from the illusory lightmass. What truly shines on us is HDR.

Alphatest and clip are special cases that will directly lead to failure of earlyz before clear, so be sure to sort them, and with these cases, only filling depth cannot have a gain of double rendering speed. However, because the fill occupies the bandwidth, Even if you cannot double it, enabling test or clip will save performance.

 

I'm not doing anything. I want to continue...

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.