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

[ui] Add and improve multiple UI tools for Photometric stereo #2444

Open
wants to merge 58 commits into
base: dev/qt6.6
Choose a base branch
from

Conversation

gregoire-dl
Copy link
Member

Description

Add the new QtAliceVision 2D viewer with toolbar and a new light direction controller.

A normal map with two light directions.

Add the ability to change the camera-relative light direction in the 3D viewer

Same object with two different light directions using the new light direction controller.

Improve SphereDetection widget in order to handle automatic detection of calibration spheres.

Automatically detected calibration sphere shown with the green circle.

Features list

  • Improve SphereDetection widget in order to handle automatic detection of calibration spheres.
  • Add the new QtAliceVision 2D viewer with Blinn-Phong model with shader control toolbar and light direction toolbar.
  • Add the ability to change the camera-relative light direction in the 3D viewer.

Implementation remarks

This PR is based on the Qt6 migration branch: https://github.com/alicevision/Meshroom/tree/dev/qt6.6
Linked to QtAliceVision PR: alicevision/QtAliceVision#72

This fixes all the "Injection of parameters into signal handlers
is deprecated. Use JavaScript functions with formal parameters instead."
warnings.
Qt3D.Extras cannot be updated to 2.6 yet, otherwise there are errors.
With Qt6, OpenGL is not used directly anymore, and we thus must use
the RHI backend, set to version 1.0.

The SphericalHarmonics shaders, which were previously written in OpenGL,
need to be updated accordingly.
Call the `QGeometry` objects from the correct module, and initialize
correctly the Camera object upon the construction of the
TrackballController object.
Additionally harmonize comments and explicitly declare parameters
for slots that need them.
`QtQuick.Window` does not exist anymore with Qt6. QQuickWindow is now
directly part of the QtQuick module.
When the SequencePlayer isn't available (when QtAliceVision has not been
loaded), the `viewer` element is null. All accesses to properties of this
object should thus be prevented.
This prevents crashes when the project is done loading but
`Application` is not yet ready.
cbentejac and others added 17 commits October 8, 2024 11:37
QMouseEvent::x() and QMouseEvent::y() have been marked as deprecated and
should be replaced with QMouseEvent::position().x() and
QMouseEvent::position().y().
The curve scale of the mouse area for an edge used to be defined when
initializing the `EdgeMouseArea` for that edge. Setting it triggers a
chain of event that allow the mouse area to be active, thus correctly
detecting when it is being hovered or clicked on.

With Qt6, these events unfolded before the `EdgeMouseArea` had finished
initializing, which then caused it to not be active until the edge's
shape was modified (and the chain of events triggered again). It is now
set once the component has been created, so all the events can happen
in an environment where they are taken into account.
The callbacks of `childrenRepeater` (which was used to "fill"
`ListAttributes` with children) were not correctly set. Their prototypes
were missing the `index` argument, meaning that instead of being
provided with the child attribute that was added or deleted,
they were provided with its index in the model.

The added children attributes were also instatiated as empty attribute
pins that were still visible, thus increasing indirectly the spacing of
the initial pin.
Use a single light entity instead of one per camera.
Use directional light instead of point light.
Add camera relative directional light controller.
Default camera up should be accurate and consistent with camera view center.
Default camera up vector is not refresh or checked when default camera view center is set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature (proposed as PR or issue planned by dev) review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants