[Review translation] [review] "Metal Gear Solid 4" graphic lecture of Xichuan Shansi (5)

Source: Internet
Author: User

 Http://www.huanimei.com/logs/94179985.html

Special effects produced using scene depth values

In recent years, many special effects of pixel shader have been flexibly applied to 3D game graphics. They all make some screen processing for the rendered scenes, it is a typical way to draw special effects in post-processing.

The depthbuffer (Z buffer, depth buffer) content of the scenario is frequently used. Of course, this technology is not used in mgs4. the flexible application of depth buffer can implement various special effects. The depth-of-Field Simulation and special atomization effects mentioned above are implemented using this key depth value.

The deferred rendering technology used in killzone2 was used to pre-render the Z buffer technology in recent PC games. There are many techniques related to the depth buffer, but in mgs4, we use the depth buffer after scene rendering.

However, if depthbuffer is directly used as a texture, access will consume a lot. The reason is that the depth value is stored in a non-linear format. In addition, because the floating-point format of depth buffer is used in mgs4, the entry consumption is greater than that of the integer depth buffer.

In mgs4, the depth value can be seen in most special effects shader, And we will change it to easy to operate, it is also used for post-processing of linear w-value textures in floating point format.

The texture generated after the floating point depth value is transformed to the linear W value is used in various later shader.

Read Code of the W value. The pack and unpack commands are used to store floating point values in the opengle to the GeForce series (rsx also contains) operated by the integer texture)
This w-value texture is used to present special effects, in addition to the simulated depth of field and atomization effect, softparticle and other effects. Soft particle refers to the process where particles such as explosion and the polygon of other models, such as the background or role, are crossed together to reduce the obvious intersection at the intersection.

The specific method is to compare the depth value of a particle with that of other objects when the pixel of the particle is drawn. The closer the depth value is, the closer it is to the cross line, you can determine the degree to increase the transparency of the plotting. This technology is often seen in the next generation of 3D game graphics.

Soft particle off. The intersection between the dust particles and the wall can be seen clearly

Soft particle on. The intersection of soot particles and the wall disappears.

In addition, when an explosion occurs, the dynamic attached decal effect, such as burning marks in the scene, looks like a projection texture. In fact, the W-value texture is used, the implementation method of attaching particles to other objects.

If you simply paste the object without the shape of the object to be pasted directly, but if you compare the particle depth with the scene depth (W value, if the depth difference is greater than a certain degree, the pixel will not be processed, so that the decal area can be correctly cropped based on the shape of the decal object to post decal.

The decal particle is directly attached to the object. It is pasted out of the contour of the wall.

Compared with the scene depth value (W value), if the difference value is greater than a certain value, the pixel will be discarded to obtain the correct result of sticking the object to the object based on its shape.

We expanded this idea to achieve the effect of the special skill of snake's skin outfit. Able to draw a prediction chart of the grenade explosion. It is a unique visual representation of an indicator that represents an explosion range as it is projected into a scene.

Impressive visual effects of explosion Prediction

This is the implementation method of attaching a particle to a bullet point, but unlike the previous cropping area method, it will refer to the depth value of the particle on each pixel (W value ), the angle of view information is used to calculate the value to the 3D world coordinates and sketch the image at the 3D coordinates. By using this method, it is as if the image is projected into the scene, and at the same time, the effect of the projection texture can be obtained.

The visual effect of explosion prediction illustrated in this way is actually

Paste a decal particle to the image by using pixel shader. An example of the special effect obtained by comparing depth values

Mgs4 Medium Cell How can a processor be flexibly applied. What is physical simulation like?

Mgs4 is an exclusive game software for the PS3 platform. it is notable that it is the flexible application of the cell processor of the PS3.

The cell processor is a collaborative processing unit that combines a powerpc970 dual-core main processor PPE (power processor element) and a seven-core (one-core-in-eight-base-disabled) Synergistic processor element (SPE) integration of the-bit SIMD-type vector RISC processor into an asymmetric multi-processor in the kernel. Because the performance of PPE is not very high, it is necessary to use the SPE thoroughly and flexibly to exert the capabilities of cell processors.

Gao said that in mgs4, the SPE has been flexibly applied in terms of sound processing, plotting processing, collision determination, physical simulation, and animation (Action) processing. In terms of sound processing, the main reason is that the SPE is dedicated for processing. In addition, the empty SPE will be flexible and dynamic for other processing.

Compared with other companies' PS3 game titles, the SPs' efficiency in mgs4 may be high. In addition, the usage of SPE in mgs4 is roughly divided into two categories.

One is the type of application that the SPE will focus on for a specific purpose. This type, such as sound processing, plotting, and physical simulationProgramStart the SPE in the previous set for processing during the special time period during runtime.

Another type is to dynamically allocate jobs from multiple modules to the SPE for processing. Animation processing is equivalent to collision determination. For example, the module of the enemy role will determine the collision, and the animation processing will be first sent to the SPE for processing. Other processing work will be performed before the calculation result is returned. This is a common method that is often used to block latency issues.

Mgs4 was originally developed as the title exclusively held by the PS3. Therefore, the structure of the application SPE was set up at the early stage of development and various experiments were conducted.

The high department said that because mgs4 did not consider the corresponding multi-platform, a large number of application SPEs were used. Therefore, the cell processor has been designed with an SPE from the very beginning. The principle adopted is to use the SPE implementation method to reduce the load if there is heavy load processing. Mgs4 does not have any technical barriers to running on multiple platforms. Therefore, running on the PS3 alone does not cause much trouble. If you do this on other platforms, it is rather troublesome. This is thanks to the help of the SPE.

In addition, according to the responses of various studios, cell processor's SPE is difficult to use. Sony published the library "PlayStation edge" for thoroughly applying the SPE ", mgs4 should have used this library very effectively. Also, for details about PlayStation edge, refer to the "PlayStation edge" section in this connection ".

The physical simulation engine in mgs4 adopts a completely self-developed DNS-based physical engine.

Gao said that the data compression library is used in mgs4. However, in the PlayStation edge, functions such as Using SPE to process vertex shader are not available. This is implemented using the same type of function library developed within the company. For example, skinning is used to change the posture of a role based on the captured data. (Vertex mixing), The mgs4 team used the SPE geometry sysytem, which was previously independently developed for applications.

After the appearance of "PlayStation edge", Gao said that we developed mgs4 to achieve major development breakthroughs, So we immediately developed similar functions. However, in the previous design of the SPE Geometry System, we also referred to edge geometry for the vertex format compression.

physical simulation engine, mgs4 adopts the parsing-based physical simulation engine developed by the company. The analytical method is to convert the binding motion equation between objects into a differential equation between each frame to solve the problem. In this regard, the SPEs are also used. The Physical Simulation Based on the parsing method is prone to errors caused by the movement vibration caused by the resistance when the objects interbetween between objects. We need to spend time to avoid this problem,
at last, let's review some of our experiences in creating the mgs4 project.

The high department talked about the technology to be implemented at the time, namely the cascade shadow map generated by dynamic shadow. A shadow map makes us feel the boundaries that mgs4 can achieve. In addition, only the blur effect of the lens is available in mgs4. It would be better if the object can be dynamically blurred. Even if you only use the subtle actions of a role, it can make the effect look better. This is a subject that can be studied after reducing development consumption. In the development of the next generation such as PS3, the overhead of data production, that is, the workload of art workers, is very large. Therefore, we need to consider how to add procedural technical methods as technical support for data production. On the other hand, I personally think that we should pay more attention to procedural technical applications in real-time rendering.

Mgs4 Will change PS3 ?

This time we made materials for mgs4 and had two feelings. The first point is the title of a game called the difficult-to-develop PS3 platform. Like mgs4, it is based on the premise that PS3 is dedicated. Basic research must be carried out. With the assistance of SCE, if it was initially developed for the implementation in the PS3, as the high Department said, development is not very difficult. This should give a lot of confidence to the studio that uses PS3 for game title development.

Originally, the difficulty of developing the PS3 was that the game title was developed on the premise of multiple platforms. The development and production team put forward a lot of opinions in this regard. Prior to the PS3, the engine was designed on the premise of the existing xbox360 and PC, with xbox360 and PC as the benchmark, therefore, it is difficult to deduce the same performance in the PS3, but in fact, it is not as hard-to-develop hardware as people have mentioned in the PS3.

Compared with developing the PS3 itself, it is difficult to transplant the optimized software for different hardware. In fact, it is better to say that it has been a conclusion since a long time ago. However, only the special development studios like mgs4 can be specially developed for the PS3. This situation leaves a subject.

Second, mgs4, as the first PS3 work of the island working group, uses PS3 as a very realistic game platform for development. Not to mention the difficult issues in development and implementation, but to introduce and implement many advanced technologies, at least first, development is successful in raising the overall gaming experience that users can experience from the PS2 era to the level of PS3. In mgs4, there are multiple shader effect types, with a 1024x768 resolution, which can also have a sense of XX. In general, the shader has successfully demonstrated a real full image that exceeds the performance of the machine. This is a symbolic point.

The keyword "Full HD 1920x1080 pixels" set at the beginning of the release of the PS3 machine is considered very necessary, and the PS3 is a bit proud. This is hard to implement in the 12bit and 8rop structures of rsx in this serialization. To achieve games with rich visual effects, it is not necessary to stick to the full-definition image standard of X. The mgs4 game stick to this design. Therefore, mgs4 is a challenge to the limits of 3D image expressiveness of the PS3, and has demonstrated the highest level in many games.

It should be said that mgs4 has since become a milestone in the graphic image of the PS3 game.

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.