radiosity_bug_fix.py

Did you know that there is a very slight bug in the radiosity code for all versions after 1.80? Vertex colors are multiplied by the current RGB values of the material assigned to a mesh. In v1.8, blender created a new material with default RGB values and set the VCol Light flag. After 1.8, the same material colors are kept, and this results in very incorrect illumination. So here’s a simple fix:

import Blender

for material in Blender.Material.Get():	
	material.setRGBCol([0.8,0.8,0.8])

reads post again

wait, won’t that go through EVERY material, not just the ones used in radiosity?

Ok, so if I have this right, the material color messes with the radiosity solution in ways it shouldn’t, and your script should be run after running the radio calc?

Is this why radio colors look washed out?

Yep, run it after the radiosity calc. And it will change all materials so be careful.

The “bug” could make colors appear washed out, depending on what the original color was. Try on my cornell box example. The point is that meshes with radiosity should have a grey/white/neutral color, not a deep red, for example.

there is something very similar for the calc at render time (try it, try only radiosity and an image texture, then try it static), but I think this one (render time) is more severe