How to create and edit a post-process on a camera by code?


I can’t find any way to do it or any example on the internet. The documentation is not relevant at all on the topic. The best things i can find are deprecated. I found how to edit the settings of the depth of field but i can’t find the way to get the post process volume or to add one to my camera.


TL;DR ==> need somthing like : MyCamera->AddPostProcess(DepthOfField);

I notice that API refrence starting to missing things. in UCameraComponent (CameraActor is just dummy actor with camera component) and APostProcessVolume has PostProcessSettings (in volume variable is just called Settings). It’s a structure which has all post processing parameters since it one big shader which you change varables in:

Ok thanks, but it’s not very clear for me. I don’t know all the macros names and other enums used by UE4. So i’m totally lost with this.

So you are saying that the camera are not used in there but i just have to modify the setting of the post process volume? So my question is how i can access to that volume in my code? Can i just create a public actor and assign it in the editor? I’m a bit lost with the UE4 logic, i’m used to Unity…

You can console camera component from actor it has it, you can extend ACameraActor if you want to add some interactivity in it. Interaction with with volume depends on what you really want to do.

Can you show me an example please? And i’m not sure to see what you are talking about.