Updated ExposureCompensation

This commit is contained in:
Marc Garcia Puig 2020-09-17 15:40:52 +02:00
parent 943b04a580
commit 78c7564835
3 changed files with 13 additions and 7 deletions

View File

@ -441,7 +441,7 @@ void UActorBlueprintFunctionLibrary::MakeCameraDefinition(
FActorVariation ExposureCompensation;
ExposureCompensation.Id = TEXT("exposure_compensation");
ExposureCompensation.Type = EActorAttributeType::Float;
ExposureCompensation.RecommendedValues = { TEXT("-1.8") };
ExposureCompensation.RecommendedValues = { TEXT("0.0") };
ExposureCompensation.bRestrictToRecommended = false;
// - Manual ------------------------------------------------
@ -1399,7 +1399,7 @@ void UActorBlueprintFunctionLibrary::SetCamera(
Camera->SetExposureMethod(EAutoExposureMethod::AEM_Manual);
}
Camera->SetExposureCompensation(
RetrieveActorAttributeToFloat("exposure_compensation", Description.Variations, -1.8f));
RetrieveActorAttributeToFloat("exposure_compensation", Description.Variations, 0.0f));
Camera->SetShutterSpeed(
RetrieveActorAttributeToFloat("shutter_speed", Description.Variations, 200.0f));
Camera->SetISO(

View File

@ -110,12 +110,12 @@ EAutoExposureMethod ASceneCaptureSensor::GetExposureMethod() const
void ASceneCaptureSensor::SetExposureCompensation(float Compensation)
{
check(CaptureComponent2D != nullptr);
// Looks like windows and linux have different outputs with the
// same exposure compensation
#if PLATFORM_LINUX
CaptureComponent2D->PostProcessSettings.AutoExposureBias = Compensation;
// Looks like Windows and Linux have different outputs with the
// same exposure compensation, this fixes it.
CaptureComponent2D->PostProcessSettings.AutoExposureBias = Compensation - 1.5f;
#else
CaptureComponent2D->PostProcessSettings.AutoExposureBias = Compensation + 1.8f;
CaptureComponent2D->PostProcessSettings.AutoExposureBias = Compensation;
#endif
}
@ -563,6 +563,12 @@ namespace SceneCaptureSensor_local_ns {
// Color Grading
PostProcessSettings.bOverride_WhiteTemp = true;
PostProcessSettings.bOverride_WhiteTint = true;
PostProcessSettings.bOverride_ColorContrast = true;
#if PLATFORM_LINUX
// Looks like Windows and Linux have different outputs with the
// same exposure compensation, this fixes it.
PostProcessSettings.ColorContrast = FVector4(1.5f, 1.5f, 1.5f, 1.0f);
#endif
// Chromatic Aberration
PostProcessSettings.bOverride_SceneFringeIntensity = true;

View File

@ -120,7 +120,7 @@ if ${BUILD_CARLAUE4} ; then
# This command fails sometimes but normally we can continue anyway.
set +e
log "Generate Unreal project files."
${UE4_ROOT}/GenerateProjectFiles.sh -project="${PWD}/CarlaUE4.uproject" -game -engine -makefiles
${UE4_ROOT}/GenerateProjectFiles.sh -project="${PWD}/CarlaUE4.uproject" -game -engine -makefile
set -e
fi