I’ve read many global illumination techniques and they all seems complicated even thought they are pretty simple. It’s all about bouncing. And doesn’t unity support bouncing physics? Yeah it does.
So, create ultralow poly version of your map (based on few cubes or planes) and you assign a cube collider with bouncy material.
Then , create a light source. A script should instantiate a bunch of balls (spheres) which will be pushed to the light direction. When the ball collides with something , it carries it’s color (using rays and texture position) and shines with it with the next bounces. As there are more bounces , the importance of the sphere / the intensity gets lower.
Of course , there is 15 fps drop .
When I finish this technique i will release it. I downloaded some small room scene and tested:
Does each bounce reduce the brightness of the ball? Does the ball know the brightness of the material it bounces on? A black wall would absorb most of the light and could eliminate the simulation of that ball as its brightness would all be taken up by the material.
Even 5 bounces would work I think, it would add a decent effect.
How exactly do you “paint” the final color onto the texture? I get the picking up texture color/bouncing part, but how do you apply the final result, exactly?
Are the balls really necessary? Wouldn’t it be much faster to just do a Physics.Raycast from the light source, then for each ray (and for each number of bounces) shoot another ray from the hit point, towards the reflected direction (Found using Vector3.Reflect)?
Each ray would carry its intensity and color, and as it bounces, it would leave some intensity and carry off some color.