Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hdri logic when reloading files #779

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions application/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions library/VTKExtensions/Rendering/vtkF3DRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionHDRIChange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionHDRIReload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions testing/recordings/TestInteractionHDRIChange.log
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions testing/recordings/TestInteractionHDRIReload.log
Original file line number Diff line number Diff line change
@@ -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