Hi, I realize I'm very late to this conversation but I stumbled upon the same issue and have found a workaround.
The issue is to do with gamma correction. Either it's being applied twice when it should only be applied once, or it's not being applied at all (I'm not sure exactly which way around causes 'washed-out' colours vs overly dark colours).
Regardless, in this instance, the RGB values can be corrected manually by taking each component in the 0-255 range, dividing by 255, taking the result to the power (^2.2) and multiplying by 255.
I wrote a GDScript script to correct all the materials in a given folder using this method:
tool
extends Node
#https://medium.com/@Jacob_Bell/programmers-guide-to-gamma-correction-4c1d3a1724fb
#this script fixes gamma issues when importing Godot scenes
export var path : String
export var reverse : bool = false
export var fix : bool = false setget run_fix
func run_fix(v):
var dir = Directory.new()
if dir.open(path) == OK:
dir.list_dir_begin()
var file_name = dir.get_next()
while file_name != "":
if !dir.current_is_dir() and file_name.ends_with(".material"):
var fullPath : String = "res://" + path + "/" + file_name
var mat : SpatialMaterial = load(fullPath)
var color : Color = mat.albedo_color
color = gamma_correction(color, reverse)
mat.albedo_color = color
ResourceSaver.save(fullPath, mat)
file_name = dir.get_next()
else:
print("An error occurred when trying to access the path.")
func gamma_correction(color : Color, reverse : bool) -> Color:
var p : float = 1/(2.2) if reverse else 2.2
color.r = pow(color.r,p)
color.g = pow(color.g,p)
color.b = pow(color.b,p)
return color
Simply add a Node to your scene, attach this script, then set the path to the directory of material files you wish to fix and toggle the "Fix" button. Checking "Reverse" will reverse the process which should fix issues if the colours are too dark instead.