Search Unity

Bug Rendering a transparent object

Discussion in 'Universal Render Pipeline' started by od3098, Jul 11, 2021.

  1. od3098

    od3098

    Joined:
    Apr 29, 2015
    Posts:
    56
    Unity: 2020.3.13f1
    URP: 10.5.1
    Recorder: 2.5.5

    I want to render a transparent image from an opaque object.
    There is a camera to only render dedicated layer with solid color background type and a transparent color for background color:
    upload_2021-7-11_3-54-40.png


    Using Recorder with these setting to capture what I want:
    upload_2021-7-11_3-55-42.png

    and this is the rendered image with no transparency:
    upload_2021-7-11_3-58-44.png

    I also cant find a separate layer for my object in frame debugger. the first layer that has my object, renders it with background color:
    upload_2021-7-11_4-0-14.png
     
  2. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    Hello,

    here is how I get transparency:
    upload_2021-7-14_13-32-29.png

    I don't know what your first screenshot shows, but it does not seem to be the Inspector for a regular camera.

    Your recorder is correctly configured.

    Cheers
     
  3. od3098

    od3098

    Joined:
    Apr 29, 2015
    Posts:
    56
    My camera is a regular camera for in Unity 2020.3.13f1 with URP package installed.
    The reason it is not capturing a transparent image, is that postprocessing checkbox on camera was enabled. disabling this checkbox makes my render transparent.
    Idk if this is a recorder bug or a URP bug.

    Update: Filed a bug report here: FogBugz (unity3d.com)
     

    Attached Files:

    Last edited: Jul 15, 2021
  4. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    If you upgrade your version of the package to 3.0.1, you will notice that the "Include alpha" checkbox has been removed from Image Sequence Recorders for URP projects because it seemed that URP cameras did not support transparency.

    Thank you for reporting this issue, we will investigate it in due time. It seems that having to completely remove postprocessing from your camera is a very high cost in terms of graphics quality just to get transparency, no? Ideally, it should work with postprocessing.
     
  5. od3098

    od3098

    Joined:
    Apr 29, 2015
    Posts:
    56
    It turned out that in my use case I dont need postprocessing because I will use result image in game and if it captures with postprocessing, after using image in game, the postprocessing will effect that image too and so will get effects 2 times.
    but being able to optionally select postprocessing in recorder package would be nice.
     
  6. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
  7. od3098

    od3098

    Joined:
    Apr 29, 2015
    Posts:
    56
    As I said here, my case is already closed. but thanks for providing a workaround.