It would be great if UE4 would allow for custom masks. Masks are widely used in Film/TV post production and they would also benefit games greatly.
It should be like you mask something in a material and that mask takes then over to the post processing material. So it is possible to apply different effects to different parts of the world and objects. Masks can then be applied to whole objects or on a texture/UV basis and even vertex colors.
For this to work 2 key components are required:
- Custom material output: The user can add a new custom output in the material.
- Custom SceneTexture: The user can add a new custom scene texture input in the post processing material this can then be linked to the custom material output. This Custom SceneTexture behaves then like SceneColor except it only renders the colors of that defined Custom Material output (while also occluding)
As of now the only mask in post processing materials that can be used is Custom Scene depth but having only 1 useable mask is obviously very constraining and it has no color and it is only on a object level with a tickbox.
The movie Sin City is great example for a wide use of masks, at first glance it looks like heavy color grading but it really uses lots of masking and not just for the red, otherwise it would look really cheap. While with 3D rendering making masks would obviously be much easier.