Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Recorder Image Alpha under HDRP

Discussion in 'Audio & Video' started by bitinn, Jun 23, 2021.

  1. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    958
    Hi,

    I have another question regarding capturing an image with transparent background under HDRP.

    - I have setup the HDRP Asset to use R16G16B16A16 as color buffer, and my post processing also use R16G16B16A16 for LUT Grading.

    - I have setup Lighting setting to use a Gradient Sky for Ambient color (aka Static Lighting Sky), but for the actual Skybox, we override it with Visual Environment set to Type: None and Ambient Mode: Static.

    - Then I set the Camera to use either Background Type: Sky or Color, and set the Background Color to (0, 0, 0, 0).

    - I see the background is now grey in scene view (as in skybox is transparent), and black in game view.

    - In Recorder I have use PNG as Media File Format.

    However my capture still has a black background, eg. (0, 0, 0, 1)

    Is there anything else we need to check? We could really use some documentation here, because I can never got "Include Alpha" to show up, whichever Source I select.

    https://docs.unity3d.com/Packages/com.unity.recorder@2.5/manual/RecorderImage.html
     
  2. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    Are you recording the Game View? It does not support transparency, as explained in the documentation you linked to.
    BTW we are at release 3.0.0-pre.2 so please upgrade.
    Please post a screenshot of your Recorder Window settings. This helps us understand your setup.
     
  3. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    This option "include alpha" never happens in my recorder clip (Timeline) or in the Recorder window (withotu Timeline).

    How do you access this option please? We need to export our characters on transparent backgrounds...
     
  4. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    You need to have a source that supports it (NOT the GameView) and also NOT be in a URP project.
     
  5. pkumarshall

    pkumarshall

    Joined:
    Aug 3, 2018
    Posts:
    11
    Hi, I'm using HDRP and I also have the same problem that the Include Alpha toggle doesn't appear in my recorder as shown in the picture below, please help me fix this, thanks!
    upload_2021-8-4_1-34-41.png
     
  6. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Updating to the 3.0.1 version fixed my problem.
     
    unitybru likes this.
  7. pkumarshall

    pkumarshall

    Joined:
    Aug 3, 2018
    Posts:
    11
    Thanks for your help, sir. I checked the Enable Pre-release Packages toggle in Project Settings, but there's still only the 2.5.5 version showed up. How can I update to the 3.0.1 version?
     
    GeniusKoala likes this.
  8. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    You need to add it manually. I also don't get it because before we could see preview package along with stable ones.

    upload_2021-8-4_8-30-53.png

    upload_2021-8-4_8-31-25.png

    I went on this page to see available versions : https://docs.unity3d.com/Manual/com.unity.recorder.html

    upload_2021-8-4_8-32-30.png

    Hope it will fix your issue as it did for me!
     

    Attached Files:

  9. pkumarshall

    pkumarshall

    Joined:
    Aug 3, 2018
    Posts:
    11
    unitybru likes this.
  10. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    62
    So there's no way to capture alpha using UniversalRenderPipeline? any updates?
     
  11. rob11

    rob11

    Joined:
    Mar 7, 2017
    Posts:
    57
    A link to a thread where I explain how I made it work under URP (2021.2.1)

    LINK
     
  12. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    33
    If anyone encounters the problem of not recording alpha channel in HDRP, don't worry about it. You need to modify color buffer format to R16G16B16A16 format in HDRP render pipeline asset.

    PS. I strongly recommend this point should be written in Unity Recorder pulgin's documention. Otherwise, users may suffer the issue that the exported pngs have no alpha channel.