Changes to weather system, normalize weather
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Materials/VFX/Decals/MI_WetSurfaceDecal_Puddle.uasset
LFS
Normal file
BIN
Content/Materials/VFX/Decals/MI_WetSurfaceDecal_Puddle.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "Curves/CurveLinearColor.h"
|
||||||
#include "Engine/DataAsset.h"
|
#include "Engine/DataAsset.h"
|
||||||
#include "WeatherPresetDataAsset.generated.h"
|
#include "WeatherPresetDataAsset.generated.h"
|
||||||
|
|
||||||
@@ -55,6 +56,10 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
||||||
FRuntimeFloatCurve CloudsBrightnessCurve;
|
FRuntimeFloatCurve CloudsBrightnessCurve;
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
||||||
|
FRuntimeCurveLinearColor CloudAmbientColorCurve;
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
||||||
|
FRuntimeCurveLinearColor CloudSunColorCurve;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Clouds")
|
||||||
float CloudDensity = 0.3f;
|
float CloudDensity = 0.3f;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "Engine/PostProcessVolume.h"
|
#include "Engine/PostProcessVolume.h"
|
||||||
#include "Engine/StreamableManager.h"
|
#include "Engine/StreamableManager.h"
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
|
||||||
#include "Kismet/KismetMaterialLibrary.h"
|
#include "Kismet/KismetMaterialLibrary.h"
|
||||||
#include "Materials/MaterialParameterCollection.h"
|
#include "Materials/MaterialParameterCollection.h"
|
||||||
#include "ProjectEleri/Data/WeatherPresetDataAsset.h"
|
#include "ProjectEleri/Data/WeatherPresetDataAsset.h"
|
||||||
@@ -229,6 +228,20 @@ void ATimeOfDayManager::UpdateLightning()
|
|||||||
QueuedWeatherPreset ?
|
QueuedWeatherPreset ?
|
||||||
FMath::Lerp(QueuedWeatherPreset->CloudCoverage,CurrentWeatherPreset->CloudCoverage,CurrentWeaterFadeAlpha) :
|
FMath::Lerp(QueuedWeatherPreset->CloudCoverage,CurrentWeatherPreset->CloudCoverage,CurrentWeaterFadeAlpha) :
|
||||||
CurrentWeatherPreset->CloudCoverage);
|
CurrentWeatherPreset->CloudCoverage);
|
||||||
|
|
||||||
|
const FLinearColor CloudAmbientColor = CurrentWeatherPreset->CloudAmbientColorCurve.GetLinearColorValue(FloatMinutes);
|
||||||
|
UKismetMaterialLibrary::SetVectorParameterValue(GetWorld(), GeneralMaterialParameterCollection,
|
||||||
|
FName("CloudAmbientColor"),
|
||||||
|
QueuedWeatherPreset ?
|
||||||
|
FMath::Lerp(QueuedWeatherPreset->CloudAmbientColorCurve.GetLinearColorValue(FloatMinutes),CloudAmbientColor, CurrentWeaterFadeAlpha)
|
||||||
|
: CloudAmbientColor);
|
||||||
|
|
||||||
|
const FLinearColor CloudSunColor = CurrentWeatherPreset->CloudSunColorCurve.GetLinearColorValue(FloatMinutes);
|
||||||
|
UKismetMaterialLibrary::SetVectorParameterValue(GetWorld(), GeneralMaterialParameterCollection,
|
||||||
|
FName("CloudSunColor"),
|
||||||
|
QueuedWeatherPreset ?
|
||||||
|
FMath::Lerp(QueuedWeatherPreset->CloudSunColorCurve.GetLinearColorValue(FloatMinutes),CloudSunColor, CurrentWeaterFadeAlpha)
|
||||||
|
: CloudSunColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update wetness
|
// Update wetness
|
||||||
@@ -286,6 +299,8 @@ void ATimeOfDayManager::RotateSun(const float &_rotator)
|
|||||||
AppliedSunRotation = currentSunRotation;
|
AppliedSunRotation = currentSunRotation;
|
||||||
bSunRotationDirty = false;
|
bSunRotationDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UKismetMaterialLibrary::SetVectorParameterValue(GetWorld(), GeneralMaterialParameterCollection, FName("SunDirection"), FLinearColor(-sunLight->GetForwardVector()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,8 +204,8 @@ public:
|
|||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||||
UMaterialParameterCollection *WindMaterialParameterCollection;
|
UMaterialParameterCollection *WindMaterialParameterCollection;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Time of Day - Lightning Setting")
|
||||||
AActor *skyDomeActor;
|
AStaticMeshActor *skyDomeActor;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
APostProcessVolume *MainPP;
|
APostProcessVolume *MainPP;
|
||||||
@@ -405,6 +405,9 @@ protected:
|
|||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
TMap<UWeatherPresetDataAsset *, float> WeatherPresetDistributionMap;
|
TMap<UWeatherPresetDataAsset *, float> WeatherPresetDistributionMap;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
UMaterialInstanceDynamic* CloudDynamicMaterial = nullptr;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
||||||
UInteractionWidgetComponent* WidgetComponent;
|
UInteractionWidgetComponent* WidgetComponent;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user