Screen Space Ambient Occlusion (SSAO): Difference between revisions
(Undo -- Content removed for unknown reason.) |
(Undo revision 140743 by OneQuarterLife (Talk)) |
||
Line 2: | Line 2: | ||
'''Ambient Occlusion (AO)''' is a type of [[lighting]] technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. Typically AO is accomplished through '''[[Wikipedia:Screen Space Ambient Occlusion|Screen Space Ambient Occlusion (SSAO)]]''', which is a simplified way to fake realistic AO with shaders in a process fast enough for real-time rendering. | '''Ambient Occlusion (AO)''' is a type of [[lighting]] technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. Typically AO is accomplished through '''[[Wikipedia:Screen Space Ambient Occlusion|Screen Space Ambient Occlusion (SSAO)]]''', which is a simplified way to fake realistic AO with shaders in a process fast enough for real-time rendering. | ||
[[{{ns:6}}:Prop ragdoll.jpg|thumb|right|400px|SSAO in the Source engine using Nvidia drivers.]] | |||
SSAO works by examining an onscreen pixel, and then comparing its location in the depth buffer (i.e. how far it is away from the player) to the pixels around it. Pixels which are close together but not coplanar (on the same face) are shaded to simulate soft shadows. To maintain playable framerates, it is not possible to sample every pixel every frame, so random sampling is used, which will inevitably create noise/grain which may be more noticeable with movement. To counter this, the SSAO pass is often Gaussian blurred to remove such grain. | SSAO works by examining an onscreen pixel, and then comparing its location in the depth buffer (i.e. how far it is away from the player) to the pixels around it. Pixels which are close together but not coplanar (on the same face) are shaded to simulate soft shadows. To maintain playable framerates, it is not possible to sample every pixel every frame, so random sampling is used, which will inevitably create noise/grain which may be more noticeable with movement. To counter this, the SSAO pass is often Gaussian blurred to remove such grain. | ||
Line 8: | Line 9: | ||
=Enabling and Using Nvidia's Forced Driver SSAO= | =Enabling and Using Nvidia's Forced Driver SSAO= | ||
Nvidia's drivers feature a method that allows for SSAO to be forced on in | [[{{ns:6}}:EnableAO.png|thumb|left|150px|Enabling AO in Nvidia control panel]] | ||
Nvidia's drivers feature a method that allows for SSAO to be forced on in many games. Enabling this feature is as simple as turning it on within Nvidia's driver control panel. | |||
{{Note|Enabling Nvidia's forced SSAO can cause significant performance penalties.}} | {{Note|Enabling Nvidia's forced SSAO can cause significant performance penalties.}} | ||
==Supported games== | ==Supported games== | ||
All [[Source]] engine games except [[Portal]] have driver profiles to enable Nvidia's SSAO. SSAO in Portal can be forced on by editing Portal's driver profile with an external application such as nHancer. | All [[Source]] engine games except [[Portal]] have driver profiles to enable Nvidia's SSAO. SSAO in Portal can be forced on by editing Portal's driver profile with an external application such as nHancer. | ||
==Graphical Bugs== | ==Graphical Bugs== | ||
Nvidia's SSAO implmentation was designed to be general purpose, and | Nvidia's SSAO implmentation was designed to be general purpose, and has several bugs common to most games which can utilize it. Most significantly, the shading is rendered over fog, sometimes making objects partially visible when they should be obscured. | ||
It is recommended that you use a more modern SSAO implementation that takes the scene's normals into account if you intend to design your own shader for use in Source. | |||
[[{{ns:6}}:Ao_renderbug_trees.jpg|thumb|right|200px|The shadows being rendered on top of fog are noticable on distant trees.]] | [[{{ns:6}}:Ao_renderbug_trees.jpg|thumb|right|200px|The shadows being rendered on top of fog are noticable on distant trees.]] |
Revision as of 15:44, 22 December 2010
Ambient Occlusion (AO) is a type of lighting technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. Typically AO is accomplished through Screen Space Ambient Occlusion (SSAO), which is a simplified way to fake realistic AO with shaders in a process fast enough for real-time rendering.
SSAO works by examining an onscreen pixel, and then comparing its location in the depth buffer (i.e. how far it is away from the player) to the pixels around it. Pixels which are close together but not coplanar (on the same face) are shaded to simulate soft shadows. To maintain playable framerates, it is not possible to sample every pixel every frame, so random sampling is used, which will inevitably create noise/grain which may be more noticeable with movement. To counter this, the SSAO pass is often Gaussian blurred to remove such grain.
SSAO in the Source Engine
Enabling and Using Nvidia's Forced Driver SSAO
Nvidia's drivers feature a method that allows for SSAO to be forced on in many games. Enabling this feature is as simple as turning it on within Nvidia's driver control panel.

Supported games
All Source engine games except Portal have driver profiles to enable Nvidia's SSAO. SSAO in Portal can be forced on by editing Portal's driver profile with an external application such as nHancer.
Graphical Bugs
Nvidia's SSAO implmentation was designed to be general purpose, and has several bugs common to most games which can utilize it. Most significantly, the shading is rendered over fog, sometimes making objects partially visible when they should be obscured.
It is recommended that you use a more modern SSAO implementation that takes the scene's normals into account if you intend to design your own shader for use in Source.