Is it possible to use post process effects in viewport derived from SEditorViewport?

We read the guide Tutorial – Creating outline effect around objects | Unreal Engine 4 blog and it’s works OK in Level Editor Viewport. Than we tried to apply this post process effect within custom viewport, but nothing is drawn around object.

We try to use the following code:

 APostProcessVolume* OutlineVolume = PreviewScene.GetWorld()->SpawnActor(FVector::ZeroVector,FRotator(0,0,0));
OutlineVolume->bUnbound = true;

FWeightedBlendable OutlineWeightedBlendable(1.0f, OutlineMaterial);
OutlineVolume->Settings.WeightedBlendables.Array.Add(OutlineWeightedBlendable);

Sincerely.

Hi Kostiantyn,

I’m not entirely sure what effect your custom viewport would have on this or how you’re setting things up, but it should be evaluated per view so as long as your volume is in the correct list it should be drawn. You can try debugging the volume accumulation by looking in SceneView.cpp and debugging the DoPostProcessVolume() function which should be getting called from FSceneView::StartFinalPostprocessSettings(). Perhaps the volume isn’t registered correctly with the SceneView or another volume is competing, it’s very difficult to say without the project to hand. Hopefully debugging the function will reveal what’s missing.

Thanks,
Chris