how to turn on/off a post process material?

Hi all – hoping there’s an easier answer than what I’ve spent quite some time digging for :slight_smile:

I’m trying to gain access to a Camera’s post process settings, so that I can simply turn on and off a particular post process blend material at the user’s request.

I’ve been digging through the source, and the documentation, and it seems that it’s just a large mess of UStructs of TArrays of UStructs of TArrays of … and so on. WIth the documentation for each one getting less and less specific.

So… is there an easy route to doing this?

Have a sample where we modify gamma and color tint of the level’s PostProcessVolume. Might help out.

 // find post process volume
 APostProcessVolume* _postProcessVolume;
 for (TActorIterator<APostProcessVolume> ActorItr(GetWorld()); ActorItr; ++ActorItr)
  _postProcessVolume = Cast<APostProcessVolume>(*ActorItr);
  if (_postProcessVolume)
   LOG("AAreaLightingController: FindPostProcessVolume(): volume found!");

 // reset post process gamma
 // reset scene color tint
 if (_postProcessVolume)
  _postProcessVolume->Settings.ColorGamma = FVector4(1, 1, 1, 1);
  _postProcessVolume->Settings.SceneColorTint = FLinearColor(1, 1, 1, 1);

Thanks for the tip, those settings are a little bit simpler to get at than the custom materials list inside a cameraactor’s cameracomponent… but I’ll keep digging. :slight_smile: If PPV settings is easier to get at than CameraComponent i might go that way

CameraComponent->PostProcessSettings.WeightedBlendables.Array[0].Weight = 0;

Tadaa. The Array is the list of post process materials on the camera.

Interesting. I was much deeper than that in a nested list of structs and arrays before I gave up and asked. I figured there’d be some methods for setting, but there doesn’t seem to be.