Search Unity

HD Recorder Camera Alpha?

Discussion in 'Timeline' started by DGordon, Jun 26, 2019.

  1. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    390
    Sorry if this isn't where it belongs.

    I'm using Unity 2019.1.5f1. I set the camera's background type to color and background color to 0 alpha. I created a brand new scene without any post processing at all. I turned off AA. I cannot manage to get the alpha channel of the background. Specifically I just want this to work using the "capture alpha" for the texture sampling record mode, but I've tried everything I can think of to get any alpha channel for that background (my own screen shot code, render textures, etc) and everything comes back as opaque.

    This is actually pretty important, since without this, using the record + timeline to create prerenders of characters ... doesn't really work. Not unless I want to take each image into photoshop, and still have a bit of color baked into their alpha'd areas (ie: hair). Which means, it doesn't actually work, since I can't use that in anything professional.

    Is there any way around this yet? If not, is there any eta on a fix? HDRP is coming along really beautifully, theres already built in functionality to take super sampled images with alpha ... so its a shame if this bug ruins that. Everything else is basically a dream come true.
     
    Mad_Banny likes this.
  2. weltbesterbatman

    weltbesterbatman

    Joined:
    Oct 1, 2013
    Posts:
    11
    We are searching for a possibility to render HDRP projects with alpha.
    The current alpha channel is a grayscale interpretation of the full image an not a real alpha channel. So we are also searching for a solution for this.
     
  3. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    390
    I ended up doing two screenshots, one with a black background and one with a white. I compare each pixel and determine if its fully transparent, fully opaque, or partially transparent. If its partially transparent, Im just using difference of the grayscale values to fake the alpha (how much changing background influenced the pixel). Its "good enough", even if a hack.