From f7d3466ab88102701e19437daed283937e400d97 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Wed, 26 Apr 2023 20:48:01 +0800 Subject: [PATCH 1/2] Fix a missing HDRI on reload --- library/VTKExtensions/Rendering/vtkF3DRenderer.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/VTKExtensions/Rendering/vtkF3DRenderer.cxx b/library/VTKExtensions/Rendering/vtkF3DRenderer.cxx index 4ead86ee20..3fd09d9f8a 100644 --- a/library/VTKExtensions/Rendering/vtkF3DRenderer.cxx +++ b/library/VTKExtensions/Rendering/vtkF3DRenderer.cxx @@ -177,6 +177,11 @@ void vtkF3DRenderer::Initialize(const std::string& up) this->AddActor(this->MetaDataActor); this->AddActor(this->CheatSheetActor); + if (this->HasHDRI) + { + this->AddActor(this->Skybox); + } + this->GridConfigured = false; this->CheatSheetConfigured = false; this->ActorsPropertiesConfigured = false; From bef025f32f91780bb9084ca51c356c85dd64fde8 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Wed, 26 Apr 2023 20:54:20 +0800 Subject: [PATCH 2/2] Adding a test --- application/testing/CMakeLists.txt | 2 ++ testing/baselines/TestInteractionHDRIChange.png | 3 +++ testing/baselines/TestInteractionHDRIReload.png | 3 +++ testing/recordings/TestInteractionHDRIChange.log | 6 ++++++ testing/recordings/TestInteractionHDRIReload.log | 6 ++++++ 5 files changed, 20 insertions(+) create mode 100644 testing/baselines/TestInteractionHDRIChange.png create mode 100644 testing/baselines/TestInteractionHDRIReload.png create mode 100644 testing/recordings/TestInteractionHDRIChange.log create mode 100644 testing/recordings/TestInteractionHDRIReload.log diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index 0990908e19..0bc361b7c0 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -281,6 +281,8 @@ if(VTK_VERSION VERSION_GREATER_EQUAL 9.2.20221220) f3d_test(NAME TestHDRIToneMapping DATA suzanne.ply ARGS -t --hdri=${CMAKE_SOURCE_DIR}/testing/data/palermo_park_1k.hdr HDRI) f3d_test(NAME TestInteractionHDRIMove DATA suzanne.ply ARGS --hdri=${CMAKE_SOURCE_DIR}/testing/data/palermo_park_1k.hdr HDRI INTERACTION) #Shift+MouseRight; f3d_test(NAME TestInteractionHDRIBlur DATA suzanne.ply ARGS --hdri=${CMAKE_SOURCE_DIR}/testing/data/palermo_park_1k.hdr INTERACTION HDRI DEFAULT_LIGHTS) #U + f3d_test(NAME TestInteractionHDRIReload DATA suzanne.ply ARGS --hdri=${CMAKE_SOURCE_DIR}/testing/data/palermo_park_1k.hdr INTERACTION HDRI DEFAULT_LIGHTS) #Up + f3d_test(NAME TestInteractionHDRIChange DATA multi ARGS --hdri=${CMAKE_SOURCE_DIR}/testing/data/palermo_park_1k.hdr INTERACTION HDRI DEFAULT_LIGHTS) #Right configure_file("${CMAKE_SOURCE_DIR}/testing/configs/hdri.json.in" "${CMAKE_BINARY_DIR}/hdri.json") f3d_test(NAME TestConfigFileHDRI DATA dragon.vtu CONFIG "${CMAKE_BINARY_DIR}/hdri.json" HDRI DEFAULT_LIGHTS) diff --git a/testing/baselines/TestInteractionHDRIChange.png b/testing/baselines/TestInteractionHDRIChange.png new file mode 100644 index 0000000000..30dab85a0c --- /dev/null +++ b/testing/baselines/TestInteractionHDRIChange.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:190f63a2ee4342ebd95503c5850b9cfc29e4c85589a7370d66b67af89bcfed12 +size 94040 diff --git a/testing/baselines/TestInteractionHDRIReload.png b/testing/baselines/TestInteractionHDRIReload.png new file mode 100644 index 0000000000..2b9b1a13bd --- /dev/null +++ b/testing/baselines/TestInteractionHDRIReload.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86b59c3f940e54531aa45f460bfe69e13e4a1befc4ef77fd87c6650b760f59bf +size 88182 diff --git a/testing/recordings/TestInteractionHDRIChange.log b/testing/recordings/TestInteractionHDRIChange.log new file mode 100644 index 0000000000..43b1358fae --- /dev/null +++ b/testing/recordings/TestInteractionHDRIChange.log @@ -0,0 +1,6 @@ +# StreamVersion 1.1 +ExposeEvent 0 599 0 0 0 0 +RenderEvent 0 599 0 0 0 0 +KeyPressEvent 354 650 0 0 1 Right +CharEvent 354 650 0 0 1 Right +KeyReleaseEvent 354 650 0 0 1 Right diff --git a/testing/recordings/TestInteractionHDRIReload.log b/testing/recordings/TestInteractionHDRIReload.log new file mode 100644 index 0000000000..e5e8a57f25 --- /dev/null +++ b/testing/recordings/TestInteractionHDRIReload.log @@ -0,0 +1,6 @@ +# StreamVersion 1.1 +ExposeEvent 0 599 0 0 0 0 +RenderEvent 0 599 0 0 0 0 +KeyPressEvent 354 650 0 0 1 Up +CharEvent 354 650 0 0 1 Up +KeyReleaseEvent 354 650 0 0 1 Up