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

Question Go from LDR to HDR... is that even possible?

Discussion in 'General Graphics' started by danam, Sep 15, 2022.

  1. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11
    Hello, on Quest2 we were wondering of there's a way to take our LDR source data and convert it to feasible HDR data with as little effort and as much accuracy as possible?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The easiest, least effort way to convert LDR content into HDR content is to multiply it by some arbitrary brightness multiplier.

    There’s zero accuracy in this, or any LDR to HDR conversion because LDR content lacks any of the additional data needed for HDR.

    A simple example would be a photo in a dark room with a single window to the outside. An LDR version of that photo you have three choices. Expose for the window, expose for the interior, or someone has manually exposed the interior and exterior separately to bring them closer to the same brightness within the image.

    For the photo exposed for the room, the LDR image has no additional detail outside. It’s effectively just a solid white wall. That data is lost. If you dim the image you just get a grey wall outside.

    For the photo exposed for the window, the LDR image has no additional detail inside. It’s effectively solid black. If you brighten the image you just get a grey interior.

    Fo the photo that’s been manually exposed for both, it’s more pleasing to the eye to look at in LDR, but you’ve lost any information about the fact the outside was much brighter than the inside. You can manually modify this image by hand to get it closer to how it was, but that’s not low effort.

    TLDR: not really, no.
     
    DevDunk likes this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,969
    Adding to the previous post, the Quest does not support HDR
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The term "HDR" is a bit overloaded as it refers to several different things.

    The Quest and Quest 2 do not support HDR Display. They are limited to 8 bit color depth (LDR) for display.

    Quest 2 does support HDR rendering, and can decode HDR video and image formats. Technically Quest 1 does as well, but its GPU is too slow to handle that while keeping framerate. However those images will need to be tone mapped or otherwise be brightened / darkened at runtime for that additional dynamic range to be of any use.
     
    DevDunk likes this.
  5. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11

    That's kinda what we were thinking. in a real PBR pipeline we would tonemap the entire framebuffer after rendering, which we can't do for now on Quest2. But we could in theory apply a tonemap operator per object / material if we ultimately decide we need it to dial down the hotness (could also just default say to sampling the HDR reflection at -0.5 stops or something).