From f2e19232f4ac49d1d1e5f6a304a1e9d23eeabe5e Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 21 Dec 2024 20:55:45 +0100 Subject: [PATCH 1/6] Updating CLI options names for clarity progress -> loading-progress trackball -> interaction-trackball cells -> coloring-by-cells range -> coloring-range bar -> coloring-scalar-bar inverse -> volume-inverse samples -> raytracing-samples denoise -> raytracing-denoise ref -> reference ref-threshold -> reference-threshold --- .github/actions/generic-ci/action.yml | 6 +- application/F3DOptionsTools.cxx | 20 ++--- application/F3DOptionsTools.h | 20 ++--- application/F3DStarter.cxx | 4 +- application/testing/CMakeLists.txt | 82 ++++++++++----------- doc/GALLERY.md | 8 +- plugins/vdb/configs/config.d/10_vdb.json | 2 +- plugins/vdb/configs/thumbnail.d/10_vdb.json | 2 +- resources/configs/config.d/05_all.json | 2 +- 9 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.github/actions/generic-ci/action.yml b/.github/actions/generic-ci/action.yml index 93159c01f1..719523d3b2 100644 --- a/.github/actions/generic-ci/action.yml +++ b/.github/actions/generic-ci/action.yml @@ -350,7 +350,7 @@ runs: inputs.cpu != 'arm64' && inputs.static_label == 'no-static' && inputs.optional_deps_label == 'optional-deps' shell: bash working-directory: ${{github.workspace}}/install - run: F3D_PLUGINS_PATH=$(pwd)/../build_plugins/example-plugin${{ runner.os == 'Windows' && '/Release' || null }} ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --load-plugins=example --output=../install_example_plugin_output.png --ref=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --rendering-backend=${{ inputs.rendering_backend }} --verbose + run: F3D_PLUGINS_PATH=$(pwd)/../build_plugins/example-plugin${{ runner.os == 'Windows' && '/Release' || null }} ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --load-plugins=example --output=../install_example_plugin_output.png --reference=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --rendering-backend=${{ inputs.rendering_backend }} --verbose - name: Install plugin examples if: inputs.static_label == 'no-static' @@ -369,7 +369,7 @@ runs: shell: bash working-directory: ${{github.workspace}}/install run: | - ${{ env.F3D_BIN_PATH }} ../source/testing/data/dragon.vtu --output=output/install_output.png --ref=../source/.github/baselines/install_output.png --resolution=300,300 --colormap-file=viridis --coloring-component=0 --verbose --rendering-backend=${{ inputs.rendering_backend }} + ${{ env.F3D_BIN_PATH }} ../source/testing/data/dragon.vtu --output=output/install_output.png --reference=../source/.github/baselines/install_output.png --resolution=300,300 --colormap-file=viridis --coloring-component=0 --verbose --rendering-backend=${{ inputs.rendering_backend }} - name: Check Install plugins if: | @@ -379,7 +379,7 @@ runs: shell: bash working-directory: ${{github.workspace}}/install run: | - ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --output=../install_example_plugin_output.png --ref=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --verbose --rendering-backend=${{ inputs.rendering_backend }} + ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --output=../install_example_plugin_output.png --reference=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --verbose --rendering-backend=${{ inputs.rendering_backend }} - name: Upload Tests Install Artifact if: failure() diff --git a/application/F3DOptionsTools.cxx b/application/F3DOptionsTools.cxx index 2cda6d0e59..157610d89b 100644 --- a/application/F3DOptionsTools.cxx +++ b/application/F3DOptionsTools.cxx @@ -80,7 +80,7 @@ static inline const std::array CLIOptions = {{ { "screenshot-filename", "", "Screenshot filename", "", "" } } }, { "General", { { "verbose", "", "Set verbose level, providing more information about the loaded data in the console output", "{debug, info, warning, error, quiet}", "debug" }, - { "progress", "", "Show loading progress bar", "", "1" }, + { "loading-progress", "", "Show loading progress bar", "", "1" }, { "animation-progress", "", "Show animation progress bar", "", "1" }, { "multi-file-mode", "", R"(Choose the behavior when opening multiple files. "single" will show one file at a time, "all" will show all files in a single scene.)", "", "" }, { "up", "", "Up direction", "{-X, +X, -Y, +Y, -Z, +Z}", "" }, @@ -91,7 +91,7 @@ static inline const std::array CLIOptions = {{ { "grid-color", "", "Color of main grid lines", "", "" }, { "edges", "e", "Show cell edges", "", "1" }, { "camera-index", "", "Select the camera to use", "", "" }, - { "trackball", "k", "Enable trackball interaction", "", "1" }, + { "interaction-trackball", "k", "Enable trackball interaction", "", "1" }, { "invert-zoom", "", "Invert zoom direction with right mouse click", "", "1" }, { "animation-autoplay", "", "Automatically start animation", "", "1" }, { "animation-index", "", "Select animation to show", "", "" }, @@ -134,13 +134,13 @@ static inline const std::array CLIOptions = {{ { {"scalar-coloring", "s", "Color by a scalar array", "", "1" }, {"coloring-array", "", "Name of the array to color with", "", "" }, {"coloring-component", "y", "Component from the array to color with. -1 means magnitude, -2 or the short option, -y, means direct scalars", "", "-2"}, - {"cells", "c", "Use an array from the cells", "", "1"}, - {"range", "", "Custom range for the coloring by array, automatically computed by default", "", ""}, - {"bar", "b", "Show scalar bar", "", "1" }, + {"coloring-by-cells", "c", "Use an array from the cells", "", "1"}, + {"coloring-range", "", "Custom range for the coloring by array, automatically computed by default", "", ""}, + {"coloring-scalar-bar", "b", "Show scalar bar", "", "1" }, {"colormap-file", "", "Specify a colormap image", "", ""}, {"colormap", "", "Specify a custom colormap (ignored if \"colormap-file\" is specified)", "", ""}, {"volume", "v", "Show volume if the file is compatible", "", "1"}, - {"inverse", "i", "Inverse opacity function for volume rendering", "", "1"} } }, + {"volume-inverse", "i", "Inverse opacity function for volume rendering", "", "1"} } }, {"Camera", { {"camera-position", "", "Camera position (overrides camera direction and camera zoom factor if any)", "", ""}, {"camera-focal-point", "", "Camera focal point", "", ""}, @@ -155,8 +155,8 @@ static inline const std::array CLIOptions = {{ #if F3D_MODULE_RAYTRACING {"Raytracing", { {"raytracing", "r", "Enable raytracing", "", "1"}, - {"samples", "", "Number of samples per pixel", "", ""}, - {"denoise", "d", "Denoise the image", "", "1"} } }, + {"raytracing-samples", "", "Number of samples per pixel", "", ""}, + {"raytracing-denoise", "d", "Denoise the image", "", "1"} } }, #endif {"PostFX (OpenGL)", { {"translucency-support", "p", "Enable translucency support, implemented using depth peeling", "", "1"}, @@ -165,8 +165,8 @@ static inline const std::array CLIOptions = {{ {"tone-mapping", "t", "Enable Tone Mapping, providing balanced coloring", "", "1"}, {"final-shader", "", "Execute the final shader at the end of the rendering pipeline", "", ""} } }, {"Testing", - { {"ref", "", "Reference", "", ""}, - {"ref-threshold", "", "Testing threshold", "", ""}, + { {"reference", "", "Reference", "", ""}, + {"reference-threshold", "", "Testing threshold", "", ""}, {"interaction-test-record", "", "Path to an interaction log file to record interactions events to", "", ""}, {"interaction-test-play", "", "Path to an interaction log file to play interaction events from when loading a file", "", ""} } } }}; diff --git a/application/F3DOptionsTools.h b/application/F3DOptionsTools.h index 095dfbc0f2..e5013dbb94 100644 --- a/application/F3DOptionsTools.h +++ b/application/F3DOptionsTools.h @@ -51,8 +51,8 @@ static inline const OptionsDict DefaultAppOptions = { { "camera-zoom-factor", "0.0" }, { "camera-azimuth-angle", "0.0" }, { "camera-elevation-angle", "0.0" }, - { "ref", "" }, - { "ref-threshold", "0.04" }, + { "reference", "" }, + { "reference-threshold", "0.04" }, { "interaction-test-record", "" }, { "interaction-test-play", "" }, { "command-script", "" }, @@ -63,7 +63,7 @@ static inline const OptionsDict DefaultAppOptions = { * Mapping of CLI option name to their libf3d options name counterpart */ static inline const std::map LibOptionsNames = { - { "progress", "ui.loader_progress" }, + { "loading-progress", "ui.loader_progress" }, { "animation-progress", "ui.animation_progress" }, { "up", "scene.up_direction" }, { "axis", "ui.axis" }, @@ -74,7 +74,7 @@ static inline const std::map LibOptionsNames { "grid-color", "render.grid.color" }, { "edges", "render.show_edges" }, { "camera-index", "scene.camera.index" }, - { "trackball", "interactor.trackball" }, + { "interaction-trackball", "interactor.trackball" }, { "invert-zoom", "interactor.invert_zoom" }, { "animation-autoplay", "scene.animation.autoplay" }, { "animation-index", "scene.animation.index" }, @@ -110,16 +110,16 @@ static inline const std::map LibOptionsNames { "coloring-array", "model.scivis.array_name" }, { "light-intensity", "render.light.intensity" }, { "coloring-component", "model.scivis.component" }, - { "cells", "model.scivis.cells" }, - { "range", "model.scivis.range" }, - { "bar", "ui.scalar_bar" }, + { "coloring-by-cells", "model.scivis.cells" }, + { "coloring-range", "model.scivis.range" }, + { "coloring-scalar-bar", "ui.scalar_bar" }, { "colormap", "model.scivis.colormap" }, { "volume", "model.volume.enable" }, - { "inverse", "model.volume.inverse" }, + { "volume-inverse", "model.volume.inverse" }, { "camera-orthographic", "scene.camera.orthographic" }, { "raytracing", "render.raytracing.enable" }, - { "samples", "render.raytracing.samples" }, - { "denoise", "render.raytracing.denoise" }, + { "raytracing-samples", "render.raytracing.samples" }, + { "raytracing-denoise", "render.raytracing.denoise" }, { "translucency-support", "render.effect.translucency_support" }, { "ambient-occlusion", "render.effect.ambient_occlusion" }, { "anti-aliasing", "render.effect.anti_aliasing" }, diff --git a/application/F3DStarter.cxx b/application/F3DStarter.cxx index 8397737cc7..1a309fa770 100644 --- a/application/F3DStarter.cxx +++ b/application/F3DStarter.cxx @@ -578,8 +578,8 @@ class F3DStarter::F3DInternals f3d::options::parse(appOptions.at("camera-azimuth-angle")), f3d::options::parse(appOptions.at("camera-elevation-angle")) }; - this->AppOptions.Reference = f3d::options::parse(appOptions.at("ref")); - this->AppOptions.RefThreshold = f3d::options::parse(appOptions.at("ref-threshold")); + this->AppOptions.Reference = f3d::options::parse(appOptions.at("reference")); + this->AppOptions.RefThreshold = f3d::options::parse(appOptions.at("reference-threshold")); this->AppOptions.InteractionTestRecordFile = f3d::options::parse(appOptions.at("interaction-test-record")); this->AppOptions.InteractionTestPlayFile = diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index 51a6e2b18a..37b816d95f 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -48,10 +48,10 @@ function(f3d_test) endif() if(NOT F3D_TEST_NO_BASELINE) - list(APPEND F3D_TEST_ARGS "--ref=${F3D_SOURCE_DIR}/testing/baselines/${F3D_TEST_NAME}.png") + list(APPEND F3D_TEST_ARGS "--reference=${F3D_SOURCE_DIR}/testing/baselines/${F3D_TEST_NAME}.png") if(F3D_TEST_THRESHOLD) - list(APPEND F3D_TEST_ARGS "--ref-threshold=${F3D_TEST_THRESHOLD}") + list(APPEND F3D_TEST_ARGS "--reference-threshold=${F3D_TEST_THRESHOLD}") endif() endif() @@ -166,8 +166,8 @@ f3d_test(NAME TestPointCloudVolume DATA bluntfin.vts ARGS -sob) f3d_test(NAME TestPointCloudDefaultScene DATA pointsCloud.vtp ARGS --point-size=20) f3d_test(NAME Test3DSImporter DATA iflamigm.3ds ARGS --up=+Z) f3d_test(NAME TestScalars DATA suzanne.ply ARGS -s --coloring-array=Normals --coloring-component=1) -f3d_test(NAME TestScalarsCell DATA f3d.vtp ARGS --scalar-coloring --cells --coloring-component=-2 --up=+Z) -f3d_test(NAME TestScalarsRange DATA suzanne.ply ARGS -s --coloring-array=Normals --coloring-component=1 --range=0,1) +f3d_test(NAME TestScalarsCell DATA f3d.vtp ARGS --scalar-coloring --coloring-by-cells --coloring-component=-2 --up=+Z) +f3d_test(NAME TestScalarsRange DATA suzanne.ply ARGS -s --coloring-array=Normals --coloring-component=1 --coloring-range=0,1) f3d_test(NAME TestScalarsWithBar DATA suzanne.ply ARGS -b -s --coloring-array=Normals --coloring-component=0) f3d_test(NAME TestGLTFImporter DATA f3d.glb) f3d_test(NAME TestGLTFImporterWithAnimation DATA BoxAnimated.gltf ARGS --animation-time=2 --animation-progress) @@ -195,7 +195,7 @@ f3d_test(NAME TestVolumeInverse DATA HeadMRVolume.mhd ARGS -vi --camera-position f3d_test(NAME TestVolumeMag DATA vase_4comp.vti ARGS -vb) f3d_test(NAME TestVolumeComp DATA vase_4comp.vti ARGS -vb --coloring-component=3 LONG_TIMEOUT) f3d_test(NAME TestVolumeDirect DATA vase_4comp.vti ARGS -vb --coloring-component=-2) -f3d_test(NAME TestVolumeCells DATA waveletArrays.vti ARGS -vb --cells) +f3d_test(NAME TestVolumeCells DATA waveletArrays.vti ARGS -vb --coloring-by-cells) f3d_test(NAME TestVolumeColoringArray DATA waveletArrays.vti ARGS -vb --coloring-array=Result LONG_TIMEOUT) f3d_test(NAME TestTextureNormal DATA WaterBottle.glb ARGS --texture-normal=${F3D_SOURCE_DIR}/testing/data/normal.png --normal-scale=0.1) f3d_test(NAME TestTextureMaterial DATA WaterBottle.glb ARGS --texture-material=${F3D_SOURCE_DIR}/testing/data/red_mod.jpg --roughness=1 --metallic=1) @@ -223,7 +223,7 @@ f3d_test(NAME TestMaxSizeAboveMultiFile DATA suzanne.obj WaterBottle.glb ARGS -- f3d_test(NAME TestAlternativeOptionSyntax DATA WaterBottle.glb ARGS --max-size 0.2 REGEXP "file is bigger than max size" NO_BASELINE) f3d_test(NAME TestNonExistentFile DATA nonExistentFile.vtp ARGS --filename WILL_FAIL) f3d_test(NAME TestUnsupportedFile DATA unsupportedFile.dummy ARGS --filename WILL_FAIL) -f3d_test(NAME TestComponentName DATA from_abq.vtu ARGS --scalar-coloring --bar --coloring-component=2) +f3d_test(NAME TestComponentName DATA from_abq.vtu ARGS --scalar-coloring --coloring-scalar-bar --coloring-component=2) f3d_test(NAME TestNoRender DATA dragon.vtu NO_RENDER) f3d_test(NAME TestNoRenderWithOptions DATA dragon.vtu ARGS --hdri-ambient --axis NO_RENDER) # These options causes issues if not handled correctly f3d_test(NAME TestNoFile NO_DATA_FORCE_RENDER) @@ -232,7 +232,7 @@ f3d_test(NAME TestMultiFileColoring DATA mb/recursive ARGS --multi-file-mode=all f3d_test(NAME TestMultiFileVolume DATA multi ARGS --multi-file-mode=all -vsb --coloring-array=Scalars_) f3d_test(NAME TestMultiFileColoringTexture DATA mb/recursive/mb_1_0.vtp mb/recursive/mb_2_0.vtp world.obj ARGS --multi-file-mode=all -sb --coloring-array=Normals --coloring-component=1) f3d_test(NAME TestMultiFilePositionals DATA mb/recursive/mb_0_0.vtu mb/recursive/mb_1_0.vtp ARGS --multi-file-mode=all -s --coloring-array=Polynomial -b) -f3d_test(NAME TestMultiFileNonCoherentComponentNames DATA bluntfin.vts bluntfin_t.vtu ARGS --multi-file-mode=all --scalar-coloring --coloring-array=Momentum --coloring-component=2 --bar) +f3d_test(NAME TestMultiFileNonCoherentComponentNames DATA bluntfin.vts bluntfin_t.vtu ARGS --multi-file-mode=all --scalar-coloring --coloring-array=Momentum --coloring-component=2 --coloring-scalar-bar) f3d_test(NAME TestMultiInputArg ARGS --input ${F3D_SOURCE_DIR}/testing/data/mb/recursive/mb_0_0.vtu ${F3D_SOURCE_DIR}/testing/data/mb/recursive/mb_1_0.vtp --multi-file-mode=all -s --coloring-array=Polynomial -b) f3d_test(NAME TestMultiInputMultiArgs ARGS --input ${F3D_SOURCE_DIR}/testing/data/mb/recursive/mb_0_0.vtu --input ${F3D_SOURCE_DIR}/testing/data/mb/recursive/mb_1_0.vtp --multi-file-mode=all -s --coloring-array=Polynomial -b) f3d_test(NAME TestInvalidUpDirection DATA suzanne.ply ARGS -g --up=W REGEXP "W is not a valid up direction" NO_BASELINE) @@ -262,11 +262,11 @@ function(f3d_ss_test) cmake_parse_arguments(F3D_SS_TEST "MINIMAL" "NAME;TEMPLATE;EXPECTED;DEPENDS" "ARGS" ${ARGN}) if(NOT F3D_SS_TEST_MINIMAL) f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME} DATA suzanne.ply ARGS --screenshot-filename=${F3D_SS_TEST_TEMPLATE} --dry-run --interaction-test-play=${F3D_SOURCE_DIR}/testing/recordings/TestScreenshot.log NO_BASELINE DEPENDS TestSetupScreenshots) - f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME}File DATA suzanne.ply ARGS --ref=${F3D_SS_TEST_EXPECTED} DEPENDS TestScreenshot${F3D_SS_TEST_NAME} ${F3D_SS_TEST_DEPENDS} NO_BASELINE) + f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME}File DATA suzanne.ply ARGS --reference=${F3D_SS_TEST_EXPECTED} DEPENDS TestScreenshot${F3D_SS_TEST_NAME} ${F3D_SS_TEST_DEPENDS} NO_BASELINE) else() # show filename, axes, fps before the "minimal screenshot" interaction; compare with --no-background only f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME} DATA suzanne.ply ARGS --screenshot-filename=${F3D_SS_TEST_TEMPLATE} --dry-run -nxz --interaction-test-play=${F3D_SOURCE_DIR}/testing/recordings/TestScreenshotMinimal.log NO_BASELINE DEPENDS TestSetupScreenshots) - f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME}File DATA suzanne.ply ARGS --no-background --ref=${F3D_SS_TEST_EXPECTED} DEPENDS TestScreenshot${F3D_SS_TEST_NAME} ${F3D_SS_TEST_DEPENDS} NO_BASELINE) + f3d_test(NAME TestScreenshot${F3D_SS_TEST_NAME}File DATA suzanne.ply ARGS --no-background --reference=${F3D_SS_TEST_EXPECTED} DEPENDS TestScreenshot${F3D_SS_TEST_NAME} ${F3D_SS_TEST_DEPENDS} NO_BASELINE) endif() endfunction() function(f3d_ss_template_test) @@ -490,17 +490,17 @@ if(VTK_VERSION VERSION_GREATER_EQUAL 9.2.20221220) if(F3D_MODULE_RAYTRACING) # XXX: These tests are impacted by https://github.com/f3d-app/f3d/issues/933 - f3d_test(NAME TestHDRIRaytracing DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --samples=4) - f3d_test(NAME TestHDRIRaytracingSkyboxOnly DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-skybox -rd --samples=4 LONG_TIMEOUT) - f3d_test(NAME TestHDRIRaytracingAmbientOnly DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-ambient -rd --samples=4 LONG_TIMEOUT) - f3d_test(NAME TestHDRIRaytracingAmbientOnlyNoBackground DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-ambient -rd --samples=4 --no-background LONG_TIMEOUT) - f3d_test(NAME TestHDRIRaytracingNone DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr -rd --samples=4 LONG_TIMEOUT) - - f3d_test(NAME TestInteractionHDRIRaytracingRemoveSkybox DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --samples=4 INTERACTION) - f3d_test(NAME TestInteractionHDRIRaytracingRemoveAmbient DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --samples=4 INTERACTION) - f3d_test(NAME TestInteractionHDRIRaytracingRemoveBoth DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --samples=4 INTERACTION) - f3d_test(NAME TestInteractionHDRIRaytracingLoop DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --samples=4 INTERACTION) - f3d_test(NAME TestInteractionHDRIRaytracingFullFromNone DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr -rd --samples=4 INTERACTION LONG_TIMEOUT) + f3d_test(NAME TestHDRIRaytracing DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --raytracing-samples=4) + f3d_test(NAME TestHDRIRaytracingSkyboxOnly DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-skybox -rd --raytracing-samples=4 LONG_TIMEOUT) + f3d_test(NAME TestHDRIRaytracingAmbientOnly DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-ambient -rd --raytracing-samples=4 LONG_TIMEOUT) + f3d_test(NAME TestHDRIRaytracingAmbientOnlyNoBackground DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr --hdri-ambient -rd --raytracing-samples=4 --no-background LONG_TIMEOUT) + f3d_test(NAME TestHDRIRaytracingNone DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr -rd --raytracing-samples=4 LONG_TIMEOUT) + + f3d_test(NAME TestInteractionHDRIRaytracingRemoveSkybox DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --raytracing-samples=4 INTERACTION) + f3d_test(NAME TestInteractionHDRIRaytracingRemoveAmbient DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --raytracing-samples=4 INTERACTION) + f3d_test(NAME TestInteractionHDRIRaytracingRemoveBoth DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --raytracing-samples=4 INTERACTION) + f3d_test(NAME TestInteractionHDRIRaytracingLoop DATA suzanne.ply HDRI palermo_park_1k.hdr ARGS -rd --raytracing-samples=4 INTERACTION) + f3d_test(NAME TestInteractionHDRIRaytracingFullFromNone DATA suzanne.ply ARGS --hdri-file=${F3D_SOURCE_DIR}/testing/data/palermo_park_1k.hdr -rd --raytracing-samples=4 INTERACTION LONG_TIMEOUT) endif() endif() @@ -516,21 +516,21 @@ if(VTK_VERSION VERSION_GREATER_EQUAL 9.2.20230603) endif() if(F3D_MODULE_RAYTRACING) - f3d_test(NAME TestRaytracingGLTF DATA WaterBottle.glb ARGS -rd --samples=4) - f3d_test(NAME TestRaytracingBackground DATA suzanne.ply ARGS -rd --samples=4 --background-color=1,0,0 THRESHOLD 0.05) # Threshold needed because of difference in rendering in VTK 9.3 - f3d_test(NAME TestRaytracingPointCloud DATA pointsCloud.vtp ARGS -rd --samples=4 --point-size=20 THRESHOLD 0.1) # Threshold needed because of difference in rendering in VTK 9.3 - f3d_test(NAME TestRaytracingDenoise DATA suzanne.ply ARGS -rd --samples=4) - f3d_test(NAME TestRaytracingNoDenoise DATA suzanne.ply ARGS -r --samples=20) + f3d_test(NAME TestRaytracingGLTF DATA WaterBottle.glb ARGS -rd --raytracing-samples=4) + f3d_test(NAME TestRaytracingBackground DATA suzanne.ply ARGS -rd --raytracing-samples=4 --background-color=1,0,0 THRESHOLD 0.05) # Threshold needed because of difference in rendering in VTK 9.3 + f3d_test(NAME TestRaytracingPointCloud DATA pointsCloud.vtp ARGS -rd --raytracing-samples=4 --point-size=20 THRESHOLD 0.1) # Threshold needed because of difference in rendering in VTK 9.3 + f3d_test(NAME TestRaytracingDenoise DATA suzanne.ply ARGS -rd --raytracing-samples=4) + f3d_test(NAME TestRaytracingNoDenoise DATA suzanne.ply ARGS -r --raytracing-samples=20) f3d_test(NAME TestVersionRaytracing ARGS --version REGEXP "Module Raytracing: ON") - f3d_test(NAME TestInteractionRaytracingDenoise DATA suzanne.ply ARGS --samples=4 INTERACTION) #RD - f3d_test(NAME TestRaytracingScalarBar DATA dragon.vtu ARGS -rsbd --samples=4 THRESHOLD 0.06) # Threshold needed because of difference in rendering in VTK 9.3 on macOS + f3d_test(NAME TestInteractionRaytracingDenoise DATA suzanne.ply ARGS --raytracing-samples=4 INTERACTION) #RD + f3d_test(NAME TestRaytracingScalarBar DATA dragon.vtu ARGS -rsbd --raytracing-samples=4 THRESHOLD 0.06) # Threshold needed because of difference in rendering in VTK 9.3 on macOS if(NOT F3D_MACOS_BUNDLE) - f3d_test(NAME TestRaytracingDefaultConfigFile DATA dragon.vtu CONFIG config_build ARGS -rd --samples=4 LONG_TIMEOUT TONE_MAPPING) - f3d_test(NAME TestRaytracingThumbnailConfigFile DATA dragon.vtu CONFIG thumbnail_build ARGS -rd --samples=4 LONG_TIMEOUT TONE_MAPPING) + f3d_test(NAME TestRaytracingDefaultConfigFile DATA dragon.vtu CONFIG config_build ARGS -rd --raytracing-samples=4 LONG_TIMEOUT TONE_MAPPING) + f3d_test(NAME TestRaytracingThumbnailConfigFile DATA dragon.vtu CONFIG thumbnail_build ARGS -rd --raytracing-samples=4 LONG_TIMEOUT TONE_MAPPING) endif() - f3d_test(NAME TestRaytracingNoBackground DATA suzanne.ply ARGS -rd --samples=4 --no-background) + f3d_test(NAME TestRaytracingNoBackground DATA suzanne.ply ARGS -rd --raytracing-samples=4 --no-background) else(F3D_MODULE_RAYTRACING) f3d_test(NAME TestCommandScriptRaytracingNoRaytracing DATA suzanne.ply SCRIPT TestCommandScriptRaytracing.txt NO_BASELINE REGEXP "Raytracing options can't be used if F3D has not been built with raytracing") @@ -639,7 +639,7 @@ if(F3D_PLUGIN_BUILD_EXODUS) f3d_test(NAME TestAnimationGenericImporter DATA small.ex2 ARGS -sb --load-plugins=exodus --animation-time=0.003 --animation-progress) # Test animation with generic importer, coloring and a custom scalar range - f3d_test(NAME TestAnimationGenericImporterScalarRange DATA small.ex2 ARGS -sb --load-plugins=exodus --animation-time=0.003 --animation-progress --range=0,1e7) + f3d_test(NAME TestAnimationGenericImporterScalarRange DATA small.ex2 ARGS -sb --load-plugins=exodus --animation-time=0.003 --animation-progress --coloring-range=0,1e7) # Test Generic Importer Verbose animation. Regex contains the time range. f3d_test(NAME TestVerboseAnimationSingleTimestep DATA single_timestep.e ARGS --load-plugins=exodus --verbose NO_BASELINE REGEXP "time range delta is invalid") @@ -734,7 +734,7 @@ if(F3D_PLUGIN_BUILD_USD) endif() if(F3D_PLUGIN_BUILD_VDB) - f3d_test(NAME TestVDBVolume DATA icosahedron.vdb ARGS --load-plugins=vdb --volume --inverse) + f3d_test(NAME TestVDBVolume DATA icosahedron.vdb ARGS --load-plugins=vdb --volume --volume-inverse) f3d_test(NAME TestVDBPoints DATA sphere_points.vdb ARGS --load-plugins=vdb -o) f3d_test(NAME TestVDBVerbose DATA icosahedron.vdb ARGS --load-plugins=vdb REGEXP "PartitionedDataSet" NO_RENDER) @@ -822,9 +822,9 @@ f3d_test(NAME TestInteractionSwitchFilePrevCameraKeeping DATA cow.vtp cowlow.vtp f3d_test(NAME TestInteractionSwitchFileNextCameraKeeping DATA cow.vtp cowlow.vtp INTERACTION) # Progress test -f3d_test(NAME TestProgress DATA cow.vtp ARGS --progress NO_BASELINE) -f3d_test(NAME TestProgressScene DATA WaterBottle.glb ARGS --progress NO_BASELINE) -f3d_test(NAME TestInteractionProgressReload DATA cow.vtp ARGS --progress NO_BASELINE INTERACTION) #Up;Up;Up;Up +f3d_test(NAME TestProgress DATA cow.vtp ARGS --loading-progress NO_BASELINE) +f3d_test(NAME TestProgressScene DATA WaterBottle.glb ARGS --loading-progress NO_BASELINE) +f3d_test(NAME TestInteractionProgressReload DATA cow.vtp ARGS --loading-progress NO_BASELINE INTERACTION) #Up;Up;Up;Up f3d_test(NAME TestInteractionAnimationCycleAnimation DATA InterpolationTest.glb INTERACTION) #WWWWWWWWWWW;Space;Space; f3d_test(NAME TestInteractionCycleAnimationNoAnimation DATA cow.vtp INTERACTION NO_BASELINE) #W @@ -862,7 +862,7 @@ endif() ## Tests to increase coverage # Output option test f3d_test(NAME TestOutput DATA cow.vtp NO_BASELINE) -f3d_test(NAME TestOutputOutput DATA cow.vtp ARGS --ref=${CMAKE_BINARY_DIR}/Testing/Temporary/TestOutput.png DEPENDS TestOutput NO_BASELINE) +f3d_test(NAME TestOutputOutput DATA cow.vtp ARGS --reference=${CMAKE_BINARY_DIR}/Testing/Temporary/TestOutput.png DEPENDS TestOutput NO_BASELINE) f3d_test(NAME TestUnsupportedInputOutput DATA unsupportedFile.dummy REGEXP "No files loaded, no rendering performed" NO_BASELINE) f3d_test(NAME TestOutputNoBackground DATA cow.vtp ARGS --no-background NO_BASELINE) @@ -874,7 +874,7 @@ f3d_test(NAME TestInteractionRecord DATA cow.vtp ARGS --interaction-test-record= f3d_test(NAME TestInteractionPlay DATA cow.vtp ARGS --interaction-test-play=${CMAKE_BINARY_DIR}/Testing/Temporary/interaction.log DEPENDS TestInteractionRecord NO_BASELINE) # Command Script Test -f3d_test(NAME TestCommandScriptBasic DATA dragon.vtu SCRIPT TestCommandScriptBasic.txt --ref=${F3D_SOURCE_DIR}/testing/baselines/TestCommandScriptBasic.png) +f3d_test(NAME TestCommandScriptBasic DATA dragon.vtu SCRIPT TestCommandScriptBasic.txt --reference=${F3D_SOURCE_DIR}/testing/baselines/TestCommandScriptBasic.png) f3d_test(NAME TestCommandScriptInvalidCommand DATA dragon.vtu SCRIPT TestCommandScriptInvalid.txt REGEXP "Command: \"INVALID_COMMAND_1\" is not recognized, ignoring" NO_BASELINE) f3d_test(NAME TestCommandScriptMissingFile DATA dragon.vtu SCRIPT TestCommandScriptMissingFile.txt REGEXP "Unable to open command script file" NO_BASELINE) f3d_test(NAME TestParseOptionalBoolExtraArg DATA dragon.vtu SCRIPT TestParseOptionalBoolExtraArg.txt REGEXP "Command: load_previous_file_group takes at most 1 argument, got 2 arguments instead." NO_BASELINE) @@ -953,7 +953,7 @@ f3d_test(NAME TestVerboseVolumeNoArray DATA cow.vtp ARGS -v REGEXP "Cannot use v f3d_test(NAME TestVerboseNoArray DATA cow.vtp ARGS -s --verbose=debug REGEXP "No array to color with" NO_BASELINE) # Test invalid scalar range -f3d_test(NAME TestInvalidScalarsRange DATA suzanne.ply ARGS -s --coloring-array=Normals --coloring-component=1 --range=0,1,2 REGEXP "Invalid scalar range provided, using automatic range" NO_BASELINE) +f3d_test(NAME TestInvalidScalarsRange DATA suzanne.ply ARGS -s --coloring-array=Normals --coloring-component=1 --coloring-range=0,1,2 REGEXP "Invalid scalar range provided, using automatic range" NO_BASELINE) # Test invalid backface type f3d_test(NAME TestInvalidBackface DATA backface.vtp ARGS --backface-type=invalid REGEXP "is not a valid backface type, assuming it is not set" NO_BASELINE) @@ -1111,7 +1111,7 @@ add_test(NAME f3d::TestInvalidCLIArgs COMMAND $ --up) set_tests_properties(f3d::TestInvalidCLIArgs PROPERTIES PASS_REGULAR_EXPRESSION "Error parsing command line arguments") # Test that f3d resolution can be controlled from config file -add_test(NAME f3d::TestConfigResolution COMMAND $ --config=${F3D_SOURCE_DIR}/testing/configs/resolution.json ${F3D_SOURCE_DIR}/testing/data/suzanne.stl --output=${CMAKE_BINARY_DIR}/Testing/Temporary/TestConfigResolution.png --ref=${F3D_SOURCE_DIR}/testing/baselines/TestConfigResolution.png) +add_test(NAME f3d::TestConfigResolution COMMAND $ --config=${F3D_SOURCE_DIR}/testing/configs/resolution.json ${F3D_SOURCE_DIR}/testing/data/suzanne.stl --output=${CMAKE_BINARY_DIR}/Testing/Temporary/TestConfigResolution.png --reference=${F3D_SOURCE_DIR}/testing/baselines/TestConfigResolution.png) # Test filename template with multiple files add_test(NAME f3d::TestMultiFileFileNameTemplate COMMAND $ ${F3D_SOURCE_DIR}/testing/data/suzanne.stl ${F3D_SOURCE_DIR}/testing/data/dragon.vtu --output=${CMAKE_BINARY_DIR}/Testing/Temporary/{model.ext}.png --multi-file-mode=all --verbose) @@ -1126,13 +1126,13 @@ set_tests_properties(f3d::TestNoFileFileNameTemplate PROPERTIES ENVIRONMENT "CTE f3d_test(NAME TestNoRef DATA cow.vtp WILL_FAIL) # Test failure without a reference and without an output, please do not create a TestNoRef.png file -f3d_test(NAME TestNoRefNoOutput DATA cow.vtp ARGS --ref=${F3D_SOURCE_DIR}/testing/baselines/TestNoRef.png REGEXP "use the output option to output current rendering into an image file." NO_BASELINE NO_OUTPUT) +f3d_test(NAME TestNoRefNoOutput DATA cow.vtp ARGS --reference=${F3D_SOURCE_DIR}/testing/baselines/TestNoRef.png REGEXP "use the output option to output current rendering into an image file." NO_BASELINE NO_OUTPUT) # Test failure with a bad reference, please do not create a good TestBadRef.png file f3d_test(NAME TestBadRef DATA cow.vtp WILL_FAIL) # Test failure with a bad reference without an output, please do not create a good TestBadRef.png file -f3d_test(NAME TestBadRefNoOutput DATA cow.vtp ARGS --ref=${F3D_SOURCE_DIR}/testing/baselines/TestBadRef.png REGEXP "Use the --output option to be able to output current rendering and diff images into files." NO_BASELINE NO_OUTPUT) +f3d_test(NAME TestBadRefNoOutput DATA cow.vtp ARGS --reference=${F3D_SOURCE_DIR}/testing/baselines/TestBadRef.png REGEXP "Use the --output option to be able to output current rendering and diff images into files." NO_BASELINE NO_OUTPUT) # Test failure with a bad interaction play file, please do not create a dummy.log f3d_test(NAME TestPlayNoFile DATA cow.vtp ARGS --interaction-test-play=${CMAKE_BINARY_DIR}/Testing/Temporary/dummy.log WILL_FAIL) diff --git a/doc/GALLERY.md b/doc/GALLERY.md index 1148143e73..01993b9fb4 100644 --- a/doc/GALLERY.md +++ b/doc/GALLERY.md @@ -25,11 +25,11 @@ Images and videos displayed below use public datasets, you can download them [he -*Raytraced CAD assembly*: `f3d 202.vtp -xtgans -rd --samples=10 --range=-2,9` +*Raytraced CAD assembly*: `f3d 202.vtp -xtgans -rd --raytracing-samples=10 --coloring-range=-2,9` -*Volume rendering of a security bag scan*: `f3d backpack.vti -vmn --range=300,1000 --colormap=0,0,0,0,1,1,1,1` +*Volume rendering of a security bag scan*: `f3d backpack.vti -vmn --coloring-range=300,1000 --colormap=0,0,0,0,1,1,1,1` @@ -53,11 +53,11 @@ Images and videos displayed below use public datasets, you can download them [he -*Visualization of a CFD velocity field*: `f3d single-pin.vtp -xtbgans --range=-2,8 --colormap=0,0.3,0.7,0,0.7,0,0.1,1,1,0.8,0.8,0` +*Visualization of a CFD velocity field*: `f3d single-pin.vtp -xtbgans --coloring-range=-2,8 --colormap=0,0.3,0.7,0,0.7,0,0.1,1,1,0.8,0.8,0` -*Volume rendering of a medical skull scan*: `f3d skull.vti -vxbt --range=40,200 --camera-direction=1,0,0` +*Volume rendering of a medical skull scan*: `f3d skull.vti -vxbt --coloring-range=40,200 --camera-direction=1,0,0` diff --git a/plugins/vdb/configs/config.d/10_vdb.json b/plugins/vdb/configs/config.d/10_vdb.json index 270834cfb9..bfc35f8c79 100644 --- a/plugins/vdb/configs/config.d/10_vdb.json +++ b/plugins/vdb/configs/config.d/10_vdb.json @@ -5,7 +5,7 @@ { "load-plugins": "vdb", "volume": true, - "inverse": true + "volume-inverse": true } } ] diff --git a/plugins/vdb/configs/thumbnail.d/10_vdb.json b/plugins/vdb/configs/thumbnail.d/10_vdb.json index 270834cfb9..bfc35f8c79 100644 --- a/plugins/vdb/configs/thumbnail.d/10_vdb.json +++ b/plugins/vdb/configs/thumbnail.d/10_vdb.json @@ -5,7 +5,7 @@ { "load-plugins": "vdb", "volume": true, - "inverse": true + "volume-inverse": true } } ] diff --git a/resources/configs/config.d/05_all.json b/resources/configs/config.d/05_all.json index 270d21481f..2c9ac39a57 100644 --- a/resources/configs/config.d/05_all.json +++ b/resources/configs/config.d/05_all.json @@ -5,7 +5,7 @@ "axis": true, "tone-mapping": true, "grid": true, - "progress": true, + "loading-progress": true, "anti-aliasing": true, "filename": true, "camera-direction": "-1,-0.5,-1", From 806476b3230dbd84b53de97e33d94a0fb06c4d89 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 21 Dec 2024 17:43:51 +0100 Subject: [PATCH 2/6] fixup clf --- application/F3DStarter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/F3DStarter.cxx b/application/F3DStarter.cxx index 1a309fa770..954569f91b 100644 --- a/application/F3DStarter.cxx +++ b/application/F3DStarter.cxx @@ -579,7 +579,8 @@ class F3DStarter::F3DInternals f3d::options::parse(appOptions.at("camera-elevation-angle")) }; this->AppOptions.Reference = f3d::options::parse(appOptions.at("reference")); - this->AppOptions.RefThreshold = f3d::options::parse(appOptions.at("reference-threshold")); + this->AppOptions.RefThreshold = + f3d::options::parse(appOptions.at("reference-threshold")); this->AppOptions.InteractionTestRecordFile = f3d::options::parse(appOptions.at("interaction-test-record")); this->AppOptions.InteractionTestPlayFile = From 64bdc81670f86f6bcc8e9f900d1ebe5951e3fb61 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 21 Dec 2024 19:34:13 +0100 Subject: [PATCH 3/6] more config changes --- plugins/exodus/configs/config.d/10_exodus.json | 2 +- plugins/native/configs/config.d/10_native.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/exodus/configs/config.d/10_exodus.json b/plugins/exodus/configs/config.d/10_exodus.json index bff22ed3cb..702e785fe4 100644 --- a/plugins/exodus/configs/config.d/10_exodus.json +++ b/plugins/exodus/configs/config.d/10_exodus.json @@ -5,7 +5,7 @@ { "scalar-coloring": true, "load-plugins": "exodus", - "bar": true + "coloring-scalar-bar": true } } ] diff --git a/plugins/native/configs/config.d/10_native.json b/plugins/native/configs/config.d/10_native.json index 64144b5a8a..1111588fc7 100644 --- a/plugins/native/configs/config.d/10_native.json +++ b/plugins/native/configs/config.d/10_native.json @@ -4,7 +4,7 @@ "options": { "scalar-coloring": true, - "bar": true + "coloring-scalar-bar": true } }, { From cb3002919a202050452ddf4ec75df3a2ce57da83 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 21 Dec 2024 22:09:55 +0100 Subject: [PATCH 4/6] fixup --- testing/configs/complex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/configs/complex.json b/testing/configs/complex.json index 524ed1c725..664b168a00 100644 --- a/testing/configs/complex.json +++ b/testing/configs/complex.json @@ -12,7 +12,7 @@ "options": { "up": "+Y", - "bar": true, + "coloring-scalar-bar": true, "render.effect.ambient_occlusion": true, "filename": true } From f1c6ecaf94f2e5680e0582993073c645d6a310da Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sun, 22 Dec 2024 08:14:12 +0100 Subject: [PATCH 5/6] more fixups --- plugins/occt/configs/config.d/10_occt.json | 2 +- plugins/occt/configs/thumbnail.d/10_occt.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/occt/configs/config.d/10_occt.json b/plugins/occt/configs/config.d/10_occt.json index 50d548be1d..746e84e06f 100644 --- a/plugins/occt/configs/config.d/10_occt.json +++ b/plugins/occt/configs/config.d/10_occt.json @@ -8,7 +8,7 @@ "up": "+Z", "ambient-occlusion": true, "coloring-component": "-2", - "cells": true, + "coloring-by-cells": true, "camera-direction": "-1,1,-0.5" } } diff --git a/plugins/occt/configs/thumbnail.d/10_occt.json b/plugins/occt/configs/thumbnail.d/10_occt.json index 50d548be1d..746e84e06f 100644 --- a/plugins/occt/configs/thumbnail.d/10_occt.json +++ b/plugins/occt/configs/thumbnail.d/10_occt.json @@ -8,7 +8,7 @@ "up": "+Z", "ambient-occlusion": true, "coloring-component": "-2", - "cells": true, + "coloring-by-cells": true, "camera-direction": "-1,1,-0.5" } } From 77491f40b4c3c4b3cf2206d50b15fcf1f091204e Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sun, 22 Dec 2024 08:42:13 +0100 Subject: [PATCH 6/6] another fix --- plugins/native/configs/config.d/10_native.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/native/configs/config.d/10_native.json b/plugins/native/configs/config.d/10_native.json index 1111588fc7..1ba30fca45 100644 --- a/plugins/native/configs/config.d/10_native.json +++ b/plugins/native/configs/config.d/10_native.json @@ -60,7 +60,7 @@ "coloring-component": "-2", "background-color": "0, 0, 0", "up": "-Y", - "trackball": true, + "interaction-trackball": true, "camera-position": "0,1,-5.2", "camera-focal-point": "0,1,0", "tone-mapping": false,