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

Multi Camera post processing

Discussion in 'High Definition Render Pipeline' started by WavyRancheros, Aug 18, 2021.

  1. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    173
    I am trying to find resources about what's possible in the latest version (2021.1.17)

    I am trying to render the majority of the scene darker and blurred.
    On top I want to render selected objects and one UI canvas sharp and bright.

    Usually I'd use two cameras, one for layer "Environment" and the other layer "Selected", and assign a post process volume to the camera rendering the environment.


    This example I created using the built-in renderer and Post Processing v2

    How does this work in HDRP?
     
    Last edited: Aug 18, 2021
  2. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    173
    I take it camera stacking does not work?
     
  3. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548
  4. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    Camera stacking is supported, but thru the Graphic Compositor. But its near impossible to figure out how it works.
     
    Ruchir likes this.
  5. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    Ive kind of made it work with Graphic Compositor, but its strange that this way it was suppose to minimize the number of cameras, so its easier on the puter. But instead of having 2 cameras as in URP camera stack, im using 3 now in HDRP.
    1 camera for the perspective view, 1 camera for the orthographic view, and 1 main projection.
    Dont know how else im suppose to do according to the docs.
     
    Ruchir likes this.
  6. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548
    ah yes of course!
    The only downside id caution is that in some cases users may not be using the 16 bit half alpha channel in colour and post stencils in their project. and depending on the post effects TAA may also be a requirement to remove jitter ( which could also end up problematic depending on your scene.

    We tend to use it for better depth of field rendering in general but it might not always be something in budget and like you mentioned, it can lead to drawing errors in the alpha stencil layers if you're not used to it.
    Well worth looking into though for the OP.
     
  7. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    Maybe thats why my game is so jittery.
    My HDRP physics is so messed up at the moment.
    Its not a hardware issue, but i think unity is having problems.
    The player movement is not moving smoothly forward. and im trying to find out why. might be this 2 camera/3 camera setup im having/had in URP/HDRP.
    something is very wrong.
     
  8. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548
    hrmm, I'd maybe look into the Custom Frame Settings Per camera.

    I'd take a stab that the RP > Asset > Global Frame Settings > Frame settings > Volumes > Cameras,
    works similar to the volume system in general.
    So whatever is primarily enabled will be enabled to the next unless told otherwise.

    for your framing overlay cameras, you can probably check the custom frame setting and disable all that doesn't apply to that camera, so that it isn't processed twice or more depending on your stack.

    in general, camera stacking in HDRP is going to have a high processing cost compared to all the other Graphics Compositor methods, there may not be much wiggle room for all use cases/budgets.
     

    Attached Files:

  9. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    thanx. ill have a go at it. its probably something like it doing all that you say.
    Ive made a generic HDRP test project with 1 camera and what ive seen, its nothing wrong yet.
     
    HIBIKI_entertainment likes this.
  10. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548
    Np
    Best of luck :)