------------------------------------------------------------------------------- -- Corona_Fix_Albedo.ms -- By Yane Markulev -- v 0.9 -- Created On: 04/04/2018 -- tested using Max 2016, Corona 1.72 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Description: -- Checks scene materials for diffuse color brighter than 230 and does and iteration of lowering it by 5. Pops out message to show which materials are fixed. Should be run several times until no message appears. This means no more materials with bright albedo have been detected. Works fast and stable but is quite rude on interface - sorry. Use on your own risk. Does not affect textures with bright albedo that have been used as diffuse. ------------------------------------------------------------------------------- for i in sceneMaterials do (if hasproperty i "colorDiffuse" do ( if (i.colorDiffuse.Red + i.colorDiffuse.blue + i.colorDiffuse.green)/3 >230 do ( print i i.colorDiffuse.Red = i.colorDiffuse.Red - 5 i.colorDiffuse.Blue = i.colorDiffuse.Red - 5 i.colorDiffuse.Green = i.colorDiffuse.Red - 5 messageBox ("Materials fixed " + i as string) ) ) )