zoukankan      html  css  js  c++  java
  • Gamma Correction of OIIO

    apiitem{"oiio:ColorSpace" : string}
      The name of the color space of the color channels. Values incude:
      qkw{Linear}, qkw{sRGB}, qkw{GammaCorrected}, qkw{AdobeRGB},
      qkw{Rec709}, and qkw{KodakLog}.
      apiend
       
      apiitem{"oiio:Gamma" : float}
      If the color space is qkw{GammaCorrected}, this value is the gamma
      exponent.
      apiend
    The {cf ImageSpec::extra_attribs} field may store metadata that reveals
      the color space the image file in the qkw{oiio:ColorSpace}
      attribute, which may take on any of the following values:
       
      egin{description}
      item[halfspc m qkw{Linear}] indicates that the
      color pixel values are known to be linear.
      item[halfspc m qkw{GammaCorrected}] indicates
      that the color pixel values (but not alpha or $z$) have
      already been gamma corrected (raised to the power $1/gamma$), and
      that the gamma exponent may be found in the qkw{oiio:Gamma} metadata.
      item[halfspc m qkw{sRGB}] indicates that the
      color pixel values are in sRGB color space.
      item[halfspc m qkw{AdobeRGB}] indicates that the
      color pixel values are in Adobe RGB color space.
      item[halfspc m qkw{Rec709}] indicates that the
      color pixel values are in Rec709 color space.
      item[halfspc m qkw{KodakLog}] indicates that the
      color pixel values are in Kodak logarithmic color space.
      end{description}
       
      The ImageInput sets the qkw{oiio:ColorSpace} metadata in a
      purely advisory capacity --- the {cf read} will not convert pixel
      values among color spaces. Many image file formats only support
      nonlinear color spaces (for example, JPEG/JFIF dictates use of sRGB).
      So your application should intelligently deal with gamma-corrected and
      sRGB input, at the very least.
       
      The color space hints only describe color channels. You should assume that
      alpha or depth ($z$) channels (designated by the {cf alpha_channel} and
      {cf z_channel} fields, respectively) always represent linear values and
      should never be transformed by your application.

    spec.attribute("oiio::ColorSpace", "Linear");

    spec.attribute("oiio::ColorSpace", "GammaCorrected");
    spec.attribute("oiio::Gamma", (float)gamma);

    spec.attribute("oiio::ColorSpace", "sRGB");
    spec.attribute("oiio::ColorSpace", "Rec709");

    ----------------------------------------------------------------------------------------------------------

    Applies an inverse gamma correction to texture lookups. For example, a value of 2.2 will linearize a texture that comes in with a gamma of 2.2. This is done for 8 and 16 bit images.

    Arnold scans the contents of a texture (it does not rely on the extension) and anything that is not float is considered to have a gamma baked even if the image has a different color space embedded.

    Tx texture format

    You can convert your textures to linear space with the make tx tool. This way you can ensure that all of your textures are linear before rendering. For example:

    maketx --colorconvert sRGB linear C:solidanglemtoadeploy2014inimage.jpg
  • 相关阅读:
    background和background-size
    获取表单的初始值,模拟placeholder属性
    input[type=checkbox]
    background-size
    input的type属性的修改
    选项卡切换
    2016.12.13
    3. 如何封装查询条件与查询结果到map中
    Java 实现网站当前在线用户统计
    sell-- wordPOI
  • 原文地址:https://www.cnblogs.com/len3d/p/4324746.html
Copyright © 2011-2022 走看看