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

HDRP Camera stacking

Discussion in 'Virtual Production' started by GeniusKoala, Jul 14, 2021.

  1. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Hi,

    I would like to composite my 3D characters with a video behind them to insert them in a live environment. The problem is I have post processing on my characters and I don't want this PP on the video. I tried multiple ways :

    1) Put the VideoPlayer output on a RawImage Unlit Material with "rendering pass" on "after post-process". It works but my characters now have big aliasing artefacts around them so it's not useable in a production.

    2) Using 2 cameras. I can stack the 2 cameras with one for the characters and one for the Canvas where the VideoPlayer renders. The post processing of the characters camera is still displayed on top of the video. I think it might be because it's applied to the whole screen so even if the camera is behind it would be applied to it too.

    3) The Compositor. I don't know how it works even with the documentation. I could not find any tutorial about it. I don't know if it would help ?

    I think the problem is the tonemapping that is applied to the whole screen from the character camera and since it's on top on the video camera the tonemapping is applied to the video too. I would like it to be applied only on my characters. I just want to put a video (without any changes) behind them.

    EDITS :

    1) After multiples tests I don't think it's possible since some effects like tonemapping and color curves are applied to the screen and not only on the camera. Is there ny workaround possible?

    2) Is it possible to render a camera after the post processing of another camera ? It's like the post process is applied after the drawing of my 2 cameras. I would like to draw my character camera, then apply the post process then draw my second camera with the video.

    3) I could use the Compositor for stacking both my cameras but the problem is still here. I will investigate to use Custom Passes.

    4) Is there a way to inverse the tonemapping inside a shader for a RenderTexture ? The same for Color Curves set in the Volume (maybe more complex).

    5) Even if I want to export my characters on a transparent background there is still an outline on them. I think the AA and DoF make the outline blend with the transparent background and create this outline. If I make the transparent background red, the outline become red.

    Conclusion is I have no workaround to make it work haha even with the help of another software like Adobe Premiere.

    Thank you and I hope I was not too confusing...
     
    Last edited: Jul 15, 2021
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548

    The MICH-L, Cinematic Studio Sample uses a similar process, you may be able to draw more references from there and see how they utilised shader graph with the render texture.
     
    GeniusKoala likes this.
  3. hunz

    hunz

    Joined:
    Oct 16, 2012
    Posts:
    29
    Hey,

    Did you ever get this resolved?

    I'm using a technique for my computer character at the moment where the computer screen that uses a render to texture that has different screen effects controlling it - while the main camera has it's own setup on it and neither of them influence each other.

    upload_2021-9-6_15-12-19.png

    I'm not sure if something like this is what you are hoping to achieve but I can talk you through how I set it up if you are still keen.

    Good luck!