Exposed camera bloom and lens flare effect
This commit is contained in:
parent
db3c6472a5
commit
b505660b63
|
@ -405,6 +405,20 @@ void UActorBlueprintFunctionLibrary::MakeCameraDefinition(
|
||||||
MBMinObjectScreenSize.RecommendedValues = { TEXT("0.1") };
|
MBMinObjectScreenSize.RecommendedValues = { TEXT("0.1") };
|
||||||
MBMinObjectScreenSize.bRestrictToRecommended = false;
|
MBMinObjectScreenSize.bRestrictToRecommended = false;
|
||||||
|
|
||||||
|
// Lens Flare
|
||||||
|
FActorVariation LensFlareIntensity;
|
||||||
|
LensFlareIntensity.Id = TEXT("lens_flare_intensity");
|
||||||
|
LensFlareIntensity.Type = EActorAttributeType::Float;
|
||||||
|
LensFlareIntensity.RecommendedValues = { TEXT("0.1") };
|
||||||
|
LensFlareIntensity.bRestrictToRecommended = false;
|
||||||
|
|
||||||
|
// Bloom
|
||||||
|
FActorVariation BloomIntensity;
|
||||||
|
BloomIntensity.Id = TEXT("bloom_intensity");
|
||||||
|
BloomIntensity.Type = EActorAttributeType::Float;
|
||||||
|
BloomIntensity.RecommendedValues = { TEXT("0.675") };
|
||||||
|
BloomIntensity.bRestrictToRecommended = false;
|
||||||
|
|
||||||
// More info at:
|
// More info at:
|
||||||
// https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/AutomaticExposure/index.html
|
// https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/AutomaticExposure/index.html
|
||||||
// https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/DepthOfField/CinematicDOFMethods/index.html
|
// https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/DepthOfField/CinematicDOFMethods/index.html
|
||||||
|
@ -605,6 +619,8 @@ void UActorBlueprintFunctionLibrary::MakeCameraDefinition(
|
||||||
Gamma,
|
Gamma,
|
||||||
MBIntesity,
|
MBIntesity,
|
||||||
MBMaxDistortion,
|
MBMaxDistortion,
|
||||||
|
LensFlareIntensity,
|
||||||
|
BloomIntensity,
|
||||||
MBMinObjectScreenSize,
|
MBMinObjectScreenSize,
|
||||||
ExposureMinBright,
|
ExposureMinBright,
|
||||||
ExposureMaxBright,
|
ExposureMaxBright,
|
||||||
|
@ -1361,6 +1377,10 @@ void UActorBlueprintFunctionLibrary::SetCamera(
|
||||||
RetrieveActorAttributeToFloat("motion_blur_max_distortion", Description.Variations, 5.0f));
|
RetrieveActorAttributeToFloat("motion_blur_max_distortion", Description.Variations, 5.0f));
|
||||||
Camera->SetMotionBlurMinObjectScreenSize(
|
Camera->SetMotionBlurMinObjectScreenSize(
|
||||||
RetrieveActorAttributeToFloat("motion_blur_min_object_screen_size", Description.Variations, 0.5f));
|
RetrieveActorAttributeToFloat("motion_blur_min_object_screen_size", Description.Variations, 0.5f));
|
||||||
|
Camera->SetLensFlareIntensity(
|
||||||
|
RetrieveActorAttributeToFloat("lens_flare_intensity", Description.Variations, 0.1f));
|
||||||
|
Camera->SetBloomIntensity(
|
||||||
|
RetrieveActorAttributeToFloat("bloom_intensity", Description.Variations, 0.675f));
|
||||||
// Exposure
|
// Exposure
|
||||||
if (RetrieveActorAttributeToString("exposure_mode", Description.Variations, "manual") == "histogram")
|
if (RetrieveActorAttributeToString("exposure_mode", Description.Variations, "manual") == "histogram")
|
||||||
{
|
{
|
||||||
|
|
|
@ -366,6 +366,30 @@ float ASceneCaptureSensor::GetMotionBlurMinObjectScreenSize() const
|
||||||
return CaptureComponent2D->PostProcessSettings.MotionBlurPerObjectSize;
|
return CaptureComponent2D->PostProcessSettings.MotionBlurPerObjectSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ASceneCaptureSensor::SetLensFlareIntensity(float Intensity)
|
||||||
|
{
|
||||||
|
check(CaptureComponent2D != nullptr);
|
||||||
|
CaptureComponent2D->PostProcessSettings.LensFlareIntensity = Intensity;
|
||||||
|
}
|
||||||
|
|
||||||
|
float ASceneCaptureSensor::GetLensFlareIntensity() const
|
||||||
|
{
|
||||||
|
check(CaptureComponent2D != nullptr);
|
||||||
|
return CaptureComponent2D->PostProcessSettings.LensFlareIntensity;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ASceneCaptureSensor::SetBloomIntensity(float Intensity)
|
||||||
|
{
|
||||||
|
check(CaptureComponent2D != nullptr);
|
||||||
|
CaptureComponent2D->PostProcessSettings.BloomIntensity = Intensity;
|
||||||
|
}
|
||||||
|
|
||||||
|
float ASceneCaptureSensor::GetBloomIntensity() const
|
||||||
|
{
|
||||||
|
check(CaptureComponent2D != nullptr);
|
||||||
|
return CaptureComponent2D->PostProcessSettings.BloomIntensity;
|
||||||
|
}
|
||||||
|
|
||||||
void ASceneCaptureSensor::SetWhiteTemp(float Temp)
|
void ASceneCaptureSensor::SetWhiteTemp(float Temp)
|
||||||
{
|
{
|
||||||
check(CaptureComponent2D != nullptr);
|
check(CaptureComponent2D != nullptr);
|
||||||
|
|
|
@ -217,6 +217,18 @@ public:
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
float GetMotionBlurMinObjectScreenSize() const;
|
float GetMotionBlurMinObjectScreenSize() const;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
void SetLensFlareIntensity(float Intensity);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
float GetLensFlareIntensity() const;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
void SetBloomIntensity(float Intensity);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
float GetBloomIntensity() const;
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void SetWhiteTemp(float Temp);
|
void SetWhiteTemp(float Temp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue