Download

How to make a postprocessvolume to affect the whole scene but one object ?

I need to make it so when i click on some object the whole scene become darker but the clicked object stays the same .

I’m not aware that there is a specific setting for an actor to selectively ignore a post processing volume…(I dont know for sure though)

That said, you could counteract that by dynamically changing the object’s material (i.e. the base color / emissive properties) - would that work?

Cheers,
Michael

Well i’v tried it, but it limits me only to dark effect and not that great ether. I was thinking about putting an other camera that align with the player viewport and use the post processing effect on it, take a render texture of it,put that render texture in front of the player view with the help of some unlit plane mesh ( so it will looks like this is his own view ), move the player, plane mesh(with the render texture) and the object i would like to have no effects on and move them into an other level using streaming… I don’t have time to try it right now though, so i will appreciate some advises about that .

You could try to render the mesh in a stencil buffer and use that stencil buffer in a post processing shader to darken everything that is not masked out. If you set up the blending correctly, you just need a pixel shader that outputs a fixed color.

I’m not familiar with how to work with the stencil buffer, can you point me to where i can get some information about how to do it ?

If you setup your post process than plug it into an IF statement comparing it to a custom Depth you could just render your object separately.

6sNMGaq.jpg

Are you looking for specific UE4 documentation or tutorials? I’m not sure if there exist any. There are tutorials for OpenGL and D3D out there, the concepts should translate to UE4.
You should probably look into:

  • Configuring a depth stencil state for writing
  • Acquiring a stencil buffer and setting it as a render target
  • Rendering a model with a material override
  • Configuring a depth stencil state for reading

Sorry I can’t give you more pointers, I haven’t yet worked with the UE4 rendering system myself.

Thank you both ! I will try to use that information .
DwunkyPengy, your solution looks a lot less complicated, and thank you for taking the time to make that guide for me :slight_smile: .

DwunkyPengy Can you show me what you have connected to the " A>=B " and the “A==B” of the IF node ?

For now i get an error :

From the IF node for not connecting somthing to these inputs i guess…

And i don’t really understand how does this whole thing works, where do i put the textures ? the IF node takes only numerical values .