Ambient occlusion is a graphics rendering technique that simulates the effects of ambient light on 3D objects. It involves darkening areas where light is blocked or reflected by other objects, creating soft shadows and realistic contrasts.
Ambient occlusion is important to the realism of 3D video games because it adds depth and relief to the scene, taking into account the geometry and orientation of objects.
There are different types of ambient occlusion, which are based on different algorithms and parameters, offering more or less faithful and efficient results.
Why is ambient occlusion important for 3D video games?
Ambient occlusion is important for 3D video games because it adds depth and relief to the scene. It allows objects to be distinguished from each other, based on their shape and orientation. It also makes colors more natural , preventing them from being too light or too dark. Ambient occlusion therefore makes 3D video games more beautiful and more immersive .
What are the different types of ambient occlusion?
There are different types of ambient occlusion, which are based on different methods and parameters. These types of ambient occlusion have complicated names, like SSAO, HBAO, HDAO or VXAO. But don't worry, we'll explain to you what that means and how it works.
The SSAO: Screen Space Ambient Occlusion
SSAO simplest and most common type of ambient occlusion . It is based on a simple idea: the closer two objects are to each other , the more they cast a shadow on each other . SSAO therefore measures the distance between objects on the screen, using an image called the z-buffer .
The z-buffer is like a map that indicates the distance between each point on the screen and the camera. Then, the SSAO compares the distance between neighboring points to know if they cast shadow or not. If so, it darkens the point based on the shadow level.
- Advantages : it is quick and easy to do, it adapts to the movements of the camera and objects, and it works with all 3D games.
- Disadvantages : It doesn't take into account the direction or color of objects, it doesn't differentiate between near and far objects, and it doesn't handle edges or transparencies well. It can therefore make shadows that are too dark, too blurry or poorly placed, which are not very realistic.
The HBAO: Horizon-Based Ambient Occlusion
HBAO is a more advanced type of ambient occlusion than SSAO . It is based on a more complex idea: the higher an object has a horizon , the more ambient light it receives . The horizon of an object is like its line of sight to the sky.
For example :
- If you are on top of a mountain, you have a very high horizon, because you see a lot of sky.
- If you are in a valley, you have a lower horizon, because you see less sky.
The HBAO therefore measures the horizon of each point on the screen, using an image called the normal buffer . The normal buffer is like a map that indicates the direction of the surface of each point . Then, the HBAO compares the horizon of neighboring points to know if they cast shadow or not. If so, it darkens the point based on the shadow level.
- Advantages : it is more precise and more realistic than the SSAO. It takes into account the direction and color of objects, it differentiates between near and far objects, and it better handles edges and transparencies. It therefore creates finer, sharper and better placed shadows, which reinforce the realism of the scene.
- Disadvantages : it is more expensive and more complex than SSAO. It requires measuring the horizon of each point, which requires more resources. It also depends on the quality of the normal buffer, which can be imprecise or noisy. It does not work with all 3D games, they must provide the normal buffer or use a compatible graphics engine.
HDAO: High Definition Ambient Occlusion
HDAO is a more efficient type of ambient occlusion than HBAO . It is based on a more adaptive idea: the more samples a point needs , the more likely it is to be occluded by surrounding objects . Samples are like points of view that we take around a point to see if it is lit or not.
For example :
- If you're in a dark room, you need a lot of samples to see if you're occluded by a piece of furniture or a wall.
- If you're in a bright room, you need fewer samples to see if you're occluded by a window or lamp.
The HDAO therefore calculates the number of samples from each point on the screen , using a method that varies the number of samples depending on the distance and angle of the points. Then, it compares the number of samples from neighboring points to find out if they cast shadow or not. If so, it darkens the point based on the shadow level.
Advantages : it is quality and efficient. It uses an optimal number of samples for each point, which avoids quality losses or wasted resources. It therefore creates more detailed and deeper shadows, which improve the quality of the scene.
Disadvantages : it is incompatible and difficult to adjust. It does not work with all 3D games, they must use a specific graphics engine, like that of AMD or that of Ubisoft. It also depends on the player's settings, who must choose the minimum and maximum number of samples, as well as the radius and intensity of the occlusion.
VXAO: Voxel Accelerated Ambient Occlusion
VXAO is a more advanced type of ambient occlusion than HDAO . It is based on a more complete idea: the more precise a point has a voxelized representation of the scene , the more likely it is to be occluded by surrounding objects . The voxelized representation is like a 3D model that reproduces the scene with small cubes called voxels.
For example: if you have a house in voxels, you can see all the details of its structure and its lighting.
The VXAO therefore creates a voxelized representation of the scene on the screen, using a method called voxel cone tracing . Voxel cone tracing is like sending virtual cones in all directions from each point to see which voxels are blocking the light.
Then, it compares the voxelized representation of neighboring points to know if they cast shadow or not. If so, it darkens the point based on the shadow level.
Pros : It is detailed and deep. It uses a complete and accurate voxelized representation of the scene, which helps capture all possible occlusion effects, including those due to dynamic objects or light sources. multiple. It therefore creates very fine and very deep shadows, which increase the depth of the scene.
Disadvantages : it is greedy and limited. It requires creating a voxelized representation of the scene, which requires a lot of resources, particularly video memory. It is not compatible with all 3D games, they must use a specific graphics engine, such as that of Nvidia or that of Square Enix.
Ambient occlusion in current video games
Ambient occlusion is a graphics rendering technique that is present in many current video games. It player immersion shadow and contrast effects that give relief and depth to 3D scenes. Here are some examples of games that use ambient occlusion:
- Red Dead Redemption 2 : This open-world action-adventure game developed by Rockstar Games uses HDAO to create soft, realistic shadows in natural and urban environments. The game also features a photo mode that allows players to capture images with different ambient occlusion settings.
- Metro Exodus : This first-person shooter developed by 4A Games uses VXAO to create fine, deep shadows in post-apocalyptic environments. The game also uses a technique called Global Illumination , which combines ambient occlusion with light diffusion, to create dynamic color and lighting effects.
- Assassin's Creed Valhalla : This open-world action-RPG game developed by Ubisoft uses HBAO+ to create sharp, precise shadows in historical and mythological environments. The game also uses a technique called Screen Space Reflections , which combines ambient occlusion with light reflection, to create realistic mirror and water effects.
To activate and adjust ambient occlusion in the graphics settings of games, you generally have to access the advanced options menu, where you can choose the type and intensity of ambient occlusion. The effects of ambient occlusion on system performance and power consumption must also be considered. This is because the higher the ambient occlusion, the more it demands resources from the GPU and graphics card, which can lead to a drop in the number of frames per second or an increase in system temperature.
Ambient occlusion in the future of video games
Ambient occlusion is a graphics rendering technique that still has limitations and challenges. It depends in fact on the quality and precision of the algorithms used, as well as the power and compatibility of the systems used. Here are some possible ways to improve ambient occlusion:
The use of ray tracing
Ray tracing graphics rendering technique which consists of simulating the path of light rays in the 3D scene , taking into account interactions with objects and materials. Ray tracing therefore makes it possible to calculate ambient occlusion in a more realistic and precise manner than current techniques, but it also requires many more resources.
It is therefore necessary to use special graphics cards, such as those from Nvidia or AMD, which integrate units dedicated to ray tracing.
The use of artificial intelligence
Artificial intelligence is a technique which consists of using algorithms capable of learning and evolving based on the data provided. Artificial intelligence can therefore be used to optimize the calculation of ambient occlusion , by adapting the number of samples or the occlusion radius depending on the scene or movement.
It can also be used to correct artifacts or inaccuracies caused by current techniques, using neural networks or pre-trained models. But this use of artificial intelligence also raises social and economic questions. alone , the use of AI kills 217 jobs .
It can also be used to correct artifacts or inaccuracies caused by current techniques, using neural networks or pre-trained models.
The use of virtual reality
Virtual reality is a technique which consists of immersing the player in an immersive 3D environment , using a headset or special glasses . Virtual reality can therefore benefit from ambient occlusion, which reinforces the realism and depth of the scene.
But it also poses constraints, such as the need to have a high and constant number of images per second , to avoid nausea or headaches. It is therefore necessary to use ambient occlusion techniques adapted to virtual reality, such as Foveated Rendering , which consists of reducing the graphic quality of peripheral areas of the field of vision.
The future prospects of ambient occlusion are therefore numerous and promising. It can help create more beautiful and realistic 3D video games, but it must also adapt to new technologies and new player requirements.
FAQs
What is ambient light?
Ambient light is light that comes from all directions and evenly illuminates the scene. It does not have a precise source, it is the result of the diffusion of light by the atmosphere, clouds, walls, etc.
Ambient light is often used in video games to create basic lighting , which can then be supplemented with direct light sources, such as the sun, lamps, fires, etc.
What is the difference between ambient occlusion and drop shadows?
Cast shadows are the shadows that objects make when illuminated by a direct light source. They depend on the position and shape of the object, as well as the direction and distance of the light source. Drop shadows are often used in video games to create contrast and depth between objects and the background.
Ambient occlusion is the shadow that objects make when illuminated by ambient light. It depends on the proximity and orientation of objects to each other, as well as the radius and intensity of ambient light. Ambient occlusion is often used in video games to create realism and fine detail in objects.
How to enable or disable ambient occlusion in a video game?
To activate or deactivate ambient occlusion in a video game, you generally have to game's graphics options menu It can be a simple on/off button, or a slider that allows you to choose the level of ambient occlusion.
Also read : Cloud gaming, the under-exploited future of the video game industry?
How does ambient occlusion impact video game performance?
Ambient occlusion impacts video game performance because it requires more calculations from the graphics processor ( GPU ) and graphics card.
The higher the level or type of ambient occlusion, the more resources it consumes . This can cause a drop in frames per second (FPS), which measures game smoothness, or an increase in system temperature, which can cause overheating or slowdowns.
What is the benefit of ambient occlusion for the player?
The benefit of ambient occlusion for the player is that it makes the video game more beautiful and more immersive . It allows you to create shadow and contrast effects that give relief and depth to 3D objects.
It also makes the colors more natural and more harmonious. Ambient occlusion therefore helps to create a more realistic atmosphere and ambiance in the video game.