Search Unity

Background turns black / transparent using Depth of Field when exporting to PNG or EXR sequence

Discussion in 'Cinemachine' started by ericjacobus, Jan 17, 2020.

  1. ericjacobus

    ericjacobus

    Joined:
    Aug 22, 2018
    Posts:
    8
    Hello everyone,

    When I add depth of field to post-processing, an mp4 and jpg sequence exports just fine (all sequences are converted to H264 MP4 unless otherwise noted).
    Software specs: Unity 2019.2.12f1 Cinemachine 2.3.4 Unity Recorder 2.0.3 Post-Processing 2.1.7

    JPG Sequence (this exports the same as when exporting directly to MP4 from Recorder)


    But something strange happens when exporting to PNG and EXR sequences. The background seems to be treated as transparent. This happens whether "focus tracks target" is on or off. The same issue arises.

    EXR Sequence


    PNG Sequence


    Here's a single frame

    JPG (correct):
    2020-01-17_07h39m_Kung Fu vs. Zombie_187_0046.jpg

    PNG:
    2020-01-17_07h36m_Kung Fu vs. Zombie_185_0046.png

    EXR (Alpha import):


    EXR (Transparent import):


    There seems to be no way to treat this from the Unity Recorder (version 2.0.3) window. The "capture alpha" box is greyed out. Is this fixed in some other version of Recorder?

    Recorder window.JPG

    There also seems to be no way to control this from the Media Encoder export settings. I tried both 422 and H264


    Any ideas? I'd like to keep using PNG export, but this won't be an option if I can't use depth of field post-processing.

    Comp specs:
    Alienware 17 Intel i7
    Windows 10 64-bit
    NVIDIA GeForce GTX 1080
     

    Attached Files:

  2. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    83
    Hey @ericjacobus! Thank you for reporting this issue, it's indeed not the expected behavior.

    I'll open bug report internally to get this fixed but in the meantime switching your Recorder capture mode from "Game View" to "Targeted Camera" should do the trick.

    Let us know us know how that goes for you, cheers!
     
    unitybru likes this.
  3. maryusatom

    maryusatom

    Joined:
    Apr 5, 2017
    Posts:
    4
    Hi,
    I am using HDRP, and I have changed the colour to be R16G16B16A16 in graphics settings, but I do not have access to the Capture Alpha button, it is not visible.

    Any ideas would be welcomed please :)
     

    Attached Files: