Gita Assets
Unity / VFX

Unity3D_Fast Volumetric Area Fog_V1.0.12_Volumetric Fog

Overview

Fast and performant area volume fog shaders including height fog, spherical fog and more, with lit and unlit versions that add ambient atmosphere to your game. Just place a fog object, specify its volume (box, spherical or custom mesh) and tweak parameters; all objects inside will be affected by fog, with no need to write custom surface shaders for those objects.

Key features

The fog effect renders everything using a special surface shader that calculates fog density based on fog type, depth, volume parameters and fog parameters, using simple optimized math for performance. The lighting model uses approximations for scattering calculation and fits into the existing Unity lights rendering pipeline. Unlit and lit versions with light scattering inside the volume are included; dynamic point and directional lights are supported, with more planned in updates, and light scattering is adjusted with three parameters to match the lighting style of the game. Forward and deferred rendering are supported. GPU instancing batches multiple fog volumes of the same type, with parameter variation still allowed, for improved performance. Perspective and orthographic cameras are supported, as are VR single-pass instanced and multipass rendering, for top-down, first-person, third-person and other game types. Uses include height fog on the floor in catacombs, underwater effects, space nebula and dust, planet atmosphere, area effects over vegetation and swamps, improvement of spell effects, local fog inside a single room, fog inside crevasses, caves and holes, light volumetrics, and masking areas outside the playable zone.

Included content

Area volumetric fog types: Height (fog density is distributed on the object local Y axis); SphericalPos (fog density is distributed inside a sphere volume and depends on point position, 100 percent at the sphere center and 0 percent on the sphere radius); SphericalDist (fog density is distributed inside a sphere volume and depends on the distance the view ray travels inside the sphere volume); InvertedSpherical (fog is rendered inside a box volume, but there is a spherical area without fog in the center of the volume, which might be useful for Battle Royale type games); ViewAligned (fog is rendered relative to camera position and view, as the default global fog is rendered, but limited to a specific box volume); BoxPos (fog is rendered inside a box volume and density depends on position and distance from the center of the box); BoxDist (fog is rendered inside a box volume and density depends on the distance the view ray travels inside the box volume); BoxExperimental (a more complex fog type rendered inside a box volume, working similarly to BoxPos with density depending on position and distance from the center of the box, but much smoother, with some imperfections when looking from different angles; select the best type for your use case); Mixed Fog Types (special fog types mixing two basic fog types for better visual results such as smooth edges for height fog, including InvertedSphericalXHeight, HeightXBox, HeightXView, BoxXView).

Compatibility

Unity 2021.3.31f1: Built-in supported, URP supported, HDRP unsupported. Tested with Unity 2021.3.31f1, 2022.3.21f1 and 2023.2.14.f1. Works with the Built-in and Universal render pipelines, with forward and deferred rendering support. The version supplied here is 1.0.12; actual support is based on that version.

Requirements

This asset requires Depth Texture to be enabled to work.

Render pipeline compatibility

UnityBuilt-inURPHDRP
2021.3.31f1

Technical specifications

Original creator
FX Valley
Current official version
1.0.12
Supported engines
2021.3.31, 2021.3.31f1
Render pipelines
2021.3.31f1 · Built-in / URP
Official file size
168.69 MB
Official update date
2025-02-05
Asset file count
309
Package format
unitypackage
First official release
2024-03-07

Tags

Full description

Fast and flexible volumetric fog shader. Just place fog object, specify its volume (box, spherical or custom mesh) and tweak parameters - all objects inside will be affected by fog - no need to write custom surface shaders for those objects. Fog effect renders everything using special surface shader, that calculates fog density based on fog type, depth, volume parameters and fog parameters. Simple optimized math is used making everything performant. Lighting model uses aproximations for scattering calculation and fits into existing Unity lights rendering pipeline. Allows creating area volumetric fog effects of different types: Height - Fog density is distributed on the object's local Y axis. SphericalPos - Fog density is distributed inside sphere volume, density depends on point position 100% at sphere center - 0% on sphere radius. SphericalDist - Fog density is distributed inside sphere volume, density depends on the distance that view ray travels inside sphere volume. InvertedSpherical - Fog is rendered inside box volume, but there is a spherical area without fog in the center of the volume. This might be useful for Battle Royale type games. ViewAligned - fog is rendered relative to camera position and view. This is as the default global fog is rendered but - in this case it's limited to specific box volume. BoxPos - Fog is rendered inside box volume - density depends on position and distance from the center of the box. BoxDist - Fog is rendered inside box volume - density depends on the distance that view ray travels inside box volume. BoxExperimental - This is a more complex fog type, that renders inside box volume. It works similar to BoxPos - density depends on position and distance from the center of the box, but it's much smoother. There are however some imperfections when looking from different angles. Select the best type for your use case. Mixed Fog Types - Those special fog types are mixing two Basic Fog Types to achieve better visual results like smooth edges for height fog. Including: InvertedSphericalXHeight, HeightXBox, HeightXView, BoxXView

Unlit and Lit version with light scattering inside volume. Dynamic Point and Directional lights are supported (More planned in updates). Light scattering is adjusted with three parameters to mach lighting style of the game. Works with BuiltIn and Universal render pipeline. (HDRP planned in future updates) Forward and Deferred rendering support. GPU instancing batches multiple fog volumes of the same type (parameters variation is still allowed) for improved performance. Support for Perspective and Orthographic camera. Support for VR single pass instanced and multipass rendering. Good for any game type Top Down, FPP, TPP. What it can be used for: - height fog on the floor in catacombs - underwater effect - space nebula/dust - planet atmosphere - area effects over vegetation and swamps - improvement of spell effects - local fog inside single room - fog inside crevasses, caves, holes - light volumetrics - masking areas outside of playable zone Please note that this asset require Depth Texture to be enabled to work. Known Limitations: - only Unlit version will work with URP 2D Renderer - Lit version is not properly rendered with Forward+

Tested with Unity 2021.3.31f1, 2022.3.21f1, 2023.2.14.f1 Planned festures: - HDRP support - Shadows support - Spot light support

Ratings and reviews

You can rate and review this item after purchase.

No buyer reviews yet.

Unity3D_Fast Volumetric Area Fog_V1.0.12_Volumetric Fog · Unity VFX · Preview 3Unity3D_Fast Volumetric Area Fog_V1.0.12_Volumetric Fog · Unity VFX · Preview 4Unity3D_Fast Volumetric Area Fog_V1.0.12_Volumetric Fog · Unity VFX · Preview 5Unity3D_Fast Volumetric Area Fog_V1.0.12_Volumetric Fog · Unity VFX · Preview 6
Contact support