Color-bleeding Map)

Source: Internet
Author: User

 

Half-life 2 combines normap with quake2's lightmap technology to become normapped radiosity lighting, also known as bumpped radiosity lightmap;

Half-life 2 has brought Q2's illumination technology to its extreme, but it still cannot be moved...

 

I tried to use radiosity to implement lightmap (without normap) and tried to combine static lightmap with real-time shadow ing. After a series of research and attempts, this result is initially achieved.

 

 

 

The red light source is a dynamic light source, and shadowmapping + project spot texture is used as the spotlight effect. The white light source is static light, which is used to calculate lightmap in advance; in fragment shader, The lightmap sampling color and Shadow Mapping/Pixel Lighting color are added as the illumination color, and then multiplied by the basic color or texture;

Multiple real-time light sources are simply rendered to the texture multiple times, and then combined in the screen space; finally, in the screen space and Rendering scenario (the real-time shadow map is projected on the screen), it is combined with the lightmap texture; the unfortunate thing is that shadows cannot be dimmed on the illumination map in real time, because shadows and lightmap cannot be dimmed when they are added. This problem may be solved by using the method of reverse subtraction of shadows, but now I have not found a perfect solution; but here, this problem is not important; because it is not the things I want to focus on;

 

In order to darken the objects that enter the shadow of lightmap, I once wanted to output the shadow detph map of each static light source while outputting the lightmap; Because lightmap is a color graph, it does not contain the occlusion information; you must use the additional occlusion information to recreate the shadow information; I think it is a bit more to come here;

 

Why don't we just think about how long the radiant illumination spreads the color of the surface after each pixel of the light source?

After thinking, I immediately tried it. So I got the color diffuse texture mentioned in the title. At that time, I didn't find a proper term to name it, I want to call it "ambient radiosity", but I am not satisfied with the concept of ambient occlusion. When I came to communicate with Skybreaker about radiosity, I mentioned my idea. Skybreaker, a genius, calls this enhancement "color bleeding ";

 

Skybreaker is a genius...

 

Thank you very much for helping me think of an accurate name... I name this enhanced indirect illumination as "color-bleeding map", indicating the indirect illumination part after Direct Illumination in global illumination. But the problem cannot be solved? Well, we can think like this: the Indirect lighting part emphasizes the overall effect, not the details; so it is not important to be motionless; but after I strip it from the shadow map, the shadow map can be moved! Objects entering the shadow area will also be shadow, and the rendered color bleeding screen texture will be masked... In this way, there is a real and credible Indirect lighting (but it cannot be changed );

 

Although crytek's ssao changes in real time and the effect is satisfactory, it only blocks the light and shade information, but does not have the diffuse information of the surface light. Color diffusion textures can solve this problem. Color diffusion textures cannot be moved, but they are not important.

 

Inspired by ssao, I Was Wondering If color diffusion textures could spread out like ssao's? But after thinking about it, I found that it is not that simple. isn't real-time radiation just done? Even if this is possible, the impact factor on each pixel of the screen is probably not just a few pixels around it. I have thought about collecting the triangle surface around, using only vertices for color bleed, secondary attenuation and N * l methods...

 

This topic is a bit far away, but I will try it. I 'd like to share with you my rendering experience. The time is too short and the process is rough. Thank you for your understanding :)

 

 

<Shadow map> There is only one white light source in the scenario. The shadows blocked by the red wall and the Green Wall are pure black, because there is no direct illumination, no ambient light, and indirect lighting from other surfaces, Their respective surfaces are only directly illuminated by the light source. Together with the materials, the surface color is determined. The red and green surfaces are illuminated by white light, or the original red and green surfaces. The wall is blue-green and is directly exposed to white light. It remains blue-green.

 

 

 

<Color-bleed map> The surface color is only affected by the indirect light from other surfaces on the material, rather than the direct light on the material. Therefore, the ground of the green wall surface is affected by the green light reflected by the Green Wall and becomes slightly green. The red wall is affected by the combination of white light and the surrounding blue-green environment, and becomes gray-white, so it emits slight gray-white light to the ground, just as their own colors spread to other surfaces; the color of the middle two walls comes from the surrounding walls.

 

 

 

 

<Shadow map + color-bleed map>

The Shadow Map Render texture and color-bleed Map Render texture superimposed by multi lights are projected in the screen space, superimposed in the fragmet shader, and then multiplied by other colors. We can see that in the final synthesis result, the overlay view lighting is a kind of overall effect: the entire field is highlighted (the shadow and the illumination area of the light source are highlighted), and the light and shade changes slowly, the bright area of color diffusion becomes less obvious. Even if the color and position direction of the static light source change, the light source has little influence on the Indirect lighting part. For example, the light source moves to the left of the Green Wall, at this time, the green highlight area should be on the left side, but it is not very important in the overall atmosphere. What is important is that the shadow is free. It can be superimposed like the shadow of any dynamic light source, and the dynamic objects entering the shadow can be dimmed. This is very obvious and important. In addition, the color of the red wall turns gray, and it looks a little strange. In fact, there is no problem. The blue-green surrounding area overlays with its own red color, and the white light shines, and the result is close to Gray. Different from the green light, the green light is subject to the blue-green environment (mainly green) and the white light, or green.

 

In particular, I would like to thank all the friends in the engine R & D group for their support. I would like to thank all of you for your enthusiastic support and attention. Although Tom is always "slander" me, he can be seen as a friend of mine, without a strict pick-up problem, how can we continue to improve? Tom is also a genius... Everyone is a genius. I am a sweet potato. However, things are not over yet, and more things need to be improved. I will continue to work hard...

 

 

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.