Filter objects for ScreenCapture / RenderTarget

Norlin Games
Sat, 22 Apr 2017 19:07:21 +0000
Blueprint

Hello!

I’m working on portals system via [this tutorial from Youtube][1]

And I’ve found an issue which not handled by the tutorial author.

How the portal works, in common: I have a “Render Target 2D” and “Screen Capture Component 2D” for each gate which are interconnected, so what captured on the one gate’s Capture component will be displayed on the second gate’s Render Target.

To handle different points of view when player moving around, it requires to move related Capture component (to capture from the proper angle and distance).

And here the issue appears: Capture Component usually placed behind the portal gate, and if any object is between the gate and Capture component it will be captured as well, even while it’s behind the portal and should not be visible on the connected gate.

Please look for the screenshot for clarification.

On the screenshot:

1. Target gate with Render Target (BP_Portal_Arc2)

2. Debug sphere where the source Capture component is placed (source gate is BP_Portal_Arc4)

3. Blue arrow shows the Capture’s line of sight (as you see it captures the cubes which are behind the source gate)

4. Red Arrow - what should be visible (the same direction but just from the gate)

So, the question: is it possible to somehow filter such objects which are behind the gate and should not be captured/rendered?

2 posts - 1 participant