Colors Dont Match GLB export from C4D

as I have been working with our 3d artist trying to get the Assets to export from c4d to glb and then import them into BJS, we have noticed that we can not make the color values match ever.

The other channels like metallic and roughness work just fine and those values always come back correct.

But for example we export out the Color at 80,80,80 and it comes in BJS at 159,159,159. To get it to come into BJS at 80,80,80 we had to drop it all the way to 20,20,20 in C4D Color Channel. The same kinda thing happens for the emissive color but it seems to be a lot closer at least.

Any clue on what is happening here? I dont see why the values are being modified on import.

This is why, among other things, that I do not binary files. If it was a text file, you could read what was in it using a text editor. Depending on what it said in the export file, you would know which side to go to.

The only thing I can recommend is a very simple test loaded into BJS & also in another program, maybe Blender, or 3JS viewer. If they all look visually the same, then it is the exporter issue. If BJS is different from the rest, then your issue “lives” here.

1 Like

started going down this road.

Probably a convertion to linear space which is required for the setup of PBR values for instance.


Everything in the 3d File is setup to Linear, so Im not sure what I can do to prevent the conversion?

You should not set the albedo/emissive textures (basically all textures that are really color textures) to linear when exporting: by default Babylon expects them to be in sRGB space.

Also where do you see this value ? cause the inspector now displays the color in gamma space so it would convert the actual value visually.

on the albedoColor

but visually in the inspector or in the console or the gltf file ?

in the inspector, it seems when I import it to blender the values come in correct.

So the inspector converts for you if the fields are linear which is the case here. You should check by code and I bet the values would be the good ones.

GLB has strict rules on color spaces for textures. It might be a C4D export problem if the exporter doesn’t handle converting it to the proper color space when writing out the texture.

1 Like

Ok I’ll try to figure that out.

1 Like