12#include <util/ue-header-guard-begin.h>
14#include "ContentStreaming.h"
15#include "Engine/PostProcessVolume.h"
16#include "EngineUtils.h"
17#include "GameFramework/SpectatorPawn.h"
19#include "SceneManagement.h"
20#include <util/ue-header-guard-end.h>
37 static std::atomic<const TConsoleVariableData<int32> *> CVar{
nullptr};
38 const TConsoleVariableData<int32> *Cached = CVar.load(std::memory_order_relaxed);
39 if (Cached ==
nullptr)
41 Cached = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT(
"carla.Camera.UseRayTracing"));
42 CVar.store(Cached, std::memory_order_relaxed);
44 return (Cached !=
nullptr) ? Cached->GetValueOnAnyThread() : -1;
52 TEXT(
"carla.Camera.ForceAllGBuffers"),
54 TEXT(
"Force CARLA scene-capture cameras to request every GBuffer texture\n")
55 TEXT(
"each frame, irrespective of client subscription. Intended as a\n")
56 TEXT(
"one-release rollback path; default is 0 (lazy, by subscription)."),
68 TEXT(
"carla.Camera.ExposureMotionBlur"),
70 TEXT(
"1: RGB cameras derive their motion blur from the auto exposure time (overrides motion_blur_intensity).\n")
71 TEXT(
"0: use the motion_blur_* attributes / post-process profile as they are."),
75 TEXT(
"carla.Camera.FNumber"),
77 TEXT(
"Lens f-number used to turn the auto exposure into an exposure time (carla.Camera.ExposureMotionBlur)."),
81 TEXT(
"carla.Camera.MinExposureMs"),
83 TEXT(
"Shortest exposure time in ms (carla.Camera.ExposureMotionBlur)."),
87 TEXT(
"carla.Camera.MaxExposureMs"),
89 TEXT(
"Longest exposure time in ms; darker scenes raise the gain instead (carla.Camera.ExposureMotionBlur)."),
100 TEXT(
"carla.Camera.SpawnCameraCuts"),
102 TEXT(
"Number of first captures of a new camera rendered as camera cuts, so its auto exposure settles ")
103 TEXT(
"from the second image on instead of adapting for seconds from a default exposure (0 disables)."),
107 TEXT(
"carla.Camera.ExposureLog"),
109 TEXT(
"1: log each RGB capture's exposure, exposure time and motion blur amount."),
125 check(Settings !=
nullptr);
126 return Settings->GetQualityLevel();
136 : Super(ObjectInitializer)
138 PrimaryActorTick.bCanEverTick =
true;
139 PrimaryActorTick.TickGroup = TG_PrePhysics;
146 FName(*FString::Printf(TEXT(
"CaptureRenderTarget_d%d"), Index)));
154 FName(*FString::Printf(TEXT(
"USceneCaptureComponent2D%d"), Index)));
158 CaptureComponent2D->PrimitiveRenderMode = ESceneCapturePrimitiveRenderMode::PRM_RenderScenePrimitives;
174 Super::Set(Description);
206 return (CVarOverride < 0) ? bSensorEnabled : (CVarOverride > 0);
512 CaptureComponent2D->PostProcessSettings.AutoExposureCalibrationConstant_DEPRECATED = Constant;
518 return CaptureComponent2D->PostProcessSettings.AutoExposureCalibrationConstant_DEPRECATED;
626 CaptureComponent2D->PostProcessSettings.ChromaticAberrationStartOffset = ChromAberrOffset;
842 CaptureComponent2D->PostProcessSettings.LocalExposureHighlightContrastScale = HighlightContrastScale;
854 CaptureComponent2D->PostProcessSettings.LocalExposureShadowContrastScale = ShadowContrastScale;
875 if (!bOverrideCurrentCamera)
892 float CacheAmbientOcclusionRadius = Dest->
GetAORadius();
898 float CacheISO = Dest->
GetISO();
1000#ifdef CARLA_HAS_GBUFFER_API
1018 bInForceLinearGamma);
1039 UE_LOG(LogCarla, Warning, TEXT(
1040 "%s: DLSS upscaling requested but post-processing effects are disabled; "
1041 "the capture has no temporal AA method, so the engine will spatially "
1042 "upscale instead of DLSS."), *GetName());
1055 int32 VolumeCount = 0;
1056 bool bApplied =
false;
1057 for (TActorIterator<APostProcessVolume> It(GetWorld()); It; ++It)
1059 APostProcessVolume *Volume = *It;
1062 IsValid(Volume) && Volume->bEnabled && Volume->bUnbound)
1065 UE_LOG(LogCarla, Log, TEXT(
"%s: absorbed map post-process volume %s"),
1066 *GetName(), *Volume->GetName());
1070 if (!bApplied && VolumeCount > 0)
1072 UE_LOG(LogCarla, Verbose, TEXT(
1073 "%s: no map post-process volume absorbed (bEnablePP=%d, volumes in world=%d)"),
1089 IStreamingManager::Get().AddViewLocation(
1116 ReadbackPool = MakeShared<FRHIGPUReadbackPool, ESPMode::ThreadSafe>(
1117 TEXT(
"SceneCaptureReadback"));
1124#ifdef CARLA_HAS_GBUFFER_API
1125 const auto HasListener = [](
const auto &GBufferEntry)
1127 return GBufferEntry.Stream.AreClientsListening();
1131 HasListener(GBuffers.SceneColor) ||
1132 HasListener(GBuffers.SceneDepth) ||
1133 HasListener(GBuffers.SceneStencil) ||
1134 HasListener(GBuffers.GBufferA) ||
1135 HasListener(GBuffers.GBufferB) ||
1136 HasListener(GBuffers.GBufferC) ||
1137 HasListener(GBuffers.GBufferD) ||
1138 HasListener(GBuffers.GBufferE) ||
1139 HasListener(GBuffers.GBufferF) ||
1140 HasListener(GBuffers.Velocity) ||
1141 HasListener(GBuffers.SSAO) ||
1142 HasListener(GBuffers.CustomDepth) ||
1143 HasListener(GBuffers.CustomStencil);
1154 if (!FApp::CanEverRender())
1168 Super::PrePhysTick(DeltaSeconds);
1176 const float HalfTan = FMath::Tan(0.5f * FOVRadians);
1177 const float StreamingBoundingRadius =
1179 IStreamingManager::Get().AddViewInformation(
1182 StreamingBoundingRadius);
1188 Super::PostPhysTick(World, TickType, DeltaTime);
1202 const double Now = World !=
nullptr ? World->GetTimeSeconds() : 0.0;
1205 : FMath::Max(DeltaTime, 1e-3f);
1213 const float Exposure = ViewState !=
nullptr ? ViewState->GetLastEyeAdaptationExposure() : 0.0f;
1214 if (!(Exposure > 0.0f) || !FMath::IsFinite(Exposure))
1221 ExposureSeconds = FMath::Clamp(FNumber * FNumber * 1.2f * Exposure, MinSeconds, MaxSeconds);
1224 Settings.bOverride_MotionBlurAmount =
true;
1225 Settings.MotionBlurAmount = FMath::Clamp(
ExposureSeconds / FMath::Max(Interval, 1e-3f), 0.0f, 1.0f);
1229 Settings.bOverride_MotionBlurTargetFPS =
true;
1230 Settings.MotionBlurTargetFPS = 0;
1235 UE_LOG(LogCarla, Log, TEXT(
"%s exposure %.4g (EV100 %.2f) -> %.3f ms, interval %.1f ms, motion blur %.3f"),
1236 *GetName(), Exposure, FMath::Log2(1.0f / (1.2f * Exposure)),
ExposureSeconds * 1e3f, Interval * 1e3f,
1237 Settings.MotionBlurAmount);
1243 Super::EndPlay(EndPlayReason);
1253 FlushRenderingCommands();
1265#ifdef CARLA_HAS_GBUFFER_API
1267constexpr const TCHAR *GBufferNames[] =
1271 TEXT(
"SceneStencil"),
1280 TEXT(
"CustomDepth"),
1281 TEXT(
"CustomStencil"),
1284template <EGBufferTextureID ID,
typename T>
1285static void CheckGBufferStream(T &GBufferStream, FGBufferRequest &GBuffer)
1288 GBufferStream.bIsUsed = bForceAll || GBufferStream.Stream.AreClientsListening();
1289 if (GBufferStream.bIsUsed)
1290 GBuffer.MarkAsRequested(ID);
1293static uint64 Prior = 0;
1308 auto GBufferPtr = MakeUnique<FGBufferRequest>();
1309 auto &GBuffer = *GBufferPtr;
1311 CheckGBufferStream<EGBufferTextureID::SceneColor>(
CameraGBuffers.SceneColor, GBuffer);
1312 CheckGBufferStream<EGBufferTextureID::SceneDepth>(
CameraGBuffers.SceneDepth, GBuffer);
1313 CheckGBufferStream<EGBufferTextureID::SceneStencil>(
CameraGBuffers.SceneStencil, GBuffer);
1314 CheckGBufferStream<EGBufferTextureID::GBufferA>(
CameraGBuffers.GBufferA, GBuffer);
1315 CheckGBufferStream<EGBufferTextureID::GBufferB>(
CameraGBuffers.GBufferB, GBuffer);
1316 CheckGBufferStream<EGBufferTextureID::GBufferC>(
CameraGBuffers.GBufferC, GBuffer);
1317 CheckGBufferStream<EGBufferTextureID::GBufferD>(
CameraGBuffers.GBufferD, GBuffer);
1318 CheckGBufferStream<EGBufferTextureID::GBufferE>(
CameraGBuffers.GBufferE, GBuffer);
1319 CheckGBufferStream<EGBufferTextureID::GBufferF>(
CameraGBuffers.GBufferF, GBuffer);
1320 CheckGBufferStream<EGBufferTextureID::Velocity>(
CameraGBuffers.Velocity, GBuffer);
1321 CheckGBufferStream<EGBufferTextureID::SSAO>(
CameraGBuffers.SSAO, GBuffer);
1322 CheckGBufferStream<EGBufferTextureID::CustomDepth>(
CameraGBuffers.CustomDepth, GBuffer);
1323 CheckGBufferStream<EGBufferTextureID::CustomStencil>(
CameraGBuffers.CustomStencil, GBuffer);
1325 if (GBufferPtr->DesiredTexturesMask == 0)
1332 if (Prior != GBufferPtr->DesiredTexturesMask)
1333 UE_LOG(LogCarla, Verbose, TEXT(
"GBuffer selection changed (%llu)."), GBufferPtr->DesiredTexturesMask);
1335 Prior = GBufferPtr->DesiredTexturesMask;
1343 AsyncTask(ENamedThreads::AnyHiPriThreadNormalTask, [
this, GBuffer = MoveTemp(GBufferPtr)]()
mutable
1344 { SendGBufferTextures(*GBuffer); });
1347void ASceneCaptureSensor::SendGBufferTextures(FGBufferRequest &GBuffer)
1349 SendGBufferTexturesInternal(*
this, GBuffer);
1363 auto &PostProcessSettings = CaptureComponent2D.PostProcessSettings;
1365 PostProcessSettings.bOverride_ColorSaturationMidtones =
true;
1366 PostProcessSettings.bOverride_ColorContrastMidtones =
true;
1367 PostProcessSettings.bOverride_ColorSaturationHighlights =
true;
1368 PostProcessSettings.bOverride_ColorContrastHighlights =
true;
1369 PostProcessSettings.bOverride_AutoExposureMethod =
true;
1370 PostProcessSettings.bOverride_ColorGain =
true;
1371 PostProcessSettings.bOverride_LocalExposureMethod =
true;
1372 PostProcessSettings.bOverride_BlueCorrection =
true;
1373 PostProcessSettings.bOverride_FilmGrainIntensity =
true;
1374 PostProcessSettings.bOverride_AmbientOcclusionIntensity =
true;
1375 PostProcessSettings.bOverride_AmbientOcclusionRadius =
true;
1376 PostProcessSettings.bOverride_BloomMethod =
true;
1377 PostProcessSettings.bOverride_BloomDirtMaskIntensity =
true;
1378 PostProcessSettings.bOverride_BloomConvolutionTexture =
true;
1379 PostProcessSettings.bOverride_AutoExposureBias =
true;
1380 PostProcessSettings.bOverride_CameraShutterSpeed =
true;
1381 PostProcessSettings.bOverride_CameraISO =
true;
1382 PostProcessSettings.bOverride_DepthOfFieldFstop =
true;
1383 PostProcessSettings.bOverride_DepthOfFieldFocalDistance =
true;
1384 PostProcessSettings.bOverride_DepthOfFieldDepthBlurAmount =
true;
1385 PostProcessSettings.bOverride_DepthOfFieldDepthBlurRadius =
true;
1386 PostProcessSettings.bOverride_DepthOfFieldMinFstop =
true;
1387 PostProcessSettings.bOverride_DepthOfFieldBladeCount =
true;
1388 PostProcessSettings.bOverride_DepthOfFieldSensorWidth =
true;
1389 PostProcessSettings.bOverride_FilmSlope =
true;
1390 PostProcessSettings.bOverride_FilmToe =
true;
1391 PostProcessSettings.bOverride_FilmShoulder =
true;
1392 PostProcessSettings.bOverride_FilmBlackClip =
true;
1393 PostProcessSettings.bOverride_FilmWhiteClip =
true;
1394 PostProcessSettings.bOverride_AutoExposureMinBrightness =
true;
1395 PostProcessSettings.bOverride_AutoExposureMaxBrightness =
true;
1396 PostProcessSettings.bOverride_AutoExposureSpeedDown =
true;
1397 PostProcessSettings.bOverride_AutoExposureSpeedUp =
true;
1398 PostProcessSettings.bOverride_AutoExposureCalibrationConstant_DEPRECATED =
true;
1399 PostProcessSettings.bOverride_TemperatureType =
true;
1400 PostProcessSettings.bOverride_MotionBlurAmount =
true;
1401 PostProcessSettings.bOverride_MotionBlurMax =
true;
1402 PostProcessSettings.bOverride_MotionBlurPerObjectSize =
true;
1403 PostProcessSettings.bOverride_LensFlareIntensity =
true;
1404 PostProcessSettings.bOverride_BloomIntensity =
true;
1405 PostProcessSettings.bOverride_WhiteTemp =
true;
1406 PostProcessSettings.bOverride_WhiteTint =
true;
1407 PostProcessSettings.bOverride_SceneFringeIntensity =
true;
1408 PostProcessSettings.bOverride_ChromaticAberrationStartOffset =
true;
1409 PostProcessSettings.bOverride_ColorSaturation =
true;
1410 PostProcessSettings.bOverride_ColorContrast =
true;
1411 PostProcessSettings.bOverride_ColorGamma =
true;
1412 PostProcessSettings.bOverride_ColorGammaHighlights =
true;
1413 PostProcessSettings.bOverride_ToneCurveAmount =
true;
1414 PostProcessSettings.bOverride_SceneColorTint =
true;
1415 PostProcessSettings.bOverride_VignetteIntensity =
true;
1416 PostProcessSettings.bOverride_LocalExposureHighlightContrastScale =
true;
1417 PostProcessSettings.bOverride_LocalExposureShadowContrastScale =
true;
1419 PostProcessSettings.bOverride_DynamicGlobalIlluminationMethod =
true;
1420 PostProcessSettings.DynamicGlobalIlluminationMethod = EDynamicGlobalIlluminationMethod::Lumen;
1421 PostProcessSettings.bOverride_LumenSceneLightingQuality =
true;
1422 PostProcessSettings.LumenSceneLightingQuality = 1.0f;
1423 PostProcessSettings.bOverride_LumenSceneDetail =
true;
1424 PostProcessSettings.LumenSceneDetail = 1.0f;
1425 PostProcessSettings.bOverride_LumenSceneViewDistance =
true;
1426 PostProcessSettings.LumenSceneViewDistance = 20000.0f;
1427 PostProcessSettings.bOverride_LumenFinalGatherQuality =
true;
1428 PostProcessSettings.LumenFinalGatherQuality = 1.0f;
1429 PostProcessSettings.bOverride_LumenMaxTraceDistance =
true;
1430 PostProcessSettings.LumenMaxTraceDistance = 20000.0f;
1431 PostProcessSettings.bOverride_LumenSurfaceCacheResolution =
true;
1432 PostProcessSettings.LumenSurfaceCacheResolution = 1.0f;
1433 PostProcessSettings.bOverride_LumenSceneLightingUpdateSpeed =
true;
1434 PostProcessSettings.LumenSceneLightingUpdateSpeed = 1.0f;
1435 PostProcessSettings.bOverride_LumenFinalGatherLightingUpdateSpeed =
true;
1436 PostProcessSettings.LumenFinalGatherLightingUpdateSpeed = 1.0f;
1437 PostProcessSettings.bOverride_LumenDiffuseColorBoost =
true;
1438 PostProcessSettings.LumenDiffuseColorBoost = 1.0f;
1439 PostProcessSettings.bOverride_LumenSkylightLeaking =
true;
1440 PostProcessSettings.LumenSkylightLeaking = 0.1f;
1441 PostProcessSettings.bOverride_LumenFullSkylightLeakingDistance =
true;
1442 PostProcessSettings.LumenFullSkylightLeakingDistance = 1000.0f;
1443 PostProcessSettings.bOverride_ReflectionMethod =
true;
1444 PostProcessSettings.ReflectionMethod = EReflectionMethod::Lumen;
1445 PostProcessSettings.bOverride_LumenReflectionQuality =
true;
1446 PostProcessSettings.LumenReflectionQuality = 1.0f;
1447 PostProcessSettings.bOverride_LumenRayLightingMode =
true;
1448 PostProcessSettings.LumenRayLightingMode = ELumenRayLightingModeOverride::Default;
1449 PostProcessSettings.bOverride_LumenFrontLayerTranslucencyReflections =
true;
1450 PostProcessSettings.LumenFrontLayerTranslucencyReflections =
true;
1451 PostProcessSettings.bOverride_LumenMaxReflectionBounces =
true;
1452 PostProcessSettings.LumenMaxReflectionBounces = 3;
static TAutoConsoleVariable< int32 > CVarCarlaCameraSpawnCameraCuts(TEXT("carla.Camera.SpawnCameraCuts"), 2, TEXT("from the second image on instead of adapting for seconds from a default exposure (0 disables)."), ECVF_Default)
static TAutoConsoleVariable< float > CVarCarlaCameraMaxExposureMs(TEXT("carla.Camera.MaxExposureMs"), 20.0f, TEXT("Longest exposure time in ms; darker scenes raise the gain instead (carla.Camera.ExposureMotionBlur)."), ECVF_Default)
static TAutoConsoleVariable< int32 > CVarCarlaCameraExposureLog(TEXT("carla.Camera.ExposureLog"), 0, TEXT("1: log each RGB capture's exposure, exposure time and motion blur amount."), ECVF_Default)
static TAutoConsoleVariable< float > CVarCarlaCameraMinExposureMs(TEXT("carla.Camera.MinExposureMs"), 0.05f, TEXT("Shortest exposure time in ms (carla.Camera.ExposureMotionBlur)."), ECVF_Default)
static int32 GetCameraRayTracingOverride()
static TAutoConsoleVariable< int32 > CVarCarlaCameraForceAllGBuffers(TEXT("carla.Camera.ForceAllGBuffers"), 0, TEXT("one-release rollback path; default is 0 (lazy, by subscription)."), ECVF_Default)
static TAutoConsoleVariable< float > CVarCarlaCameraFNumber(TEXT("carla.Camera.FNumber"), 2.0f, TEXT("Lens f-number used to turn the auto exposure into an exposure time (carla.Camera.ExposureMotionBlur)."), ECVF_Default)
static TAutoConsoleVariable< int32 > CVarCarlaCameraExposureMotionBlur(TEXT("carla.Camera.ExposureMotionBlur"), 1, TEXT("0: use the motion_blur_* attributes / post-process profile as they are."), ECVF_Default)
static std::atomic< int > SCENE_CAPTURE_COUNTER
static bool IsValid(const ACarlaWheeledVehicle *Vehicle)
Base class for sensors using a USceneCaptureComponent2D for rendering the scene.
float GetWhiteTint() const
void SetExposureMethod(EAutoExposureMethod Method)
void SetFOVAngle(float FOVAngle)
virtual void PrePhysTick(float DeltaSeconds) override
float GetMotionBlurMaxDistortion() const
void SetShutterSpeed(float Speed)
bool ShouldCaptureThisFrame()
Aggregate gate: main stream or any GBuffer stream has listeners, or CVarCarlaCameraForceAllGBuffers f...
void SetHighlightsGamma(FVector4 HighlightsGamma)
static bool ApplyPostProcessVolumeToSensor(APostProcessVolume *Origin, ASceneCaptureSensor *Dest, bool bOverrideCurrentCamera=false)
TObjectPtr< UTextureRenderTarget2D > CaptureRenderTarget
Render target necessary for scene capture.
FRHIGPUReadbackPoolPtr ReadbackPool
Per-sensor pool of recyclable RHI readback objects.
float GetTargetGamma() const
void SetImageSize(uint32 Width, uint32 Height)
UTexture2D * GetBloomKernelTexture() const
void SetChromAberrIntensity(float Intensity)
float GetDepthOfFieldMinFstop() const
void SetMotionBlurMinObjectScreenSize(float ScreenSize)
void SetHighlightContrastScale(float HighlightContrastScale)
void Set(const FActorDescription &ActorDescription) override
float GetDepthBlurRadius() const
float DLSSScreenPercentage
Internal render resolution as a percentage of the target resolution when bEnableDLSSUpscale is set.
void SetVignetteIntensity(float VignetteIntensity)
float GetDirtMaskIntensity() const
float GetAORadius() const
float GetExposureSpeedUp() const
FVector4 GetColorContrast() const
float GetChromAberrOffset() const
float GetSensorWidth() const
void SetFilmShoulder(float Shoulder)
void SetExposureCompensation(float Compensation)
float GetBlueCorrection() const
TObjectPtr< USceneCaptureComponent2D_CARLA > CaptureComponent2D
Scene capture component.
ELocalExposureMethod GetLocalExposureMethod() const
void SetMotionBlurMaxDistortion(float MaxDistortion)
void SetDepthBlurAmount(float Amount)
void SetExposureMaxBrightness(float Brightness)
static bool ResolveCameraRayTracing(bool bSensorEnabled, bool bRequired)
Applies the carla.Camera.UseRayTracing tier policy to a camera's own ray-tracing preference.
void SetUseRayTracing(bool Enable)
FVector4 GetColorContrastMidtones() const
struct ASceneCaptureSensor::@0 CameraGBuffers
float GetShadowContrastScale() const
bool IsAnyGBufferClientListening() const
Returns true if any GBuffer stream has an active listener.
float GetLensFlareIntensity() const
void SetWhiteTemp(float Temp)
void SetFilmBlackClip(float BlackClip)
void SetBloomMethod(EBloomMethod Method)
float ExposureSeconds
Exposure time of the last capture in seconds (exposure-linked motion blur).
float GetMotionBlurMinObjectScreenSize() const
void SetAORadius(float Radius)
void SetExposureCalibrationConstant(float Constant)
void SetAperture(float Aperture)
void SetBlueCorrection(float Val)
FLinearColor GetSceneColorTint() const
uint32 ImageWidth
Image width in pixels.
float GetFOVAngle() const
FVector4 GetColorSaturationMidtones() const
void SetDepthBlurRadius(float Radius)
void SetFocalDistance(float Distance)
float GetDetailStrength() const
void SetChromAberrOffset(float ChromAberrOffset)
float GetAperture() const
bool bEnableDLSSUpscale
Render the capture at DLSSScreenPercentage of the target resolution and upscale back with DLSS Super ...
FVector4 GetColorGamma() const
float GetFilmWhiteClip() const
virtual void UpdatePostProcessConfig(FPostProcessConfig &InOutPostProcessConfig)
float GetDepthBlurAmount() const
USceneCaptureComponent2D * GetCaptureComponent2D()
bool ArePostProcessingEffectsEnabled() const
FVector4 GetColorContrastHighlights() const
void SetDirtMaskIntensity(float Intensity)
float GetFilmSlope() const
FVector4 GetGlobalGain() const
float GetExposureMaxBrightness() const
void SetLensFlareIntensity(float Intensity)
void SetBladeCount(int Count)
float GetBloomIntensity() const
int GetBladeCount() const
bool bUseRayTracing
Whether this sensor uses hardware ray tracing for its scene capture.
void SetSensorWidth(float Width)
float GetChromAberrIntensity() const
void SetDetailStrength(float Val)
void EnqueueRenderSceneImmediate()
Immediate enqueues render commands of the scene at the current time.
void SetColorSaturationMidtones(FVector4 ColorSaturation)
void SetFilmWhiteClip(float WhiteClip)
void SetBloomIntensity(float Intensity)
void SetMotionBlurIntensity(float Intensity)
void SetColorContrastMidtones(FVector4 ColorContrast)
void SetGlobalGain(FVector4 Gain)
void CaptureSceneExtended()
virtual void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture)
float GetToneCurveAmount() const
void SetFilmGrainIntensity(float Val)
float GetFilmGrainIntensity() const
void SetAOIntensity(float Intensity)
double LastCaptureTime
Simulation time of this sensor's previous capture (-1 before the first).
void SetBloomConvolutionTexture(UTexture2D *Texture)
uint32 ImageHeight
Image height in pixels.
void UpdateExposureMotionBlur(UWorld *World, float DeltaTime)
Motion blur from the auto exposure time (carla.Camera.ExposureMotionBlur).
float GetExposureSpeedDown() const
EBloomMethod GetBloomMethod() const
void SetTargetGamma(float InTargetGamma)
void SetDepthOfFieldMinFstop(float MinFstop)
bool bEnable16BitFormat
Whether to change render target format to PF_A16B16G16R16, offering 16bit / channel.
void SetColorContrast(FVector4 ColorContrast)
float GetShutterSpeed() const
bool bEnablePostProcessingEffects
Whether to render the post-processing effects present in the scene.
float GetExposureCalibrationConstant() const
float GetWhiteTemp() const
virtual void BeginPlay() override
void SetColorSaturation(FVector4 ColorSaturation)
float GetExposureCompensation() const
float GetVignetteIntensity() const
void SetColorGamma(FVector4 ColorGamma)
void SetWhiteTint(float Tint)
virtual bool RequiresRayTracing() const
True for sensors that cannot render without hardware ray tracing (path-traced lens cameras); the tier...
float GetAOIntensity() const
float GetFocalDistance() const
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
int32 NumCaptures
Captures rendered as camera cuts since BeginPlay (carla.Camera.SpawnCameraCuts).
FCarlaShowOnlyFilter ShowOnlyFilter
Show-only actor filter, applied to the capture component right before every capture (see FCarlaShowOn...
void SetFilmToe(float Toe)
void SetShadowContrastScale(float ShadowContrastScale)
ASceneCaptureSensor(const FObjectInitializer &ObjectInitializer)
EAutoExposureMethod GetExposureMethod() const
float GetExposureMinBrightness() const
void SetLocalExposureMethod(ELocalExposureMethod Method)
void SetExposureSpeedDown(float Speed)
float GetFilmBlackClip() const
FVector4 GetColorSaturation() const
void SetFilmSlope(float Slope)
void ApplyRayTracingSetting()
float GetHighlightContrastScale() const
FVector4 GetColorSaturationHighlights() const
void SetExposureSpeedUp(float Speed)
float GetMotionBlurIntensity() const
void SetExposureMinBrightness(float Brightness)
virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime) override
void SetColorSaturationHighlights(FVector4 ColorSaturation)
float GetFilmShoulder() const
void SetColorContrastHighlights(FVector4 ColorContrast)
FVector4 GetHighlightsGamma() const
void SetToneCurveAmount(float ToneCurveAmount)
void SetSceneColorTint(FLinearColor SceneColorTint)
bool AreClientsListening()
const UCarlaEpisode & GetEpisode() const
void NotifyWeather(ASensor *Sensor=nullptr)
Notifing the weather to the blueprint's event.
static void SetCamera(const FActorDescription &Description, ASceneCaptureSensor *Camera)
AWeather * GetWeather() const
static UCarlaSettings * GetCarlaSettings(const UObject *WorldContextObject)
static void SetCameraDefaultOverrides(USceneCaptureComponent2D &CaptureComponent2D)
static auto GetQualitySettings(UWorld *World)
A description of a Carla Actor with all its variation.
void Refresh(UWorld *World, const UCarlaEpisode *Episode)
Rebuild the cached actor list if the world changed since the last call.
void ApplyTo(USceneCaptureComponent2D &Capture) const
Push the current list into Capture (or restore full-scene rendering when the filter is disabled).