Search Unity

How to use .hdr file

Discussion in 'Shaders' started by kapilkundan, Feb 21, 2011.

  1. kapilkundan

    kapilkundan

    Joined:
    Dec 21, 2010
    Posts:
    52
    what is .hdr file and how can we use .hdr file in unity
     
  2. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    http://en.wikipedia.org/wiki/Hdri Pretty much covers it.

    As for how to use them in Unity, now there's a thing. They are used for the lightmaps AFAIK, but another format I think (never looked, they just worked). But now you got me wondering if regular textures can be HDR in U3 (waits for Eric or dremora to confirm either way, rather than simply testing it himself).
     
  3. gradus

    gradus

    Joined:
    Sep 26, 2010
    Posts:
    7
    An HDR contains environmental light information in a floating point format and hence can be stopped up and down to provide detail in highlights and shadow, something impossible using an 8 bit environment map. Since they are normally created using an assembly of fisheye images of the actual environment that you are trying to replicate (or a simlar one) they do a much better job than a collection of directional or spot lights at making a real looking scene.

    In non-realtime applications they form the basis of Global Illumination based approaches to lighting, a good approximation of the physical processes that underlie real lighting. In real-time apps I use HDR's in a compressed form (using a spherical harmonic method). This removes detail (its a compressed HDR) and so is not of much use for reflections, but for the diffuse component of lighting, where detail is less important, it works out very well.
     
  4. kapilkundan

    kapilkundan

    Joined:
    Dec 21, 2010
    Posts:
    52
    But How can i Use In unity
     
  5. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    Using the only information you're giving. You import them as openEXR format. If you want more info you're gonna have to explain how you want to use them and where.
     
  6. kapilkundan

    kapilkundan

    Joined:
    Dec 21, 2010
    Posts:
    52
    yaa sure i have Cube i want to make it as reflective Cube i had use texture of base RGB and Bump RGB now how can i use this Openexr to make Reflection on cube achully i'm new in unity Did;t get how to use this .hdr ,i converted this .hdr in EXR which is Open in Unity but do't kw how to use it
     
  7. rasq

    rasq

    Joined:
    May 25, 2009
    Posts:
    51
    I have also this problem:
    i have hdr file, konverted to EXR imported to Unity.
    But when i try use this for Reflections (conwert to material or somthing) i have only standard diffuse material or green reflections :/
     
unityunity