Color Shift between Photoshop/Maya/Unity

Color Shift between Photoshop/Maya/Unity

Anonymous
Not applicable
4,825 Views
13 Replies
Message 1 of 14

Color Shift between Photoshop/Maya/Unity

Anonymous
Not applicable

We’re using vertex colors for our game, and what I’m seeing in Maya’s viewport doesn’t match the actual vertex color RGB data or what I see in Unity. I have the viewport set to sRGB gamma and I'm viewing the scene without any lights, but I still see a slight shift that I can confirm by sampling screenshots. Any ideas?

 

libraryForestWood copy.png

 

Untitled-5.gif

0 Likes
Accepted solutions (1)
4,826 Views
13 Replies
Replies (13)
Message 2 of 14

slimboJoe
Collaborator
Collaborator

What version of Maya and How are you rendering out the asset; within Maya and saving the frame or this it a batch/commandline render?

0 Likes
Message 3 of 14

Anonymous
Not applicable

I'm using Maya 2016 SP6.

 

I'm capturing the images in my first post using OSX's built-in screencap function (shift+cmd+4). I verified that there's no color shift in my captures by comparing values sampled from the original image as well as a screencap of the image and a screencap from Unity's viewport. They only discrepancy is in Maya's viewport.

0 Likes
Message 4 of 14

slimboJoe
Collaborator
Collaborator

Color management controls all turned off?  Pretty obvious, but gotta ask.  I still keep getting tripped up by the color management thing on occasion.

0 Likes
Message 5 of 14

Anonymous
Not applicable

Hmm, maybe not so obvious, I'm afraid. I always work with color correction on actually.

 

All our art uses unlit vertex colors rather than texture maps. An example:

 

Untitled-8.png

 

Since our assets are unlit, I work with the "use all lights" option toggled with no lights in the scene. If I have color correction on, and set to sRGB gamma, my results are close to what I'd expect. With color correction off they're much too dark.

 

 

Untitled-10.png

 

 

The same asset in Maya and Unity's viewports:

 

Untitled-9.png

 

Unity is displaying the proper values. Maya's viewport is slightly too light.

 

 

 

 

 

 

0 Likes
Message 6 of 14

slimboJoe
Collaborator
Collaborator

Interesting.  I would say the culprit lies in the color management somehow, but not exactly sure what.  Someone with more experience in this area may "shed some light" on the subject...

0 Likes
Message 7 of 14

slimboJoe
Collaborator
Collaborator

Check out the difference in using 2.2 gamma and 1.8 gamma instead of using sRGB.

0 Likes
Message 8 of 14

slimboJoe
Collaborator
Collaborator

Ah, I just realized your on a Mac.  Mac's use a 1.8 gamma if I'm not mistaken...

0 Likes
Message 9 of 14

slimboJoe
Collaborator
Collaborator

Any update on this?  I am curious to see if this was the issue or not.  I want to avoid this problem myself in the future...

0 Likes
Message 10 of 14

Anonymous
Not applicable

Whoops, sorry, missed those responses for some reason.

 

Unfortunately, no, all three of those settings are either too dark or too light. 

 

¯\_(ツ)_/¯

 

maya-color-shift.gif

0 Likes
Message 11 of 14

slimboJoe
Collaborator
Collaborator

Bummer.  Please post if you find a solution.  Thanks!

0 Likes
Message 12 of 14

Anonymous
Not applicable
Accepted solution

good news, figured it out! 1.8 gamma was too dark and 2.2 gamma was too light, so... 2.0 gamma is what we need.

 

In your maya install folder (on windows it's C:\Program Files\Autodesk\MayaXXXX) open the synColor/transforms/gamma folder. Duplicate apply_2.2_gamma.ctf and rename it to apply_2.0_gamma.ctf. Open it up in a text editor. Find <GammaParams gamma="2.200000000000000" /> and change to <GammaParams gamma="2.000000000000000" />. Save your file.

 

In Maya:

 

1. Open the Preferences window (Windows > Settings/Preferences > Preferences)
2. In the left column, select Color Management (Settings > Color Management)
3. Under Color Transform Preferences, click the View Transform dropdown arrow
4. Scroll down to the bottom of the list and select + Add New
5. Click the folder icon to the right of the Transform File field
6. Browse to and select "apply_2.0_gamma.ctf"
7. In the Transform Name field, type "2.0 gamma"
8. In the Source Color Space dropdown, select "Raw"
9. Click Save
10. Verify that View Transform is now set to "2.0 gamma", click Save

 

For vertex colors with no lights in the scene, this gives me exact RGB values in the viewport. No idea what happens with lights or textures as that's not a concern with our pipeline.

0 Likes
Message 13 of 14

Anonymous
Not applicable

That works for me, except for Step 8. Choosing Raw gives me an "Add Failed"-error popup saying "colorManagementCatalog: Connection space is invalid". However, choosing the color space which my Maya was set to, "scene-linear Rec 709/sRGB", worked for me. I also double checked that this gives me the exact same color values in Maya as in Unity. So if you happen to get the same error message as me, you can try this.

0 Likes
Message 14 of 14

Anonymous
Not applicable

I’ll have to try that! Ever since switching to maya LT the approach I used before hasn’t worked for me either. 🙄