unreal.VCamOutputProviderBase

class unreal.VCamOutputProviderBase(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Output providers implement methods of overlaying a widget onto a target viewport. The composition of viewport and widget is then usually streamed to an application outside the engine, e.g. via Pixel Streaming or Remote Session.

To start outputting, the owning UVCamComponent must be enabled and the output provider activated.

Output providers are managed by UVCamComponent, which own them and must be attached as a child to a UCineCameraComponent. Output providers have a target viewport that the widget is overlayed onto. The target viewport can be locked to the target camera, which happens when:

  1. The output provider is outputting IsOutputting() == true

  2. The output provider is configured to do so, either by 2.1 NeedsForceLockToViewport returning true or 2.2 UVCamComponent::ViewportLocker being configured accordingly.

When a viewport is locked, the owning output provider can affect its resolution (see bUseOverrideResolution and OverrideResolution).

A concept of viewport ownership is implemented in FViewportManager ensuring that at most 1 output provider affects a viewport’s lock and resolution at a time; the first output provider to request lock, gets the ownership over that viewport. When lock, resolution or target viewport change, call RequestResolutionRefresh to updat the viewport state.

C++ Source:

  • Plugin: VirtualCameraCore

  • Module: VCamCore

  • File: VCamOutputProviderBase.h

Editor Properties: (see get_editor_property/set_editor_property)

  • final_output_render_target (TextureRenderTarget2D): [Read-Write] TextureRenderTarget2D asset that contains the final output.

    If specified, this render target will be output by the provider. This allows you to do custom compositing before outputting happens. The details depend on the output provider subclass implementation. For example, the pixel streaming output provider outputs the viewport by default. If FinalOutputRenderTarget is specified, the specified render target is streamed instead of the viewport.

  • gameplay_view_target_policy (GameplayViewTargetPolicy): [Read-Write] In game worlds, such as PIE or shipped games, determines which a player controller whose view target should be set to the owning cine camera.

    Note that multiple output providers may have a policy set and policies might choose the same player controllers to set the view target for. This conflict is resolved as follows: if a player controller already has the cine camera as view target, the policy is not used. Hence, you can order your output providers array in the VCamComponent. The first policies will get automatically get higher priority.

  • is_active (bool): [Read-Write] If set, this output provider will execute every frame

  • on_activated_delegate_blueprint (ActivationDelegate_Blueprint): [Read-Write] Called when the activation state of this output provider changes.

  • override_resolution (IntPoint): [Read-Write] When bUseOverrideResolution is set, use this custom resolution

  • target_viewport (VCamTargetViewportID): [Read-Write] Which viewport to use for this VCam

  • umg_class (type(Class)): [Read-Write] The UMG class to be rendered in this output provider

  • use_override_resolution (bool): [Read-Write] Override the default output resolution with a custom value - NOTE you must toggle bIsActive off then back on for this to take effect

can_toggle_activation() bool
Returns:

Whether it is allowed to toggle (true -> false, false -> true) the activation state of this output provider.

Return type:

bool

property final_output_render_target: TextureRenderTarget2D

[Read-Write] TextureRenderTarget2D asset that contains the final output.

If specified, this render target will be output by the provider. This allows you to do custom compositing before outputting happens. The details depend on the output provider subclass implementation. For example, the pixel streaming output provider outputs the viewport by default. If FinalOutputRenderTarget is specified, the specified render target is streamed instead of the viewport.

Type:

(TextureRenderTarget2D)

get_target_viewport() VCamTargetViewportID

Get Target Viewport

Return type:

VCamTargetViewportID

get_umg_class()

Get UMGClass

Return type:

type(Class)

get_v_cam_component() VCamComponent

Get VCam Component

Return type:

VCamComponent

is_active() bool

Returns if this output provider is currently active or not

Return type:

bool

is_initialized() bool

Returns if this output provider has been initialized or not

Return type:

bool

property on_activated_delegate_blueprint: ActivationDelegate_Blueprint

[Read-Write] Called when the activation state of this output provider changes.

Type:

(ActivationDelegate_Blueprint)

property override_resolution: IntPoint

[Read-Write] When bUseOverrideResolution is set, use this custom resolution

Type:

(IntPoint)

set_active(active) None

Called to turn on or off this output provider

Parameters:

active (bool)

set_target_viewport(value) None

Set Target Viewport

Parameters:

value (VCamTargetViewportID)

set_umg_class(umg_class) None

Set UMGClass

Parameters:

umg_class (type(Class))

property target_viewport: VCamTargetViewportID

[Read-Write] Which viewport to use for this VCam

Type:

(VCamTargetViewportID)

property umg_class: Class

[Read-Write] The UMG class to be rendered in this output provider

Type:

(type(Class))

property use_override_resolution: bool

[Read-Write] Override the default output resolution with a custom value - NOTE you must toggle bIsActive off then back on for this to take effect

Type:

(bool)