Volumetric lighting: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (SirYodaJedi moved page Volumetric lighting to Volumetric fog: Fix page name; this is volumetric fog, not volumetric lighting)
(Fix)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
__NOTOC__
__NOTOC__
'''Volumetric lighting''' is a lighting technique meant to simulate light bouncing off fog or dust particles in the air, such as a warehouse or foggy beach. It makes the player see beams of light shining from the sun or other light sources. Currently, the only {{valve|4}}-made software running on {{Source|4}} that supports Volumetric Lighting is {{sfm|4}}, however [[List_of_third-party_Source_games|some third-party engines]] incorporate volumetric lighting into {{ent|env_projectedtexture}}. If the game you are making maps for doesn't support volumetric lighting, you can use some workarounds seen [[WiseVol|here]].
'''Volumetric fog''' is a lighting technique meant to simulate light bouncing off fog or dust particles in the air, such as a warehouse or foggy beach. It makes the player see beams of light shining from the sun or other light sources. Currently, the only {{valve|4}}-made software running on {{Source|4}} that supports Volumetric fog is {{sfm|4}}, however [[List_of_third-party_Source_games|some third-party engines]] incorporate Volumetric fog into {{ent|env_projectedtexture}}. If the game you are making maps for doesn't support Volumetric fog, you can use some workarounds seen [[WiseVol|here]].


Most {{Source2|4}} games have support for Volumetric lighting by default.
Most {{Source2|4}} games have support for Volumetric fog by default.


==Media==
==Media==
<div style=width:100%;overflow:auto>
<div style=width:100%;overflow:auto>
{| border="0" cellpadding="5"
{| border="0" cellpadding="5"
|[[File:Sfm volumetrics.png|380px|thumb|center|Volumetric lighting in Source Filmmaker]]
|[[File:Sfm volumetrics.png|380px|thumb|center|Volumetric fog in Source Filmmaker]]
|[[File:Deferred volumetrics.png|380px|thumb|center|Volumetric lighting in Alien Swarm Deferred]]
|[[File:Deferred volumetrics.png|380px|thumb|center|Volumetric fog in Alien Swarm Deferred]]
|[[File:Des_volumetrics.png|380px|thumb|center|Volumetric lighting in Portal 2: Desolation]]
|[[File:Des_volumetrics.png|380px|thumb|center|Volumetric fog in Portal 2: Desolation]]
|[[File:Hlvr-sfm-volumetrics.png|380px|thumb|center|Volumetric lighting in Half Life Alyx]]
|[[File:Hlvr-sfm-volumetrics.png|380px|thumb|center|Volumetric fog in Half Life Alyx]]
|}
|}
</div>
</div>
<div align="center" style=width:100%;overflow:auto>
<div align="center" style=width:100%;overflow:auto>
{| border="0" cellpadding="4"
{| border="0" cellpadding="4"
|[[File:volumetric_projected_texture_p2ce.jpg|400px|thumb|center|Volumetric lighting in Portal 2: Community Edition]]
|[[File:volumetric_projected_texture_p2ce.jpg|400px|thumb|center|Volumetric fog in Portal 2: Community Edition]]
|}
|}
</div>
</div>
Line 47: Line 47:
|}
|}


==Using models/textures to fake volumetric lighting==
==Using models/textures to fake Volumetric fog==
<div style=width:100%;overflow:auto>
<div style=width:100%;overflow:auto>
{| border="0" cellpadding="4"
{| border="0" cellpadding="4"
Line 64: Line 64:
</div>
</div>


{{Note|On [[DirectX Versions|DirectX]] 9, volumetric lighting on Old Engine was slightly less visible compared to using DX8 level. However, the volumetric lighting on New Engine DX9 was even less visible (or nearly invisible) compared to Old Engine's DX9. This is likely due to a bug (or changes to the lighting) on Source 2007 and later.{{Cite|1}}{{Cite|2}}}}
{{Note|On [[DirectX Versions|DirectX]] 9, Volumetric fog on Old Engine was slightly less visible compared to using DX8 level. However, the Volumetric fog on New Engine DX9 was even less visible (or nearly invisible) compared to Old Engine's DX9. This is likely due to a bug (or changes to the lighting) on Source 2007 and later.{{Cite|1}}{{Cite|2}}}}


{| class=standard-table
{| class=standard-table
!  !! Old Engine !! New Engine ({{src13|name}})
!  !! Old Engine !! New Engine ({{src13|name}})
|-
|-
| DirectX 8.1 (and earlier) || [[File:Trainstation volumetric DX81 Source 2006.jpg|Volumetric lighting on Old Engine - DirectX 8.1 ({{code|dxlevel 81}})|512px]] || [[File:Trainstation volumetric DX81 Source 2013.jpg|Volumetric lighting on New Engine - DirectX 8.1 ({{code|dxlevel 81}})|512px]]
| DirectX 8.1 (and earlier) || [[File:Trainstation volumetric DX81 Source 2006.jpg|Volumetric fog on Old Engine - DirectX 8.1 ({{code|dxlevel 81}})|512px]] || [[File:Trainstation volumetric DX81 Source 2013.jpg|Volumetric fog on New Engine - DirectX 8.1 ({{code|dxlevel 81}})|512px]]
|-
|-
| DirectX 9.0+ || [[File:Trainstation volumetric DX95 Source 2006.jpg|Volumetric lighting on Old Engine - DirectX 9.0+ ({{code|dxlevel 95}})|512px]] || [[File:Trainstation volumetric DX95 Source 2013.jpg|Volumetric lighting on New Engine - DirectX 9.0+ ({{code|dxlevel 95}})|512px]]
| DirectX 9.0+ || [[File:Trainstation volumetric DX95 Source 2006.jpg|Volumetric fog on Old Engine - DirectX 9.0+ ({{code|dxlevel 95}})|512px]] || [[File:Trainstation volumetric DX95 Source 2013.jpg|Volumetric fog on New Engine - DirectX 9.0+ ({{code|dxlevel 95}})|512px]]
|}
|}


Line 88: Line 88:
== External links ==
== External links ==
*[https://www.youtube.com/watch?v=ybSYhHx84xI YOUTUBE How To Create Sunbeams using Volumetric Fog in Source 2 Hammer]
*[https://www.youtube.com/watch?v=ybSYhHx84xI YOUTUBE How To Create Sunbeams using Volumetric Fog in Source 2 Hammer]
* [https://www.youtube.com/watch?v=hzn0cms5atU Volumetric lighting imitation trick with env_projectedtexture and translucent models (showcase)]
* [https://www.youtube.com/watch?v=hzn0cms5atU Volumetric fog imitation trick with env_projectedtexture and translucent models (showcase)]
* [https://www.youtube.com/watch?v=sGArfKK-DXg Volumetric lighting imitation trick with env_projectedtexture and translucent models (tutorial)]
* [https://www.youtube.com/watch?v=sGArfKK-DXg Volumetric fog imitation trick with env_projectedtexture and translucent models (tutorial)]
*{{w|Volumetric_lighting|Volumetric lighting}}
*{{w|Volumetric_lighting|Volumetric fog}}
[[Category:Graphics]]
[[Category:Graphics]]
[[Category:Glossary]]
[[Category:Glossary]]
[[Category:Technical]]
[[Category:Technical]]

Revision as of 10:05, 3 October 2024

English (en)Translate (Translate)

Volumetric fog is a lighting technique meant to simulate light bouncing off fog or dust particles in the air, such as a warehouse or foggy beach. It makes the player see beams of light shining from the sun or other light sources. Currently, the only Valve Valve-made software running on Source Source that supports Volumetric fog is Source Filmmaker Source Filmmaker, however some third-party engines incorporate Volumetric fog into env_projectedtexture. If the game you are making maps for doesn't support Volumetric fog, you can use some workarounds seen here.

Most Source 2 Source 2 games have support for Volumetric fog by default.

Media

Volumetric fog in Source Filmmaker
Volumetric fog in Alien Swarm Deferred
Volumetric fog in Portal 2: Desolation
Volumetric fog in Half Life Alyx
Volumetric fog in Portal 2: Community Edition

Native Support

Source Source

Game Supports
Source 2004 Source 2004
Source 2006 Source 2006
Source 2007 Source 2007
Source 2009 Source 2009/Source Multiplayer Source Multiplayer
Source 2013 Source 2013
Half-Life: Source Half-Life: Source
Day of Defeat: Source Day of Defeat: Source
Half-Life 2 Half-Life 2
Half-Life 2: Episode One Half-Life 2: Episode One
Half-Life 2: Episode Two Half-Life 2: Episode Two
Alien Swarm Alien Swarm
Alien Swarm: Reactive Drop Alien Swarm: Reactive Drop
Half-Life Deathmatch: Source Half-Life Deathmatch: Source
Half-Life 2: Deathmatch Half-Life 2: Deathmatch
Half-Life 2: Lost Coast Half-Life 2: Lost Coast
Counter-Strike: Source Counter-Strike: Source
Team Fortress 2 Team Fortress 2
Portal Portal
Left 4 Dead Left 4 Dead
Left 4 Dead 2 Left 4 Dead 2
Portal 2 Portal 2
Black Mesa Black Mesa
No
Alien Swarm Deferred Alien Swarm Deferred
Apex Legends Apex Legends
Portal 2: Desolation Portal 2: Desolation
Yes
Source Filmmaker Source Filmmaker
Strata Source Strata Source
Yes (env_projectedtexture)

Source 2 Source 2

Game Supports
Half-Life: Alyx Half-Life: Alyx Yes
Counter-Strike 2 Counter-Strike 2 Yes
S&box S&box Yes

Using models/textures to fake Volumetric fog

Using vollight_stainedglass.mdl
Model in Hammer
Model in engine
Using vol_light128x128.mdl
Model in Hammer
Model in engine
Note.pngNote:On DirectX 9, Volumetric fog on Old Engine was slightly less visible compared to using DX8 level. However, the Volumetric fog on New Engine DX9 was even less visible (or nearly invisible) compared to Old Engine's DX9. This is likely due to a bug (or changes to the lighting) on Source 2007 and later.[1][2]
Old Engine New Engine (Source 2013)
DirectX 8.1 (and earlier) Volumetric fog on Old Engine - DirectX 8.1 (dxlevel 81) Volumetric fog on New Engine - DirectX 8.1 (dxlevel 81)
DirectX 9.0+ Volumetric fog on Old Engine - DirectX 9.0+ (dxlevel 95) Volumetric fog on New Engine - DirectX 9.0+ (dxlevel 95)


References

References

See also

External links