Search Unity

working with Linear EXR textures

Discussion in 'General Graphics' started by bcoyle, Mar 7, 2016.

  1. bcoyle

    bcoyle

    Joined:
    May 22, 2013
    Posts:
    57
    Does anyone work with linear exr textures? I'm trying to find the right settings in my Unity scene to work with these.

    - first thing was changing the imported textures to advanced texture type, and ticking 'in linear space'
    - camera has HDR ticked.
    - the imported exposure of the textures is dark, so I adjust brightness with a camera screen effect?
    - what about reflection probes? I'm not able to have the adjustments made to look of the tone mapping, effect the reflections.

    I think another problem is that I can't see the corrections I'm making unless I'm in game view, in a camera. Which makes it hard to develop a scene when you have to go back and forth between scene/game tabs.

    Thanks for any tips.
     
  2. bcoyle

    bcoyle

    Joined:
    May 22, 2013
    Posts:
    57
    I think I got it... When importing the .exr textures that are in linear colorspace --

    - Bypass sRGB Sampling, tick On
    - Encode as RGBM, tick Off
    - Generate Mip Maps, In Linear Space, tick On

    Anyone else have suggestions for importing linear color space textures?
     
  3. bcoyle

    bcoyle

    Joined:
    May 22, 2013
    Posts:
    57
    so now that the textures look accurate to how they do when loaded in photoshop - I can't access the linear data within the .exr texture. I try to apply camera tonemapping to control exposure and the texture clips

    default view when first loaded in unity, http://i.imgur.com/ohkvbIW.jpg
    and then once tonemapping is applied, http://i.imgur.com/jBZczqE.jpg

    On the left in each image is the texture in photoshop - I then show in the second image what happens when exposure is used in photoshop - more data in the texture is revealed in the exposed part. But this doesn't happen in Unity3d.

    Is there another way to get linear, HDR, textures to react the way I want them to?
     
  4. bcoyle

    bcoyle

    Joined:
    May 22, 2013
    Posts:
    57
    had anything improved for this type of workflow?
     
  5. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    It' not the answer to your question but when using lightmaps you are better off using Unity's lightmap features.
    I never worked with exr images but it looks like they are either clamped during import or while rendering. Which Material/Shader are you using?
     
    Last edited: Feb 17, 2017
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Pre version 5.5 Unity had no built in support for imported HDR textures with out conversion to RGBM, they would simply be stored in an 8 bit per channel image format clamping the range from 0.0 to 1.0. Unity 5.5 added support for BC6H as well as the uncompressed 16 bit per channel RGBAHalf format. I suspect if you tried your previous test again using 5.5 or 5.6 it would "just work", at least for your lightmap case and still using the same import options listed above.