Crossfading Between Viewpoints with PostProcessing Blend Material

Hello! I’m trying to implement a crossfade effect when switching my player’s viewpoint from the character’s eyes to the lens of a held camera when they raise it. I was trying to adapt this method (which has been the only one I’ve been able to find) into something I can call on the fly in c++, since it will be happening in gameplay rather than a cinematic. I created the material graph as near as I could since some nodes have changes since the tutorial was made:

I created a material parameter collection with a BlendAlpha scalar parameter, created a TextureRenderTarget2D and set it as the render target of the SceneCaptureComponent2D in my camera lens BP and as the Texture Sample texture on the blend material, and I added the blend material to the post process materials on the camera in my player character BP. I then created a ViewBlenderComponent to handle updating the scalar parameter and moving the player’s viewpoint using an additive offset.

Everything is working pretty much as expected except for two small issues:

  1. Translucent materials are rendered on top of the blend material making them fully visible during the crossfade instead of fading out like everything else.
  2. The texture sample captured from the SceneCaptureComponent2D is MUCH brighter than the scene texture, creating a flashing effect as the blend material blends in and out.

I’d really appreciate any assistance or guidance anyone can give me on fixing either of those issues, as this really isn’t my area of expertise.

1 Like

Well, I’m not sure if this was the ideal solution, but changing the blendable location of the post process blend material to “After Tonemapping” (instead of before) fixed the issue with translucent materials rendering on top, and then adjusting the Target Gamma of the RenderTarget2D more or less fixed the brightness issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.