SceneCaptureComponent & Its Lighting

Hi Developers!

I have implemented a portal that allows a player to teleport to the target portal location. It works nicely, but I am having a difficulty in getting the proper lighting. The portal is implemented in a typical way of rendering the portal world to a render target using SceneCaptureComponent and applying the render target as a texture to the flat portal mesh.

The interesting bit is we can have different light setup for the current world (A) and the portal world (B). I’m currently doing this for the portal rendering:

  • Turn lights off for A, turn lights on for B
  • Update sky light for B
  • SceneCaptureComponent::CaptureScene()
  • Turn lights off for B, turn lights on for A
  • Update sky lights for A

By turning on/off, I’m toggling light’s visibility and set bAffectsWorld flag. While it ‘roughly’ works, I’m still seeing several small differences especially on translucent materials. For example:

  • Skylight lut texture has the same output for both worlds, but the portal one is much darker.
  • Translucent materials are much more transparent (= more pixels are skipped rendering) in rendering the portal world.

Can anyone point me what else needs to be done, to make lighting match between two worlds? Appreciate any help and tip!