From 39f7fc9d2560adbaf4f1b10dbb7366e66ee62d40 Mon Sep 17 00:00:00 2001 From: juaxix Date: Tue, 27 Feb 2018 16:39:11 +0100 Subject: [PATCH] Small changes in Carla plugin for settings --- Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.cpp | 6 +++--- .../Carla/Source/Carla/MapGen/CityMapMeshHolder.h | 2 +- .../Carla/Source/Carla/Settings/CarlaSettings.cpp | 11 +++++++---- .../Carla/Source/Carla/Settings/CarlaSettings.h | 8 ++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.cpp index a81d5e814..762192373 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.cpp @@ -1,9 +1,9 @@ // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "Carla.h" -#include "ISettingsModule.h" -#include "ISettingsSection.h" -#include "ISettingsContainer.h" +#include "Developer/Settings/Public/ISettingsModule.h" +#include "Developer/Settings/Public/ISettingsSection.h" +#include "Developer/Settings/Public/ISettingsContainer.h" #include "Settings/CarlaSettings.h" #define LOCTEXT_NAMESPACE "FCarlaModule" diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/MapGen/CityMapMeshHolder.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/MapGen/CityMapMeshHolder.h index b71f522ab..d442da740 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/MapGen/CityMapMeshHolder.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/MapGen/CityMapMeshHolder.h @@ -117,5 +117,5 @@ private: TArray MeshInstatiators; UPROPERTY(Category = "Meshes", EditAnywhere) - float MaxDrawDistance = 10000.0f; + float MaxDrawDistance = 10000.0f; /** @todo: move to carlasettings */ }; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp index 02d808b96..2aa09ca31 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp @@ -18,7 +18,7 @@ #include "Kismet/GameplayStatics.h" #include "Engine/DirectionalLight.h" #include "Engine/PointLight.h" -#include "Landscape.h" +//#include "Landscape.h" //--> needs Lanscape module in the build cs #include "Components/StaticMeshComponent.h" @@ -204,7 +204,7 @@ void UCarlaSettings::ApplyQualitySettingsLevelPostRestart() const world->Exec(world,TEXT("r.HZBOcclusion 0")); world->Exec(world,TEXT("r.MinScreenRadiusForLights 0.01")); world->Exec(world,TEXT("r.SeparateTranslucency 0")); - world->Exec(world,TEXT("r.FinishCurrentFrame 1")); + world->Exec(world,TEXT("r.FinishCurrentFrame 0")); world->Exec(world,TEXT("r.MotionBlurQuality 0")); world->Exec(world,TEXT("r.PostProcessAAQuality 0")); world->Exec(world,TEXT("r.BloomQuality 1")); @@ -226,14 +226,17 @@ void UCarlaSettings::ApplyQualitySettingsLevelPostRestart() const world->Exec(world,TEXT("r.Foliage.DitheredLOD 0")); world->Exec(world,TEXT("r.ForwardShading 0")); world->Exec(world,TEXT("sg.PostProcessQuality 0")); - world->Exec(world,TEXT("r.ViewDistanceScale 0.1")); + world->Exec(world,TEXT("r.ViewDistanceScale 0.1")); world->Exec(world,TEXT("sg.ShadowQuality 0")); world->Exec(world,TEXT("sg.TextureQuality 0")); world->Exec(world,TEXT("sg.EffectsQuality 0")); world->Exec(world,TEXT("FoliageQuality 0")); world->Exec(world,TEXT("foliage.DensityScale 0")); world->Exec(world,TEXT("grass.DensityScale 0")); - + world->Exec(world,TEXT("r.TranslucentLightingVolume 0")); + world->Exec(world,TEXT("r.LightShaftDownSampleFactor 4")); + world->Exec(world,TEXT("r.OcclusionQueryLocation 1")); + world->Exec(world,TEXT("r.BasePassOutputsVelocity 0")); //world->Exec(world,TEXT("r.DetailMode 0")); //-->will change to lods 0 //iterate all vehicles and people, set the draw distance TArray actors; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.h index 292f6f974..8f2bdd98a 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.h @@ -19,7 +19,7 @@ enum class EQualitySettingsLevel : uint8 Low UMETA(DisplayName = "Low"), Medium UMETA(DisplayName = "Medium"), High UMETA(DisplayName = "High"), - Epic UMETA(DisplayName = "Epic") , + Epic UMETA(DisplayName = "Epic") }; @@ -178,10 +178,10 @@ private: /** Quality Settings level. */ UPROPERTY(Category = "Quality Settings", VisibleAnywhere, meta =(AllowPrivateAccess="true")) EQualitySettingsLevel DefaultQualitySettingsLevel = EQualitySettingsLevel::None; - + public: - //UPROPERTY(Category = "Quality Settings", EditAnywhere, config) - //TArray RoadMaterials; + UPROPERTY(Category = "Quality Settings", EditAnywhere, config) + TArray> RoadMaterials; //distances UPROPERTY(Category = "Quality Settings/Low", EditAnywhere, config)