Search Unity

HDRP How to render AO for transparent objects?

Discussion in 'High Definition Render Pipeline' started by ErrorX, Jun 13, 2019.

  1. ErrorX

    ErrorX

    Joined:
    May 21, 2014
    Posts:
    22
    Is there a way to render ambient occlusion for a transparent object in HDRP with Postprocessing?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    No.

    There's no way to do this in any rendering path. Big AAA games handle this by not actually using transparent geometry unless absolutely necessary, instead using dithered opaque geometry that either FXAA or TAA can blur into something that looks transparent, or by using dummy opaque geometry that gets hidden by the transparent geometry. Otherwise it's all faked.
     
    GeniusKoala and Ruchir like this.
  3. ErrorX

    ErrorX

    Joined:
    May 21, 2014
    Posts:
    22
    Thank you for the reply, I was already afraid of this that it was not possible with the current HDRP system.
    Luckily I'm not making a game. I need to render/screenshots a lot of generated models. So prebaking is not an option and dithered opaque looks ugly.

    So I think I have to find a hack or something to solve this. I like the idea of creating a dummy opaque geometry and hide it behind the model. Only I don't know how to hide it without using transparency.
     
    GeniusKoala likes this.
  4. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Have you found a solution for this? We would like to have ambient occlusion on a matte shadow proxy (Unlit transparent mesh) but it can't have ambient occlusion as you said in this thread. We are faking our 3D characters on a live environnement so they look like stick to the ground. I have no solution for this so far but I am open to any solution inside Unity (custom render pass, custom shader, Compositor, etc...)