Radial Blur PostProcess Material

This works great, but how can I access a post process material in c++ and change its values at runtime? I can get the PostProcessVolume in c++, but I can’t find a way to get the materials from it.

If it can’t be done in c++, is there a way to do that via blueprint? Maybe I can then affect this blueprint via c++.

I want to essentially change the blur strength over time.

Edit: I figured it out. I learned about parameter collections. You can set the post process material parameters as collection parameters instead. You can access these collection parameters from c++.


UMaterialParameterCollection* col = LoadObject<UMaterialParameterCollection>(nullptr, TEXT("MaterialParameterCollection'/Game/.../Materials/RadialBlurParamCollection.RadialBlurParamCollection'"));
if(col)
    UKismetMaterialLibrary::SetScalarParameterValue(GetWorld(), col, TEXT("BlurAmount"), myVariable);