Skip to content

Conversation

@ViperMiniQ
Copy link
Contributor

@ViperMiniQ ViperMiniQ commented Dec 18, 2025

This PR adds a slider that controls the point of switching between rendering overview only and rendering a sub index of the VPC.

The slider is more aggressive going to the right, less aggressive going to the left.

On 2D map canvas, if the average extent width of the sub indexes multiplied by the value from the slider is higher than the viewable map canvas, a sub index is loaded, otherwise overview only gets rendered.

Similarly, in the 3D Map, multiplier is applied on the sub index bounding box and if the camera is located within the box, sub index is fully loaded and rendered, if the camera is outside the box, overview only is rendered.

One change is that when all the sub indexes are shown in the 3D Map, we disable overview rendering to save resources.

2d overview rendering

3d vpc overview

@github-actions github-actions bot added this to the 4.0.0 milestone Dec 18, 2025
@github-actions
Copy link
Contributor

Tests failed for Qt 6 (ALL_BUT_PROVIDERS - ubuntu)

One or more tests failed using the build from commit a9eb485

virtual_pointcloud_3d_overview (testPointCloud3DOverview)

virtual_pointcloud_3d_overview

Test failed at testPointCloud3DOverview at tests/src/3d/testqgspointcloud3drendering.cpp:619

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

@github-actions
Copy link
Contributor

Tests failed for Qt 6 (ALL_BUT_PROVIDERS - fedora)

One or more tests failed using the build from commit a9eb485

virtual_pointcloud_3d_overview (testPointCloud3DOverview)

virtual_pointcloud_3d_overview

Test failed at testPointCloud3DOverview at tests/src/3d/testqgspointcloud3drendering.cpp:619

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit c1369c3)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit c1369c3)

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 3, 2026
@wonder-sk wonder-sk removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 7, 2026
@qgis qgis deleted a comment from github-actions bot Jan 7, 2026
slider holds values with which the sub index extent/3d bounding box is mutliplied by and depending on the map canvas containing the extent or camera being within the scaled bounding box, we render the full sub index or just the overview
@ViperMiniQ ViperMiniQ force-pushed the vpc-overview-loading-distance branch from 8657483 to e68fb10 Compare January 7, 2026 09:47
rename zoomOutMultiplier to overviewSwitchingScale
@ViperMiniQ ViperMiniQ changed the title [Virtual Point Clouds] Add slider to adjust the switching between rendering overview only and sub index rendering [Virtual Point Clouds] Add combobox to adjust the switching between rendering overview only and sub index rendering Jan 12, 2026
@ViperMiniQ ViperMiniQ closed this Jan 12, 2026
@ViperMiniQ ViperMiniQ reopened this Jan 12, 2026
<widget class="QComboBox" name="mZoomOutOptions"/>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="mOverviewSwitchingScale"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a tooltip for the combo box?
Something along the lines:

Sets the zoom level at which the individual point cloud files will get rendered instead of the overview or their extents.\n
Normal means roughly when the point cloud extent no longer fits the map extent.\n
Select Earlier to switch at a smaller scale (zoomed out) or Later to switch at a larger scale (zoomed in). 

Qgis::PointCloudZoomOutRenderBehavior zoomOutBehavior() const { return mZoomOutBehavior; }

/**
* Sets the overview switching scale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expand the two docstrings to explain the effect it has / how it works?

@@ -712,6 +712,18 @@ class CORE_EXPORT QgsPointCloudRenderer
*/
Qgis::PointCloudZoomOutRenderBehavior zoomOutBehavior() const { return mZoomOutBehavior; }

/**
* Sets the overview switching scale
* \since QGIS 4.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for these

@@ -64,7 +64,16 @@ class GUI_EXPORT QgsPointCloudRendererPropertiesWidget : public QgsMapLayerConfi
void emitWidgetChanged();

private:
const QMap<double, QString> mOverviewSwitchingScaleMap {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that we have a similar setting for 3D in QgsPointCloud3DSymbolWidget, so we update them in parallel? (also a comment in QgsPointCloud3DSymbolWidget pointing here too)

Copy link
Contributor

@uclaros uclaros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now!

@uclaros uclaros added Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Jan 26, 2026
@qgis-bot
Copy link
Collaborator

@ViperMiniQ
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

@ViperMiniQ

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog Items that are queued to appear in the visual changelog - remove after harvesting Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Point Clouds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants