- Home /
Tint realtime global illumination based on distance
Hello!
I'm trying to mimic the way light travels through water, where longer wavelength colors get absorbed quicker the farther the light travels. It's easy enough to apply fog solutions to achieve this effect for objects at a distance, but I'm hoping to achieve this effect on Unity's realtime bounced lighting.
Here's a picture that's pretty close to what I'm hoping to achieve: If you look at the light along the inside of the cave, you can see that it gradually becomes a darker blue deeper into the cave.
From the 'Computing the light transport' section of ARM's Unity developer guide (page 68), enlighten is structured to tint each pixel based on the visibility of nearby clusters. Based off of their diagrams, the visibility factor seems to be proportional to the distance of the pixel from the cluster. My thinking is that I could use this visibility value to apply a tint/gradient to the cluster's albedo.
However, I'm worried that this step isn't something that is exposed to change. The closest I've come so far is uniformly tinting the GI of an object using a meta pass, just like the one shown at Unite 2014 on slide 43.
Does anyone know if distance to clusters and/or the visibility factor is accessible in any way? I'm open to any other suggestions or approaches, as well. Any help is appreciated! :)
Your answer
Follow this Question
Related Questions
Where I can find Global Fog Standart effect in Unity 5.6? 0 Answers
Why am I getting GI Banding? 0 Answers
Layer based Ambient Lighting 1 Answer
Updating Global Illumination at Runtime 2 Answers