15#include <util/ue-header-guard-begin.h>
16#include "Components/SceneCaptureComponent2D.h"
17#include "Engine/TextureRenderTarget2D.h"
18#include <util/ue-header-guard-end.h>
31 constexpr bool bEnableModifyingPostProcessEffects =
false;
34 TEXT(
"rt_lens_instance"),
35 bEnableModifyingPostProcessEffects);
41 if (Variation.Id == TEXT(
"samples_per_pixel"))
43 Variation.RecommendedValues = {TEXT(
"1")};
45 else if (Variation.Id == TEXT(
"enable_denoiser"))
47 Variation.RecommendedValues = {TEXT(
"false")};
54 const FObjectInitializer &ObjectInitializer)
55 : Super(ObjectInitializer)
75 PostProcessSettings.bOverride_PathTracingLensAOV =
true;
83 PostProcessSettings.bOverride_PathTracingSamplesPerPixel =
true;
84 PostProcessSettings.bOverride_PathTracingEnableDenoiser =
true;
98 Super::Set(Description);
148 if (RenderTarget ==
nullptr)
153 TArrayView<const FColor> Pixels,
154 FIntPoint Size) ->
bool
static constexpr int32 GPathTracingLensAOVTag
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
void ApplyInstanceAOVConfig()
Re-asserts everything that makes this capture a tag AOV rather than a colour render.
ASceneCaptureCamera_RayTracedLensInstance(const FObjectInitializer &ObjectInitializer)
static FActorDefinition GetSensorDefinition()
void Set(const FActorDescription &ActorDescription) override
void BeginPlay() override
FLensModelDescriptor LensModel
Resolved lens-model parameters, rebuilt in Set() from the camera_model / distortion_coeffs / lut / fx...
int32 SamplesPerPixel
Path-tracer quality knobs.
void TickCaptureAndReadback(UWorld *World, ELevelTick TickType, float DeltaSeconds, TFunctionRef< void(bool bNonBlocking, const FSensorCaptureContext &Context)> EnqueueReadback)
Runs this tick's capture and this tick's readback in the order the world's synchronization mode requi...
UTextureRenderTarget2D * GetCaptureRenderTarget()
TObjectPtr< USceneCaptureComponent2D_CARLA > CaptureComponent2D
Scene capture component.
void EnablePostProcessingEffects(bool Enable=true)
void SetFocalDistance(float Distance)
FRHIGPUReadbackPoolPtr GetReadbackPool() const
Per-sensor pool of recyclable RHI readback objects.
static void SendDataToClient(SensorType &&Sensor, TArrayView< ElementType > SensorData, const FSensorCaptureContext &CaptureContext)
bool AreClientsListening()
static FActorDefinition MakeRayTracedLensCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)
bool ReadImageDataAsyncFColor(UTextureRenderTarget2D &RenderTarget, ReadImageDataAsyncCallbackFColor &&Callback, bool bNonBlocking, FRHIGPUReadbackPoolPtr Pool)
void ApplyLensModel(FPostProcessSettings &PostProcessSettings, const FLensModelDescriptor &Descriptor)
A definition of a Carla Actor with all the variation and attributes.
TArray< FActorVariation > Variations
Variations represent variables the user can modify to generate variations of the actor.
A description of a Carla Actor with all its variation.
Sensor frame metadata snapshotted at capture time, carried by value through async delivery instead of...