Home Technical Talk

Linear space tools for photoshop?

ngon master
Offline / Send Message
almighty_gir ngon master
Hey guys, i was wondering if anybody knows of any plugins or tools for photoshop that allow you to choose your colours in linear space instead of sRGB?

The only custom colour picker i've found so far is this: http://anastasiy.com/colorwheel and while it is definitely an amazing tool (way better than photoshops built in colour tool), it doesn't appear to do linear colour picks.

Anybody got any ideas?

Replies

  • Drew++
    Options
    Offline / Send Message
    Drew++ polycounter lvl 14
    I don't know any cool color pickers, but hmm, all I can say is applying a levels adjustment layer and pick? It updates what the color picker(the tool) sees from an image. Not the actual color picker popup/window.
    To Linear
    ss%20%282014-02-13%20at%2007.50.08%29.png

    To sRGB
    6Vgik.png
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Thanks Drew,

    That helps somewhat, but i guess the reason i was asking is because i see so many references to PBR workflows saying you should always work in linear space, which means everything is 0-1 and not gamma corrected, right? So i was hoping there was a tool out there that would let me pick colours based on a 0-1 range rather than 0-255.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    I don't think you need to worry about working in linear space while creating textures.

    I think the only change in a linear lighting workflow is how rendering engines calculate lighting. In the past (and mostly in the present) game engines would calculate lighting based on gamma corrected images. Now they are lighting before the gamma correction on the texture and then gamma correcting the render. Renders like MentalRay and VRay have always worked this way. Now realtime engines are catching up.

    [edit]That's not to say your diffuse/spec/whatever maps will look the same for a PBR lighting engine.[/edit]
  • Farfarer
    Options
    Offline / Send Message
    Yeah, the linear space is regarding colours when dealing with lighting inside of the shader.

    So the numeric values you see are in linear space in Photoshop or whatever graphics app you're using... the way the screen displays them to you isn't quite the same but that's not too important because it's still correct as far as the final result is concerned.

    The tricky part of gamma/linear space is mostly related to the graphics pipeline, depending on how it samples the diffuse albedo textures and lighting colours (shunt them from gamma to linear space) to give to the shader and the processing done at the end of the shader (shunt everything back into gamma space for display).

    This is a great post by John Hable about what it means - and another clarification post.
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    I've been wondering the same thing as almighty_gir...discussions with graphics programmers have led me to believe that when authoring linear textures (roughness/metallic/etc) I should be saving it with either no color profile or a color profile adjusted for Linear Space... I'm very interested in getting to the bottom of this.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    Yes, same here - the waters are a little muddy and our gfx programmer is a little too busy at the moment to answer my noob questions in this regard.. ;-)
  • pior
    Options
    Online / Send Message
    pior grand marshal polycounter
    If anything, I wouldn't mind the idea of an adjusted Photoshop color picker based on proper linear values ... just to be able to pick more "attractive" colors when it comes to painting.

    What I mean by that is, making it so that picking a grey in the middle of the brightness axis (= 50% brightness) would produce #bbbbbb instead of #808080. And overall, pushing the darker values of the spectrum into a more realistic, tighter corner of the picker.

    Now of course this has nothing to do with the math involved in a linear rendering pipeline, and more with the idea of being able to easily pick and differentiate subtle color shifts in the brighter parts of the value spectrum. But I think this would be very beneficial from a purely artistic and subjective point of view.

    (I hope this makes sense !)
  • Harbinger
    Options
    Offline / Send Message
    Harbinger polycounter lvl 8
    You shouldn't need to worry about authoring in linear space, the shader/GFX pipeline should convert your gamma-authored source textures to linear space for you. I think the confusion might be learning to "think like an artist" vs. "think like a tech artist".

    If you're painting as an artist, ignore the hex/RGB value of the color and just pick what looks right to your artist's eye. The whole point of gamma space correction is to fix the way display technology works, so it's more WYSIWYG.

    I suspect as things like PBR become the norm, artists will learn to think more like tech artists. In that case, the color you're painting for metalness or gloss will become more about the numeric value, rather than what "looks right." We had to accomplish the same thing when normal mapping became standard practice, and learn to interpret what those colors meant, even though we typically don't paint normal maps with your brain in "artist mode." Unless you're Pior :)
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    Harbinger wrote: »
    You shouldn't need to worry about authoring in linear space, the shader/GFX pipeline should convert your gamma-authored source textures to linear space for you.

    My understanding is that this is indeed the case for our color maps. They are saved in SRGB, and converted to linear space during the GFX pipeline, and that is ok because it's a fairly slight shift and it shouldn't matter much.

    But it does matter more when that shift is not with color/perceptual data, but with values that correspond to something specific. When you are talking about normal maps for instance, you need to make sure those values aren't shifting at all - you need to make sure they are linear and stay linear. The same is true when you are trying to achieve very specific measured reflectance levels, for example. You don't want things getting shifted and converted between spaces - you want them to be authored in linear space and to stay in linear space, ideally.

    Saving a normal map out of photoshop with an SRGB color profile could potentially mess up your linear values in a linear renderer, IF your engine respects that color profile. And some do, because sometimes you want color profiles to matter (for your color maps).

    So now you get into situations where you either need to be marking your content with flags and having the engine do bunches of special stuff, or you need to author your content in linear space (or with NO color profile), or something along those lines.


    (maybe I'm wrong, hope I'm wrong, but I don't think I'm wrong. plz prove me wrong.)
  • Harbinger
    Options
    Offline / Send Message
    Harbinger polycounter lvl 8
    I hear ya, and we're on the same page, I just think that in practice it won't matter much whether you create your texture in gamma or linear space, as long as you know what your pipeline or shader system is expecting. So I think it's more of a game engine side issue that your programming team should take care of, so artists don't have to worry about switching from gamma to linear and visa versa. For example, when you import a texture into UDK and change it's compression to TC_NormalMap, UDK automatically unchecks the sRGB box. It knows it's in linear space.

    What I mean by paying attention to the numeric values for things like gloss/roughness is that I think as artists we'll just get used to thinking in terms of, "Hey, rubber has a gloss value of XXX" and that value will probably be memorized in gamma space. So it's less about eyeballing the color swatch and more about typing in the value.

    I'm still pretty noob with PBR as well, and I could be under some false assumptions, however I think that artists should ultimately not have to worry about working in linear space (as far as color pickers or switching color profiles) as long as they understand the difference between linear and gamma, and know what numeric values to use at the end of the day. Let the tools handle all of the rest.
Sign In or Register to comment.