Colors not importing correctly from Cinema 4D


(Daniel O'Neil) #1

When I upload models I’ve created in Cinema 4D (exported to FBX), I notice that my colors never transfer accurately. They’re usually several shades lighter; for example, in Cinema 4D, I have a simple orange material (color channel only) set to RGB 223,147,48 (#DF9330) that always comes into Sketchfab as #F0C778 (RGB 240,199,120).

In my Sketchfab workflow, I then have to manually dial in the correct Base Color/Albedo value for each material, which is tedious. Also, any material transparency values I assigned in C4D are lost and have to be reset in Sketchfab.

Is there anyone I can ensure my base color and transparency values transfer accurately from the FBX to Sketchfab?

(Unofficial) Household Props Challenge

Maybe it’s a color space issue. Are you using linear or sRGB?

(Richardkarlgregg) #3

I’d agree with @james, I had a similar issue exporting from 3dsmax.

The issue I had was 3dsmax was set up to use srgb, hopefully you can set cinema 4d to use a linear workflow.

Link to my issue, might give some clues -
Sketchfab - PBR / RGB Normalized Issues

(Daniel O'Neil) #4

Thanks for the input. The project settings I’ve been using (which are the Cinema 4D defaults) are Linear Workflow enabled with Input Color Profile of sRGB. Which settings should I be using to ensure proper mapping?

(Richardkarlgregg) #5

What other options does Cinema 4d give for colour input other than SRGB?

(Daniel O'Neil) #6

The input color profile options are sRGB, Linear, and Disabled. Here’s an article about it:

(Richardkarlgregg) #7

What happens if you change change the color profile to ‘Linear’, then export via FBX?

Just see if you have the same issues with the colours (if you’ve not already tried :slight_smile: )

(Daniel O'Neil) #8

With linear workflow enabled and input color profile set to linear, when I export via FBX or the C4D Sketchfab Exporter (which converts the file to FBX), the color I see on screen in Sketchfab matches (or seems close) to what I see in C4D, but the hex value still changes from #DF9330 in C4D to #F0C778 in Sketchfab.

When I open the FBX file in C4D, I notice that the color settings are once again linear workflow enabled and input color profile set to sRGB.

I am hunting around Sketchfab trying to find a Pro user who models in C4D and might be able to give an answer.

(Daniel O'Neil) #9

No Cinema 4D artists can advise on their color set-up? :sob:

(Dark Minaz) #10

i did some tries that might help the sketchfab team

Exporting 0020ff (0,32,255) to obj gets you

newmtl Mat
Ka 1 1 1
Kd 0 0.12549020349979 1
Ks 1 1 1
Ns 50
illum 7

That translated into maya gets 0,32,255 so correct
Unity gets 0020ff after the import
into sketchfab it’s #0063fe so wrong and translates to 0,99,254
0 , 0.388 0.996 really not sure where it gets this numbers.
downloading the model gets you the right mtl again.

even changing it to V changes nothing in sketchfab :confused:

newmtl Mat
Ka 1 1 1
Kd 0 0.125 1
Ks 1 1 1
Ns 50
illum 7

As a workaround you could use color textures 128px, i did that for a project once just to make sure i keep having the same color at all times but seems like something that sketchfab needs to fix on their side

edit: i used obj instead of fbx since it’s very simple to view the material file with it :slight_smile: pretty sure fbx behaves the same way with the materials though


Sorry I got a bit lost in the thread - do we think there is a bug on Sketchfab’s side?

(Dark Minaz) #12

yep :wink: sketchfab somehow doesn’t really import the material colors correctly from obj/fbx and just takes something similar-ish


Not sure if it would be a processing or frontend issue. Could you post links to your tests?

Maybe @waleguene @stephomi can take a look later this week.

(Dark Minaz) #14

just uploaded it again :slight_smile: if you download it and put it in maya/cinema4d/unity it turns into 0020ff, while on sketchfab it’s 0063ff

(Daniel O'Neil) #15

@james: What’s the status on this issue? Has it been reviewed and officially classified as a bug to be addressed at some point?


Sorry, our 3D team has not looked yet. France essentially has the whole of May off with all the holidays :wink:

(Daniel O'Neil) #17

Thanks for the update. They really know how to live over there–vive la France!

(Stephomi) #18

@dark_minaz @james
There’s no bug so far.

In sketchfab, material colors are used in linear space, however the widget UI in the editor is in srgb.

We expect linear data in mtl files (so we’ll convert it to srgb for the UI display, thus the difference).
For example, marmoset and blender are doing the same thing as us: you’ll see different value if you compare hex color widget string with the mtl data.

Several factors should be taken into account

  • colorspace of the widget: srgb in sketchfab, for most softwares srgb too… but you can sometimes change it
  • colorspace of the channel: for albedo, textures is expected to be in srgb, for color however we expect it to be in linear but maybe some softwares are doing it differently
  • colorspace in the file format (sometimes it’s enforced, for gltf for example)

As you can see in my screenshot, most of the time it’s consistent, viewport/colorwidget and hex are the same.

I don’t have access to C4D right now (and @waleguene is on holiday, no luck) but a simple way to test is to switch the rendering to unlit/shadeless in both sketchfab and C4D and compare the viewport result with #DF9330.

Normally the colors should match, if you can’t make the colors to match (even by changing the linear workflow in C4D), then maybe there’s an issue somewhere.

(Dark Minaz) #19

Well that is exactly the issue exporting from c4d changes the 0020ff to 0063ff
as by the example i posted below. it should be 0020ff but isn’t.

In this i tried it from maya, exported a 00ff00 (full green) and it changed to 00fe00
(the mtl file reads as follows)
newmtl lambert2SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

so maya and cinema both seem to not result in the wrong color.

(Stephomi) #20

as by the example i posted below. it should be 0020ff but isn’t.

I already explained why this reasoning is false, no, it “should” not be necessary 0020ff, there’s many factors to be taken into account (explained in the post above).

In this i tried it from maya, exported a 00ff00 (full green) and it changed to 00fe00

There’s a known precision display issue with max value (FF turning into FE), it can probably be solved (it doesn’t impact the real value used by the model).