Published in

How we made the Audi AI:ME’s flying VR experience — Part 3

VR performance challenges and creating realistic fog in Unity

Comparison between in-engine rendering and real life reference

Aims of the Project

an aerial timelapse of the rolling fog by Azad Balabanian


Draw Calls

Fragment Overdraw

Effect of fragment overdraw on execution times


Small Improvements

Rendering Realistic Fog in VR

Unity screencap of the final version of the fog implementation

Learning From References

fog blurring the objects behind
dynamic high frequency height fog
Halo around light sources in fog. Photograph by Harald Hoyer

Understanding the Physical Properties of Fog

TL;DR (too long; didn’t read)

Possible Solutions

cloud rendering in Sea of Thieves
Fog rendering in Assassin’s Creed IV: Black Flag
Mie scattering in The Witcher 3


finalColor = originalColor * decay(dist, dConst) + inScatteredLight; 
float decay(float distance, float decayConstant)
return exp(-distance*decayConstant);
graph of e to the power of -distance
inScatteredLight = fogColor*(1.- decay(dist, dConst));
finalColor = originalColor * decay(dist, dConst) + inScatteredLight;

Height Fog

Water rendering in Portal 2
Dynamic objects effecting water in Far Cry. Similar approaches could be done for fog
Left: screen shot in engine, second image a drone shot on site

Download the free Realities app on Steam

Follow the Team

Resources and Further Readings



The stories and technology behind our award-winning VR experiences

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store