Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can Post Processing Effects Be Used Based On Meshes?

Discussion in 'Image Effects' started by TheCelt, Apr 14, 2019.

  1. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    741
    So here is what i would like to try to do:

    Say i have two game objects A and B

    They have a bunch of children, i want object A and all its children meshes to render in black and white but B to be normal. Is this possible with post processing at all ? If so how do you do it?

    If not - how would something like this be achieved?
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,616
    The two camera method:
    Put A and it's children on a separate new layer and render them with a camera that only renders that new layer and has your black-and-white post effects. Then render the scene with a second camera that renders all layers except your new layer. Make sure you set the post effects camera to render first and the second camera to not clear what the first camera renders.
     
  3. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    that will render the first camera on top of everything else, even if they're behind a wall or occluded by some object.

    What you need is to use stencils. Sadly it's not a commonly used method and it appears to be a bit tricky.