Brief Introduction to the next generation of game engine light and shade

Source: Internet
Author: User

Azure is here:

Http:// Id = 429


I. Categories of game light and shade
In actual game production, lighting in the narrow sense only refers Program In real time, based on the vertex color and dynamic shadow affected by the light, but in practical applications, the light and shade effects that affect the overall feeling of the player, that is, the light and shade effects in a broad sense, should be more extensive.
The real-time light and shade of the program. The shader customization is essential to the light and shade effect. The lightmap, normalmap, vertexcolor, and glow of art production can constitute the lighting effect recognized by General players.
That is to say, in game production, the effect of light and shade should be set based on the feeling of the game players, instead of dividing the scenes by technical means. For game production, the light and shadows that are presented to players by combining various techniques of procedural art are the lights in game production.

Ii. Basic lighting system introduction and usage
In terms of image rendering, No matter online games or games of the next generation, the calculation rules are similar. We can analyze this architecture to find the possibility of making various effects of light and shade, it is a more common operation of various graphic elements to achieve the final image pipeline.

In this pipeline, the link that affects the final light and shade

Dark Map
Dark map, also known as lightmap, is one of the methods that we often use today.
This channel is generally placed with bake lighting textures, or ambient occlusion map. The common method is to assign another UV, this small dark map can achieve good light and shade without light. Many engines can automatically generate lightmap by light, its effect is generally used on static objects.

Project lights
Project lights is what we call hardware lighting. Because the result is real-time computing and there are certain hardware requirements, we recommend that you do not have more than three lamps; otherwise, the efficiency will be affected. unless necessary, this method is not recommended.
The use of project lights is generally three parallel lights to construct an overall tianguang environment (ambient light also has important significance in this process ), because Project lights is a resource-consuming part, it should be optimized by the program as much as possible.

Base Map
Base map is diffuse map.
In textures, we can draw light and shadow on top of fixed colors. From this perspective, it is also an important method that affects the effect of light and shade. This method will hardly consume any system resources in light and shade performance. The effect mainly depends on the level of Paster painting by the artist.
At the same time, this is also the best way to complete most of the light and shadows under the conditions that the artist's ability permits.

Project shadow
Project shadow and project light generally have the same light source point, which is used to generate shadows. Because Project shadow is a dynamic shadow, it is generally used to represent animated objects, in actual use, project shadow and lightmap are often used together to solve the shadows of static and animated objects respectively. Similarly, this method consumes system resources, unless necessary, and is not recommended.

Normal Map
Normal map is a common technology used in the next generation of games. It solves the problem of how to reflect the details of objects when the number of opposite functions is limited, use RGB color to replace xyx with three normal axial values to obtain more object details.
The noraml map mechanism is mainly to distort the diffuse specular and reflect of an object in various lighting locations to achieve an approximate truth, but it will not affect the base map, normal map only affects the material, not the texture.
Due to this blind spot of normal map, the prallax map (or displacemap) method is created to make up for the defect that normal map cannot distort basemap. in actual application, it is often used with prallax map after normal map to achieve better results.

Vertex color
Material of vertex map is an important application in the game. vertex colors can be applied in a wide range and can be used in transparent and soft bodies. However, the most important application is color, by swiping the vertex color, you can easily and quickly change the color of an object and have low requirements on system resources. However, the color may conflict with the light color, in general, the light color and the vertex color are not used for the same object to avoid conflict. The vertex color can be manually drawn or the light can be baked, and more influence can be exerted on objects with a low surface number.
The vertex color is one of the best solutions to game light and shade and is also the most common solution.

Gloss Map
Gloss map is what we call a highlight texture. Generally, the light affects the highlights of an object based on the vertex color, such as the role hair and leather clothing. It is difficult to show the texture of an object financially, if gloss map is used, the texture of the texture can be used to define the shape of the highlight. It can also be used to reduce the resource usage to influence the effect of light and shade, the definition of gloss map is different from that of commonly used 3D software. It does not only affect the highlights, but also the reflection textures.

Gloss map does not need to be a grayscale image. It can be used in the same way as a color map.

Environment map
Environment map can be understood as the so-called reflection texture. It is often used to express metal objects in a variety of ways, such as spherical and box bodies. It can be restricted through gloss map.
The texture slot of the Enivironment map under Max is reflection slot. If the default texture is placed in, it will be reflected by spherical coordinates. If there is a higher requirement on the texture, the box texture is also used, six textures form a reflection box. If the DDS box texture is used, it can be called directly, but the coordinates are different.

Mixglow Map
Glow map is generally used to reflect various luminous objects, such as lights and flames. It is a commonly used special effect channel. It is attached to the glow map in the glow texture bar, it will multiply the final effect of other pasters.

Post Effects
In addition to the above effects, after final results are output, sometimes we use various post effect effects to enhance the image, such as glow, which also has a huge impact on the image light and shade.

Channel mix

Classification Method and production points of the lighting system
In actual game production, it is generally not used to open all channels. On the one hand, to make a good game screen does not depend on how many new technologies are used, so on the other hand, we must also consider the load of the program.
Select the right method based on the type and needs of the game and save resources reasonably to make the game have better results.

Technology is a means, not an appeal
Although "Doom III" was a technology-leading game at the time, art relied heavily on advanced technologies, leading to insufficient cutting-in the art style. It should be a better game, failed to proceed to the previous step.

In contrast, the lost plant launched a few years later successfully recovered the most essential thing of Game art and made technology a means.

Where? What measures should we use?
First, we must make it clear that we are in a mature Art Team. How is the light and shadows in a game image presented to achieve the best combination of screen effects and system workload?
We need to find the optimal means.

From Id = 47 & fromtype = 1

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: 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.