diff --git a/CHANGELOG.md b/CHANGELOG.md index 117bbdbce..6e8fd2cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## Latest + + * Vulkan support: Changed project settings to make vulkan default on linux and updated make script to allow user to select opengl * Add ability to set motion blur settings for rgb camera in sensor python blueprint * Improved visual quality of the screen capture for the rgb sensor - Enabled Temporal AA for screen captures with no post-processing to prevent jaggies during motion diff --git a/Docs/configuring_the_simulation.md b/Docs/configuring_the_simulation.md index 84e3caaa1..e4c19ef9f 100644 --- a/Docs/configuring_the_simulation.md +++ b/Docs/configuring_the_simulation.md @@ -72,9 +72,16 @@ Running off-screen In Linux, you can force the simulator to run off-screen by setting the environment variable `DISPLAY` to empty +!!! important + **DISPLAY= only works with OpenGL**
+ Vulkan is now the default graphics API used by Unreal Engine and CARLA on + Linux. Unreal Engine currently crashes when Vulkan is used when running off-screen. + Therefore the -opengl flag must be added to force the engine to use OpenGL instead. + We hope that this issue is addressed by Epic in the near future. + ```sh # Linux -DISPLAY= ./CarlaUE4.sh +DISPLAY= ./CarlaUE4.sh -opengl ``` This launches the simulator without simulator window, of course you can still diff --git a/Jenkinsfile b/Jenkinsfile index 2ff98fc87..f6850464c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -65,7 +65,7 @@ pipeline { stage('Smoke Tests') { steps { - sh 'DISPLAY= ./Dist/*/LinuxNoEditor/CarlaUE4.sh --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &' + sh 'DISPLAY= ./Dist/*/LinuxNoEditor/CarlaUE4.sh -opengl --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &' sh 'make smoke_tests ARGS="--xml"' sh 'make run-examples ARGS="localhost 3654"' } diff --git a/Unreal/CarlaUE4/Config/DefaultEngine.ini b/Unreal/CarlaUE4/Config/DefaultEngine.ini index d3dbd0d64..28a4dfca9 100644 --- a/Unreal/CarlaUE4/Config/DefaultEngine.ini +++ b/Unreal/CarlaUE4/Config/DefaultEngine.ini @@ -40,14 +40,6 @@ RuntimeGeneration=Static [/Script/AIModule.CrowdManager] MaxAgents=1000 -[/Script/LinuxTargetPlatform.LinuxTargetSettings] -SpatializationPlugin= -ReverbPlugin= -OcclusionPlugin= --TargetedRHIs=SF_VULKAN_SM5 --TargetedRHIs=GLSL_430 -+TargetedRHIs=GLSL_430 - [/Script/Engine.PhysicsSettings] DefaultGravityZ=-980.000000 DefaultTerminalVelocity=4000.000000 @@ -55,7 +47,6 @@ DefaultFluidFriction=0.300000 SimulateScratchMemorySize=262144 RagdollAggregateThreshold=4 TriangleMeshTriangleMinAreaThreshold=5.000000 -bEnableAsyncScene=False bEnableShapeSharing=False bEnablePCM=False bEnableStabilization=False @@ -88,8 +79,17 @@ bSubsteppingAsync=False MaxSubstepDeltaTime=0.016667 MaxSubsteps=6 SyncSceneSmoothingFactor=0.000000 -AsyncSceneSmoothingFactor=0.990000 InitialAverageFrameRate=0.016667 PhysXTreeRebuildRate=10 DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2) +[/Script/LinuxTargetPlatform.LinuxTargetSettings] +SpatializationPlugin= +ReverbPlugin= +OcclusionPlugin= +-TargetedRHIs=SF_VULKAN_SM5 +-TargetedRHIs=GLSL_430 ++TargetedRHIs=SF_VULKAN_SM5 ++TargetedRHIs=GLSL_430 + + diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp index a131f8943..41a7eb818 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp @@ -15,7 +15,7 @@ #if PLATFORM_WINDOWS # define CARLA_WITH_VULKAN_SUPPORT 1 #else -# define CARLA_WITH_VULKAN_SUPPORT 0 +# define CARLA_WITH_VULKAN_SUPPORT 1 #endif // ============================================================================= diff --git a/Util/BuildTools/BuildCarlaUE4.sh b/Util/BuildTools/BuildCarlaUE4.sh index 02d442299..56a734ca3 100755 --- a/Util/BuildTools/BuildCarlaUE4.sh +++ b/Util/BuildTools/BuildCarlaUE4.sh @@ -18,7 +18,7 @@ fi DOC_STRING="Build and launch CarlaUE4." -USAGE_STRING="Usage: $0 [-h|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean]" +USAGE_STRING="Usage: $0 [-h|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean] [--opengl]" REMOVE_INTERMEDIATE=false HARD_CLEAN=false @@ -26,8 +26,9 @@ BUILD_CARLAUE4=false LAUNCH_UE4_EDITOR=false GDB= +RHI="-vulkan" -OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb -n 'parse-options' -- "$@"` +OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl -n 'parse-options' -- "$@"` if [ $? != 0 ] ; then echo "$USAGE_STRING" ; exit 2 ; fi @@ -55,6 +56,9 @@ while true; do REMOVE_INTERMEDIATE=true; HARD_CLEAN=true; shift ;; + --opengl ) + RHI="-opengl"; + shift ;; -h | --help ) echo "$DOC_STRING" echo "$USAGE_STRING" @@ -138,7 +142,7 @@ fi if ${LAUNCH_UE4_EDITOR} ; then log "Launching UE4Editor..." - ${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject" + ${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject" ${RHI} else