Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Rendering out 32bit EXR frames with Recorder?

Discussion in 'Formats & External Tools Previews' started by Spoonfishlee, Dec 4, 2019.

  1. Spoonfishlee

    Spoonfishlee

    Joined:
    Mar 21, 2016
    Posts:
    50
    Hi! I'm trying to render out some 32 bit frames with the Recorder, and the output images do become 32bit EXR's, but the information in them is still in the bottom 0-255 (8 bit).

    How can I render out 32 bit frames with all the values intact?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Looks like it's broken. I would submit a bug report.
     
    Spoonfishlee likes this.
  3. Spoonfishlee

    Spoonfishlee

    Joined:
    Mar 21, 2016
    Posts:
    50
    Ah okay, so it IS at least supposed to work like I'm imagining? I have found no information at all about rendering EXR's in Unity, besides that the option exists.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    If you use the post processing stack there’s a button to export the current camera view to an EXR. This outputs a perfect image with all of the original HDR information. So it’s possible to have it work like you expect, but whatever the recorder is doing isn’t doing the same thing.

    It might be possible to look at the two implementations and fix it yourself if you’re code savvy, but you should report a bug either way.
     
    Spoonfishlee likes this.
  5. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Hi @Spoonfishlee ,
    For unclamped values with the HDR option you need to:
    • Disable any "Tonemapping" post-processes
    • Disable "Dithering" on the render camera (it's enabled by default and compresses data to 8-bits)
    Tell us it that works for you.
    We will add this to the documentation.
    Best,
    Mathieu
     
    _slash_ likes this.
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    My test case was with a scene w/o any post processing at all. Just a camera set to render with HDR and a material outputting a known HDR value (2.0). Recorder's EXR output was clamped.
     
  7. Spoonfishlee

    Spoonfishlee

    Joined:
    Mar 21, 2016
    Posts:
    50
    We've turned off tonemapping on all our volumes, but with no results. Is there any default tonemapping hidden in preferences or the HDRP asset or anything like that?
     
  8. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Have you checked the HDR checkbox? (HDR option is only available in the latest Recorder package)
     
  9. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Considering that option doesn't exist in any of the versions of the Recorder package I can find, no.

    The changelog notes that HDR recording only works with the HDRP. I'm using the built in rendering paths & LWRP/URP, not HDRP, which would explain why I can't find it.
     
  10. AA-Matt

    AA-Matt

    Joined:
    Oct 1, 2016
    Posts:
    8
    For anyone else that comes across this issue in the future: I'm using Universal Render Pipeline so results may vary for you, but I worked around it by forcing the method ImageRecorderSettings.CanCaptureHDRFrames to return true and making sure my camera had post processing turned off, Camera's HDR set to UsePipelineSettings, and HDR option is on in pipeline settings asset.
     
  11. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Yes, HDR recording only works with HDRP currently, as we developed this with Animation and Film pipeline in mind. @AA-Matt and @bgolus what are your use cases for HDR recording from URP? (thanks @aA-Mat for sharing your work around).
     
  12. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I don't actually have a use case for it, just confirming what others are seeing.
     
  13. AA-Matt

    AA-Matt

    Joined:
    Oct 1, 2016
    Posts:
    8
    My use case was to render the background of a scene to a high resolution skybox but I also wanted to be able to use it for lighting the scene and so needed it to be an HDR panorama.
     
  14. Jef_thefridge

    Jef_thefridge

    Joined:
    Dec 11, 2017
    Posts:
    2
    Hi there, we're running into the same issue: using HDRP (2019.3), trying to export 32 bit EXRs, but no success.

    We've disabled tonemapping and dithering, but the option to Capture Frames in HDR is greyed out in the recorder.
     
    Last edited: Aug 12, 2020
    Deleted User likes this.
  15. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    URP and HDR are possible so there is a case for youtube gameplay videos and trailers to use HDR