Jump to content
3DCoat Forums

Unity and linear color space?


Recommended Posts

  • Contributor

Not much info on this one in Unity Answers, so I thought that I would ask you, guys.

Has anybody managed to enforce linear space on mobile devices (Android, for example) either with scripts or some 3rd party stuff? It's weird that Unity doesn't support it by default, because without it PBR shading doesn't make much sense.

Edited by ajz3d
  • Like 1
Link to comment
Share on other sites

  • Contributor

yes with an asset i always get linear for Android

 

Its called Go linear but unfortunately (just checked for you ) it went depricated

 

https://www.assetstore.unity3d.com/en/#!/content/13167

Edited by Michaelgdrs
  • Like 1
Link to comment
Share on other sites

  • Advanced Member

Yes, this is something quite frustrating. Assets look pretty terrible in gamma color space and Unity aren't clear on when/ whether this will ever be implemented. I asked the same question and was recommended to use sigmoid color correction curves to achieve a similar effect to linear.

  • Like 2
Link to comment
Share on other sites

  • Contributor

@Michael. Yes, the GO Linear isn't even available for download anymore. :(

@Arumiat, thanks for the info. So you apply sigmoid (which are the default curve shape) curves to RGB channels of Color Correction Curves camera effect? Also, when using this method, do you linearize your albedo first or just feed in the sRGB version?

Edited by ajz3d
  • Like 1
Link to comment
Share on other sites

  • Contributor

Its a camera effect , it will change the color in camera space to match linear.

 

Doing the same with another asset unfortunately it also became deprecated.

 

 

Bulding for PC only the last year so i didnt have to look more into it.

 

But any camera space color correction will work.

Link to comment
Share on other sites

  • Advanced Member

@Michael. Yes, the GO Linear isn't even available for download anymore. :(

@Arumiat, thanks for the info. So you apply sigmoid (which are the default curve shape) curves to RGB channels of Color Correction Curves camera effect? Also, when using this method, do you linearize your albedo first or just feed in the sRGB version?

 

I've only ever applied the color correction curves straight to the sRGB version and assets certainly looked better. I did this without understanding the mechanics behind why they might look better. I haven't tried linearising the textures (although I've heard of this), - if you know of a good resource that describes how to do this would be great to hear.

 

Here was my Unity thread.

 

I'm building for webGL and you're building for Android, so performance of these effects is of course pretty important to us both. I'm not sure if using a LUT is faster than curves, will have to do some investigations on that at some stage.

Link to comment
Share on other sites

  • Contributor

I'm linearizing my albedo maps in Houdini. From what I noticed, linearization doesn't produce identical results to the true linear workflow available on every platform other than Android, iOS and WebGL (I compared the results with PC's linear setting), but it's pretty close.

 

Color correction image effect had way to much impact (for a shader) on a frame rate. I noticed a drop from 58 to 33 frames per second (average on SM-N9005) just because of that effect. That's totally unacceptable.

Link to comment
Share on other sites

  • 5 months later...
  • Advanced Member

Again confirms using PBR with gamma is not a good idea.

If I was to go back to painting in 3DC with the old workflow (pre PBR), anyone know the viewport/ shader settings that would be appropriate?

Also azj3d, it would be cool if you get a screencast of how you linearise your albedo maps, if that produces a good effect

Thanks,

T

 

Link to comment
Share on other sites

  • 4 weeks later...
  • Contributor
On 17 październik 2016 at 1:13 PM, arumiat said:

Also azj3d, it would be cool if you get a screencast of how you linearise your albedo maps, if that produces a good effect

I have something better to share. Unity beta version (5.5.0b10):

Graphics: Add linear rendering on Android with OpenGL ES 3.x and iOS with Metal.

Source: https://unity3d.com/unity/beta

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...