Search Unity

Making image effects overlap UI?

Discussion in 'Image Effects' started by Denisowator, May 8, 2017.

  1. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    My game has a UI that mimics the screen of a camcorder (border lines, W/T, battery life, etc), and I want certain effects to overlap it. I know to overlay an effect you can either just place something right in front of the camera object, or do something similar, but how do you do something like that for something that's already on top of the camera (the Canvas)?

    When I mean effects, I'm talking about filter-type effects. Like color change, warping, etc.
     
    Last edited: May 15, 2017
  2. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    Bump.

    I was thinking of some ways this could be achieved, but I'm not correctly at home so I can't test them (not to mention I don't have effects to test them yet, and I'm not yet looking into how those would be created).

    One would be to make the Canvas object a child of the Camera. I don't know how that would affect rendering layers though.

    Another one would be to put the UI layer behind the layer which the Camera object is in (e.g. Default). This seems like the better option, but since the Camera itself uses layers to render the scene, I don't know if that would specifically have an effect on the UI, if the camera was to have effects applied to it directly through something like script components.

    P.S. I'm having a feeling this would be better suited in the "Editor & General Support" section, as it has more to do with how Unity operates and its components, than Image Effects and creating them.
     
    Last edited: May 15, 2017
  3. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    Got it working. Similarly to my clouds problem, I just made a new camera, assigned the UI to it, and set its depth to below that of the one rendering the effects.