• Godot HelpShaders
  • Is this a bug? Color Hex code results in different RGB values than in Blender

Summary:

colors of exported model seemed washed out in Godot. In blender, the material color E7A287 gets imported as e7a187 when exporting .gltf...... okay it's off slightly. But when I change the godot color to e7a287 It still looks different. I looked at the rgb values and see that G and B values are off from what blender shows. When I change it to what is shown in blender's RGB view the colors more visually match, but of course the hex code is now completely different.

What's going on?

Here are steps if you want to repro

  1. I am trying to make a formal tutorial for the "thousand fish" page in the docs: https://docs.godotengine.org/en/3.1/tutorials/3d/vertex_animation/animating_thousands_of_fish.html
  2. So I got the "Fish1" model mentioned from here: https://drive.google.com/drive/folders/1SvlOveJJjmhSn-FgCRyojc1T5QHjjGkF
  3. I opened the fish1.blend in blender, and export as gltf (exporting materials, etc)
  4. open that export in godot
  5. set your environment to white (and ambient light set properly so you don't get weird lighting).
  6. I inspected the "Top" material. (Surface 2). check the color hex values, and then look at the RGB sliders in both blender and godot's materials

Maybe this is due to Blender using sRGB colors and not Godot (or the other way around)?

For textures, you can toggle sRGB in the Import dock after selecting them in the FileSystem dock.

shrug I don't know enough about blender :( Over the last week, I just taught myself barely enough blender to bake a uv and export to obj. I have a feeling it's probably something about the export process and/or baking a UV impacting the color of the material being exported.

Thank you for the attempt to help, I'm ok with colors being different, as I am settling on workflow using a uv texture for each mesh, not multiple materials.

3 years later