Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Take HDR Screenshots

Discussion in 'Editor & General Support' started by pojoih, Nov 30, 2014.

  1. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Hey folks,

    I wonder if it is somehow possible write a screenshot script that does the same as Application.CaptureScreenshot, with the supersizing but without the png compression, just the RAW (HDR) image.

    I want to capture a very high resolution screenshot from a HDR Camera and get all the high dynamic range image for postprocessing in Photoshop.
     
    Tinovdk likes this.
  2. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Just to bump this thread. I'm looking for exactly what you have described. Did you have any luck finding a solution?
     
  3. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Yup, I've wrote my own :).
    But it's not very effective nor user friendly as I was too lazy to save the screenshot in a proper image format.

    Essentially on F1 press (or setting the bool in the editor) my script creates a HDR Rendertexture from the main camera and saves it out to a texture2D which raw data will then be stored on the harddrive (/YourProjectFolder/Screenshots/).

    When this is done, you can open the files in Photoshop. Here are my settings for interpreting:

    upload_2016-1-4_20-14-33.png

    Feel free to try, no guarantees.
     

    Attached Files:

  4. theteadrinker

    theteadrinker

    Joined:
    Jan 6, 2015
    Posts:
    5
    thanks!
    For some reason I had to change
    RenderTextureFormat.DefaultHDR at line 49 to
    RenderTextureFormat.ARGBFloat but then it works as expected (Unity 2017.2.0f3)
     
    pojoih likes this.