CARLA
Loading...
Searching...
No Matches
Sky.cpp
Go to the documentation of this file.
1#include "Sky.h"
2#include "Carla.h"
3
4#include <util/ue-header-guard-begin.h>
5#include "Components/PostProcessComponent.h"
6#include "Components/ExponentialHeightFogComponent.h"
7#include "Components/DirectionalLightComponent.h"
8#include "Components/DirectionalLightComponent.h"
9#include "Components/SkyLightComponent.h"
10#include "Components/VolumetricCloudComponent.h"
11#include "Components/SkyAtmosphereComponent.h"
12#include <util/ue-header-guard-end.h>
13
17
18#include <util/ue-header-guard-begin.h>
19#include "Kismet/GameplayStatics.h"
20#include <util/ue-header-guard-end.h>
21
22namespace
23{
24 AWeather* FindWeatherActor(const UWorld* World)
25 {
26 return World != nullptr
27 ? Cast<AWeather>(UGameplayStatics::GetActorOfClass(World, AWeather::StaticClass()))
28 : nullptr;
29 }
30
31 // "Current weather" for this sky rig: if a BP_CarlaWeather happens to be
32 // placed in the level, its Weather member is authoritative (same value
33 // the API/recorder see). Otherwise fall back to this actor's own "Sky
34 // Parameters" -- kept in sync by ApplyWeatherTo below -- so none of this
35 // requires an AWeather actor to be placed at all.
36 FWeatherParameters GetEffectiveCurrentWeather(AActor* SkyActor)
37 {
38 if (AWeather* Weather = FindWeatherActor(SkyActor->GetWorld()))
39 return Weather->GetCurrentWeather();
41 return *Params;
42 return FWeatherParameters();
43 }
44
45 // Applies NewWeather to this sky rig. Prefers routing through a placed
46 // AWeather (full pipeline: post-process camera blendables, day/night
47 // light broadcast, recorder) when one exists; otherwise pushes directly
48 // to the rig via the same per-actor logic AWeather itself uses.
49 void ApplyWeatherTo(AActor* SkyActor, const FWeatherParameters& NewWeather)
50 {
51 if (AWeather* Weather = FindWeatherActor(SkyActor->GetWorld()))
52 Weather->ApplyWeather(NewWeather);
53 else
54 AWeather::ApplyWeatherToSkyActor(SkyActor, NewWeather);
55 }
56}
57
58
60{
61 for (TFieldIterator<FProperty> It(SkyActor->GetClass()); It; ++It)
62 {
63 FStructProperty* StructProperty = CastField<FStructProperty>(*It);
64 if (StructProperty != nullptr && StructProperty->Struct == FWeatherParameters::StaticStruct())
65 return StructProperty->ContainerPtrToValuePtr<FWeatherParameters>(SkyActor);
66 }
67 return nullptr;
68}
69
71 const FObjectInitializer& ObjectInitializer) :
72 Super(ObjectInitializer)
73{
74 PostProcessComponent = CreateDefaultSubobject<UPostProcessComponent>("PostProcessComponent");
75 RootComponent = PostProcessComponent;
76
77 ExponentialHeightFogComponent = CreateDefaultSubobject<UExponentialHeightFogComponent>("ExponentialHeightFogComponent");
78 ExponentialHeightFogComponent->SetupAttachment(RootComponent);
79
80 DirectionalLightComponentSun = CreateDefaultSubobject<UDirectionalLightComponent>("DirectionalLightComponentSun");
81 DirectionalLightComponentSun->SetupAttachment(RootComponent);
82 // Both lights default to ForwardShadingPriority 0, so forward shading/
83 // translucency/volumetric fog fall back to picking whichever is brighter
84 // right now -- flip-flopping as day turns to night -- and the engine logs
85 // "Multiple directional lights are competing..." every time. The Sun
86 // should always win outright; it's the one everything (fog, water,
87 // volumetrics) is actually meant to be lit by.
88 DirectionalLightComponentSun->ForwardShadingPriority = 1;
89
90 DirectionalLightComponentMoon = CreateDefaultSubobject<UDirectionalLightComponent>("DirectionalLightComponentMoon");
91 DirectionalLightComponentMoon->SetupAttachment(RootComponent);
92 // Below the Sun's priority (1) so it never contends for forward shading.
93 // Separately: every DirectionalLightComponent defaults bAtmosphereSunLight
94 // true -- a completely different resolution SkyAtmosphere uses to pick its
95 // single "sun" reference for scattering, independent of ForwardShadingPriority
96 // above. Leaving the Moon eligible there let it win that tie against the
97 // real Sun, which reads as a broken/black sky once the sun actually rises
98 // (SkyAtmosphere doing all its math against the moon's position instead).
99 DirectionalLightComponentMoon->ForwardShadingPriority = -1;
100 DirectionalLightComponentMoon->SetAtmosphereSunLight(false);
101
102 SkyLightComponent = CreateDefaultSubobject<USkyLightComponent>("SkyLightComponent");
103 SkyLightComponent->SetupAttachment(RootComponent);
104
105 VolumetricCloudComponent = CreateDefaultSubobject<UVolumetricCloudComponent>("VolumetricCloudComponent");
106 VolumetricCloudComponent->SetupAttachment(RootComponent);
107
108 SkyAtmosphereComponent = CreateDefaultSubobject<USkyAtmosphereComponent>("SkyAtmosphereComponent");
109 SkyAtmosphereComponent->SetupAttachment(RootComponent);
110
111}
112
114{
115 // The weather's fallback bloom is not part of the profile: saved as set,
116 // the profile would claim it and the fallback could never update it.
117 const bool bBloomOverride = PostProcessComponent->Settings.bOverride_BloomIntensity;
119 PostProcessComponent->Settings.bOverride_BloomIntensity = false;
121 PostProcessComponent->Settings.bOverride_BloomIntensity = bBloomOverride;
122}
123
125{
128
129 // Profiles that don't claim AutoExposureMinBrightness/MaxBrightness (i.e.
130 // rely on Weather's fallback clamp, see ApplyWeatherToSkyActor) store those
131 // overrides as false -- loading them resets the component straight back to
132 // the engine's own AutoExposure defaults until something else happens to
133 // re-trigger the fallback. Re-run it immediately so a profile switch alone
134 // (no other property edit in between) doesn't leave exposure unclamped.
136
137 // CameraParameters is a curated view onto the same Settings this profile
138 // just overwrote wholesale -- resync it so the shortcuts reflect the
139 // loaded profile instead of whatever was left over from before.
141}
142
144{
145 if (NewProfileName.IsEmpty())
146 return;
147 ProfileName = NewProfileName;
148 SaveProfile();
149}
150
155
157{
158 FWeatherTimePreset TimePreset;
159 FWeatherConditionPreset ConditionPreset;
160 const bool bTimeOk = UWeatherJsonUtils::LoadTimePreset(TimePreset, TimePresetName);
161 const bool bConditionOk = UWeatherJsonUtils::LoadConditionPreset(ConditionPreset, ConditionPresetName);
162 if (!bTimeOk && !bConditionOk)
163 return;
164
165 // Only overwrite the half that actually loaded, so a missing condition
166 // preset (say) doesn't reset the sun position to defaults.
167 FWeatherParameters Base = GetEffectiveCurrentWeather(this);
168 if (!bTimeOk)
169 {
170 TimePreset.SunAzimuthAngle = Base.SunAzimuthAngle;
171 TimePreset.SunAltitudeAngle = Base.SunAltitudeAngle;
172 }
173 if (!bConditionOk)
174 {
175 ConditionPreset.Cloudiness = Base.Cloudiness;
176 ConditionPreset.Precipitation = Base.Precipitation;
177 ConditionPreset.PrecipitationDeposits = Base.PrecipitationDeposits;
178 ConditionPreset.WindIntensity = Base.WindIntensity;
179 ConditionPreset.FogDensity = Base.FogDensity;
180 ConditionPreset.FogDistance = Base.FogDistance;
181 ConditionPreset.FogFalloff = Base.FogFalloff;
182 ConditionPreset.Wetness = Base.Wetness;
183 ConditionPreset.ScatteringIntensity = Base.ScatteringIntensity;
184 ConditionPreset.MieScatteringScale = Base.MieScatteringScale;
186 }
187
188 ApplyWeatherTo(this, UWeatherJsonUtils::MergeWeatherPresets(Base, TimePreset, ConditionPreset));
189
190 // A hand-edit of a WeatherParameters field always gets a FULL editor
191 // reconstruction cycle for free (property edit -> OnConstruction -> the
192 // Blueprint's own construction graph runs, THEN this class's C++ override
193 // re-pushes). This function updates the struct and pushes natively, same
194 // as OnConstruction's own push, but skips the Blueprint graph's own pass
195 // entirely -- if that pass does any one-time setup the raw push doesn't
196 // replicate (respawning/re-registering the sky sphere, stars material,
197 // etc.), the result can look wrong until some later, unrelated edit
198 // finally triggers a real reconstruction. Force that same full cycle here
199 // instead of leaving it to chance. Editor-only API -- irrelevant at
200 // runtime anyway, OnConstruction only ever runs once there, at spawn.
201#if WITH_EDITOR
202 RerunConstructionScripts();
203#endif
204}
205
207{
208 const FWeatherParameters Current = GetEffectiveCurrentWeather(this);
209 FWeatherTimePreset Preset;
210 Preset.SunAzimuthAngle = Current.SunAzimuthAngle;
211 Preset.SunAltitudeAngle = Current.SunAltitudeAngle;
212 UWeatherJsonUtils::SaveTimePreset(Preset, TimePresetName);
213}
214
216{
217 const FWeatherParameters Current = GetEffectiveCurrentWeather(this);
219 Preset.Cloudiness = Current.Cloudiness;
220 Preset.Precipitation = Current.Precipitation;
222 Preset.WindIntensity = Current.WindIntensity;
223 Preset.FogDensity = Current.FogDensity;
224 Preset.FogDistance = Current.FogDistance;
225 Preset.FogFalloff = Current.FogFalloff;
226 Preset.Wetness = Current.Wetness;
228 Preset.MieScatteringScale = Current.MieScatteringScale;
230 UWeatherJsonUtils::SaveConditionPreset(Preset, ConditionPresetName);
231}
232
234{
235 if (NewTimePresetName.IsEmpty())
236 return;
237 TimePresetName = NewTimePresetName;
239}
240
242{
243 if (NewConditionPresetName.IsEmpty())
244 return;
245 ConditionPresetName = NewConditionPresetName;
247}
248
250{
251 if (FWeatherParameters* SkyParameters = ASkyBase::FindWeatherParameters(this))
252 ApplyWeatherTo(this, *SkyParameters);
253}
254
256{
257 const UWorld* World = GetWorld();
258 if (World == nullptr)
259 return;
260 FString MapName = World->GetMapName();
261 MapName.RemoveFromStart(World->StreamingLevelsPrefix);
262
263 const FWeatherParameters Base = GetEffectiveCurrentWeather(this);
264 FWeatherParameters MapDefault;
265 if (UWeatherJsonUtils::GetMapDefaultWeather(MapName, Base, MapDefault))
266 {
267 ApplyWeatherTo(this, MapDefault);
268#if WITH_EDITOR
269 RerunConstructionScripts(); // see the comment in ApplyTimeAndConditionPresets
270#endif
271 }
272}
273
275{
276 FPostProcessSettings& Settings = PostProcessComponent->Settings;
277
278 // NOTE: ShutterSpeed/ISO/Aperture only actually affect the image when
279 // ExposureMode is AEM_Manual -- under AEM_Histogram (the default, what
280 // Default/Test.json use) UE's auto exposure ignores them entirely, they're
281 // visually inert. Flip ExposureMode below to Manual to make them matter
282 // (that's what GoPro.json does). A separate attempt at making them work
283 // under Histogram too, by forcing AutoExposureApplyPhysicalCameraExposure
284 // on, was reverted: it broke night-time exposure (fights the auto-exposure
285 // system's own day/night adaptation).
286
287 // ExposureMinEV/MaxEV are intentionally NOT pushed here (read-only,
288 // display-only in FCameraParameters -- see SyncCameraParametersFromPost
289 // Process below). Default/Test.json deliberately leave these two fields
290 // unclaimed (bOverride_AutoExposureMinBrightness/MaxBrightness = false) so
291 // AWeather::ApplyWeatherToSkyActor's own fallback can fill them in per
292 // push; forcing them here on every edit claimed them permanently, and once
293 // that got captured by a SaveProfile click it corrupted Default.json into
294 // a fixed EV range that badly over-exposed night scenes (the moon at night
295 // rendering as a blown-out blue sky). Fixed by reverting that override in
296 // Default.json; don't reintroduce the same push here.
297 Settings.bOverride_LocalExposureHighlightContrastScale = true;
298 Settings.LocalExposureHighlightContrastScale = CameraParameters.HighlightContrast;
299 Settings.bOverride_LocalExposureShadowContrastScale = true;
300 Settings.LocalExposureShadowContrastScale = CameraParameters.ShadowContrast;
301
302 Settings.bOverride_CameraShutterSpeed = true;
303 Settings.CameraShutterSpeed = CameraParameters.ShutterSpeed;
304 Settings.bOverride_AutoExposureMethod = true;
305 Settings.AutoExposureMethod = CameraParameters.ExposureMode;
306 Settings.bOverride_CameraISO = true;
307 Settings.CameraISO = CameraParameters.ISO;
308 Settings.bOverride_DepthOfFieldFstop = true;
309 Settings.DepthOfFieldFstop = CameraParameters.Aperture;
310
311 Settings.bOverride_DepthOfFieldSensorWidth = true;
312 Settings.DepthOfFieldSensorWidth = CameraParameters.SensorWidth;
313 Settings.bOverride_DepthOfFieldFocalDistance = true;
314 Settings.DepthOfFieldFocalDistance = CameraParameters.FocalDistance;
315
316 Settings.bOverride_WhiteTemp = true;
317 Settings.WhiteTemp = CameraParameters.Temperature;
318 Settings.bOverride_WhiteTint = true;
319 Settings.WhiteTint = CameraParameters.Tint;
320 Settings.bOverride_SceneColorTint = true;
321 Settings.SceneColorTint = CameraParameters.SceneColorTint;
322 Settings.bOverride_ColorSaturation = true;
323 Settings.ColorSaturation = FVector4(CameraParameters.GlobalSaturation, CameraParameters.GlobalSaturation,
324 CameraParameters.GlobalSaturation, Settings.ColorSaturation.W);
325 Settings.bOverride_ColorContrast = true;
326 Settings.ColorContrast = FVector4(CameraParameters.GlobalContrast, CameraParameters.GlobalContrast,
327 CameraParameters.GlobalContrast, Settings.ColorContrast.W);
328 Settings.bOverride_ColorGamma = true;
329 Settings.ColorGamma = FVector4(CameraParameters.GlobalGamma, CameraParameters.GlobalGamma,
330 CameraParameters.GlobalGamma, Settings.ColorGamma.W);
331 Settings.bOverride_VignetteIntensity = true;
332 Settings.VignetteIntensity = CameraParameters.VignetteIntensity;
333}
334
336{
337 const FPostProcessSettings& Settings = PostProcessComponent->Settings;
338
339 CameraParameters.ExposureMinEV = Settings.AutoExposureMinBrightness;
340 CameraParameters.ExposureMaxEV = Settings.AutoExposureMaxBrightness;
341 CameraParameters.HighlightContrast = Settings.LocalExposureHighlightContrastScale;
342 CameraParameters.ShadowContrast = Settings.LocalExposureShadowContrastScale;
343
344 CameraParameters.ShutterSpeed = Settings.CameraShutterSpeed;
345 CameraParameters.ExposureMode = Settings.AutoExposureMethod;
346 CameraParameters.ISO = Settings.CameraISO;
347 CameraParameters.Aperture = Settings.DepthOfFieldFstop;
348
349 CameraParameters.SensorWidth = Settings.DepthOfFieldSensorWidth;
350 CameraParameters.FocalDistance = Settings.DepthOfFieldFocalDistance;
351
352 CameraParameters.Temperature = Settings.WhiteTemp;
353 CameraParameters.Tint = Settings.WhiteTint;
354 CameraParameters.SceneColorTint = Settings.SceneColorTint;
355 CameraParameters.GlobalSaturation = Settings.ColorSaturation.X;
356 CameraParameters.GlobalContrast = Settings.ColorContrast.X;
357 CameraParameters.GlobalGamma = Settings.ColorGamma.X;
358 CameraParameters.VignetteIntensity = Settings.VignetteIntensity;
359}
360
361#if WITH_EDITOR
362void ASkyBase::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
363{
364 Super::PostEditChangeProperty(PropertyChangedEvent);
365
366 const FName PropertyName = PropertyChangedEvent.GetPropertyName();
367 if (PropertyName == GET_MEMBER_NAME_CHECKED(ASkyBase, TimePresetName)
368 || PropertyName == GET_MEMBER_NAME_CHECKED(ASkyBase, ConditionPresetName))
369 {
371 }
372}
373#endif
374
375void ASkyBase::OnConstruction(const FTransform& Transform)
376{
377 Super::OnConstruction(Transform);
378
379 // OnConstruction also fires once at actor spawn in a game world (PIE or
380 // packaged), not just on editor property edits. Pushing here unconditionally
381 // meant BOTH this AND ACarlaGameModeBase::BeginPlay's own weather push ran
382 // at Play start, and SetSkySphere's respawn (destroy-old, spawn-new) isn't
383 // safe against two independent, near-simultaneous callers -- it produced
384 // duplicate BP_Sky_Sphere/DirectionalLight actors and the "multiple
385 // directional lights competing" warning. Editor-only: let BeginPlay's push
386 // be the sole driver once actually playing.
387 if (GetWorld() != nullptr && GetWorld()->IsGameWorld())
388 return;
389
390 // Direct push, not ApplyWeatherTo: this must never depend on finding an
391 // AWeather actor (irrelevant here) or go through its full pipeline (camera
392 // blendables, recorder) -- just put this rig's own components back in sync
393 // with whatever "Sky Parameters" already holds.
394 if (FWeatherParameters* SkyParameters = ASkyBase::FindWeatherParameters(this))
395 AWeather::ApplyWeatherToSkyActor(this, *SkyParameters);
396
397 // Same self-healing story as Sky Parameters above: any edit reruns
398 // Construction and would otherwise leave CameraParameters' last pushed
399 // values sitting unapplied against a Settings struct that just got reset.
401}
402
403const FName ASkyBase::FallbackSkyTag(TEXT("CarlaFallbackSky"));
404
406{
407 Super::BeginPlay();
408
409 UWorld* World = GetWorld();
410 // The viewport / spectator renders through this unbound post process with
411 // the viewport profile (carla.PostProcess.ViewportProfile); RGB sensors load
412 // their own (carla.PostProcess.Profile or post_process_profile). What the map
413 // saved in the rig is only the editor view.
414 if (World != nullptr && World->IsGameWorld() && PostProcessComponent != nullptr)
415 {
416 const FString Profile = UPostProcessJsonUtils::GetViewportProfileName();
418 {
420 UE_LOG(LogCarla, Log, TEXT("ASkyBase: %s loaded camera profile '%s'"), *GetName(), *Profile);
421 }
422 else
423 {
424 UE_LOG(LogCarla, Warning, TEXT("ASkyBase: %s could not load camera profile '%s'"), *GetName(), *Profile);
425 }
427 }
428
429 if (World == nullptr || ActorHasTag(FallbackSkyTag))
430 return;
431
432 TArray<AActor*> Fallbacks;
433 UGameplayStatics::GetAllActorsWithTag(World, FallbackSkyTag, Fallbacks);
434 if (Fallbacks.IsEmpty())
435 return;
436 for (AActor* Fallback : Fallbacks)
437 {
438 // SetSunActorReference attaches a DirectionalLight actor to the rig,
439 // which Destroy would leave behind.
440 TArray<AActor*> Attached;
441 Fallback->GetAttachedActors(Attached, /*bResetArray=*/true, /*bRecursivelyIncludeAttachedActors=*/true);
442 for (AActor* Child : Attached)
443 Child->Destroy();
444 Fallback->Destroy();
445 }
446 UE_LOG(LogCarla, Log, TEXT("ASkyBase: %s streamed in, removed %d fallback sky rig(s)"),
447 *GetName(), Fallbacks.Num());
448
449 // Streamed in with the state saved in the map; catch up with the weather.
450 if (AWeather* Weather = Cast<AWeather>(UGameplayStatics::GetActorOfClass(World, AWeather::StaticClass())))
451 AWeather::ApplyWeatherToSkyActor(this, Weather->GetCurrentWeather());
452}
453
455{
456 const UWorld* World = GetWorld();
457 if (World == nullptr)
458 return;
459 FString MapName = World->GetMapName();
460 MapName.RemoveFromStart(World->StreamingLevelsPrefix);
461 UWeatherJsonUtils::SetMapDefaultPresetNames(MapName, TimePresetName, ConditionPresetName);
462}
463
465{
466 const UWorld* World = GetWorld();
467 if (World == nullptr)
468 return;
469 FString MapName = World->GetMapName();
470 MapName.RemoveFromStart(World->StreamingLevelsPrefix);
471 if (FWeatherParameters* SkyParameters = ASkyBase::FindWeatherParameters(this))
472 UWeatherJsonUtils::SetMapDefaultWeather(MapName, *SkyParameters);
473}
474
479
void LoadProfile()
Definition Sky.cpp:124
static TArray< FString > GetAvailableConditionPresetNamesForPicker()
Definition Sky.cpp:480
UPostProcessComponent * PostProcessComponent
Definition Sky.h:311
void CreateProfile()
Definition Sky.cpp:143
FString NewTimePresetName
Definition Sky.h:229
static FWeatherParameters * FindWeatherParameters(AActor *SkyActor)
Definition Sky.cpp:59
FString NewProfileName
Definition Sky.h:158
USkyLightComponent * SkyLightComponent
Definition Sky.h:323
USkyAtmosphereComponent * SkyAtmosphereComponent
Definition Sky.h:329
UVolumetricCloudComponent * VolumetricCloudComponent
Definition Sky.h:326
void D_SaveCurrentWeatherAsMapDefault()
Definition Sky.cpp:464
void H_LoadMapDefault()
Definition Sky.cpp:255
void B_SaveTimePreset()
Definition Sky.cpp:206
void C_SaveConditionPreset()
Definition Sky.cpp:215
void G_CreateConditionPreset()
Definition Sky.cpp:241
UDirectionalLightComponent * DirectionalLightComponentMoon
Definition Sky.h:320
bool bBloomFromWeatherFallback
Definition Sky.h:129
ASkyBase(const FObjectInitializer &ObjectInitializer)
Definition Sky.cpp:70
void E_SetAsMapDefault()
Definition Sky.cpp:454
void ApplyTimeAndConditionPresets()
Definition Sky.cpp:156
virtual void OnConstruction(const FTransform &Transform) override
Definition Sky.cpp:375
static TArray< FString > GetAvailableTimePresetNamesForPicker()
Definition Sky.cpp:475
static TArray< FString > GetAvailablePostProcessProfileNamesForPicker()
Definition Sky.cpp:151
virtual void BeginPlay() override
Definition Sky.cpp:405
void SaveProfile()
Definition Sky.cpp:113
void F_CreateTimePreset()
Definition Sky.cpp:233
static const FName FallbackSkyTag
Definition Sky.h:118
UExponentialHeightFogComponent * ExponentialHeightFogComponent
Definition Sky.h:314
FString NewConditionPresetName
Definition Sky.h:232
void SyncCameraParametersFromPostProcess()
Definition Sky.cpp:335
UDirectionalLightComponent * DirectionalLightComponentSun
Definition Sky.h:317
FCameraParameters CameraParameters
Definition Sky.h:177
void RefreshWeather()
Definition Sky.cpp:249
void PushCameraParameters()
Definition Sky.cpp:274
static void ApplyWeatherToSkyActor(AActor *SkyActor, const FWeatherParameters &Weather)
Pushes Weather into a single ASkyBase rig (sun/fog/clouds/atmosphere/ exposure) and runs its blueprin...
Definition Weather.cpp:1543
static void FillSkyPostProcessFallback(class UPostProcessComponent *PostProcessComponent)
Exposure / bloom defaults for the fields the sky's loaded camera profile does not set (see the commen...
Definition Weather.cpp:2511
static bool LoadAllPostProcessFromJsonToPostProcessComponent(UPostProcessComponent *Volume, const FString &FileName)
static bool SaveAllPostProcessComponentToJson(UPostProcessComponent *Volume, const FString &FileName)
static TArray< FString > GetAvailablePostProcessProfileNames()
static FString GetViewportProfileName()
static FWeatherParameters MergeWeatherPresets(const FWeatherParameters &Base, const FWeatherTimePreset &TimePreset, const FWeatherConditionPreset &ConditionPreset)
static bool SaveConditionPreset(const FWeatherConditionPreset &Preset, const FString &Name)
static bool GetMapDefaultWeather(const FString &MapName, const FWeatherParameters &Base, UPARAM(ref) FWeatherParameters &OutWeather)
static TArray< FString > GetAvailableConditionPresetNames()
static bool LoadConditionPreset(UPARAM(ref) FWeatherConditionPreset &OutPreset, const FString &Name)
static bool SaveTimePreset(const FWeatherTimePreset &Preset, const FString &Name)
static bool SetMapDefaultWeather(const FString &MapName, const FWeatherParameters &Weather)
static TArray< FString > GetAvailableTimePresetNames()
static bool LoadTimePreset(UPARAM(ref) FWeatherTimePreset &OutPreset, const FString &Name)
static bool SetMapDefaultPresetNames(const FString &MapName, const FString &TimeName, const FString &ConditionName)
float Tint
Definition Sky.h:80
float HighlightContrast
Definition Sky.h:41
float ShadowContrast
Definition Sky.h:44
float GlobalGamma
Definition Sky.h:92
float ShutterSpeed
Definition Sky.h:48
float ISO
Definition Sky.h:59
TEnumAsByte< EAutoExposureMethod > ExposureMode
Definition Sky.h:56
float GlobalSaturation
Definition Sky.h:86
float FocalDistance
Definition Sky.h:69
float SensorWidth
Definition Sky.h:66
float Aperture
Definition Sky.h:62
FLinearColor SceneColorTint
Definition Sky.h:83
float ExposureMinEV
Definition Sky.h:35
float VignetteIntensity
Definition Sky.h:95
float ExposureMaxEV
Definition Sky.h:38
float Temperature
Definition Sky.h:77
float GlobalContrast
Definition Sky.h:89