Commit graph

125 commits

Author SHA1 Message Date
Julien-Haudegond
c45d29976b [ui] Viewer3D: specific bounding box options in the Inspector3D 2020-08-13 14:24:44 +02:00
Julien-Haudegond
f2a75861c3 [ui] Viewer3D: better bounding box appearance
- Add edges to the bounding box. Appearance inspired by Blender.
- Better gizmo integration over the scene.
2020-08-13 14:24:44 +02:00
Julien-Haudegond
4ab412dd90 [ui] Viewer3D: move bounding box display to Inspector3D 2020-08-13 14:24:44 +02:00
Julien-Haudegond
6103a4937f [ui] Viewer3D: TransformGizmo - fix reset transformations 2020-08-13 14:24:44 +02:00
Julien-Haudegond
208114653a [ui] Viewer3D: bounding box linked to meshing node 2020-08-13 14:24:44 +02:00
Julien-Haudegond
f4e73117a7 [ui] Viewer3D: add a BoundingBox entity 2020-08-13 14:24:44 +02:00
Julien-Haudegond
7663a6a44b [ui] Viewer3D: TransformGizmo - preparing for the bounding box 2020-08-13 14:24:44 +02:00
Julien-Haudegond
d0a78d96ab [ui] Viewer3D: TransformGizmo - ready to be set with absolute values
- Now, we can set the transformation with a position vector, Euler angles and a scale vector.
2020-08-13 14:24:44 +02:00
Julien-Haudegond
da765a5f98 [ui] Viewer3D: TransformGizmo - moving transform operations to Python
- Moving transform operations from QML to Python to get access to more Qt functionalities and to make a better separation of logic/display.
2020-08-13 14:24:44 +02:00
Julien-Haudegond
cb306ffc7d [ui] Viewer3D: DefaultCameraController - removing FrameAction
- Apply the same control handling as the TransformGizmo.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
b234a766a9 [ui] Viewer3D: TransformGizmo - removing FrameAction
- Moving the mouse's dependent events inside the MouseHandler and removing the FrameAction.
- MouseHandler is only enabled when the gizmo is selected. There is no infinite loop waiting for an event.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
f9d57cadff [ui] Viewer3D: TransformGizmo - add reset transform option
- Right clicking on the gizmo allows to reset the specific transformation.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
85ebbba14f [ui] Viewer3D: TransformGizmo - drawing gizmo on top of the object
- Special entity acting as an object container: we can add the entities we want to control with a gizmo inside it.
- Drawing the gizmo always on top of the object to make sure to see it every time.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
bdf9d74ec8 [ui] Viewer3D: TransformGizmo - cleaning and renaming 2020-08-13 14:22:19 +02:00
Julien-Haudegond
d04eaaccfc [ui] Viewer3D: TransformGizmo - new mouse handling rotation
- Rotation is the result angle of the mouse rotation around the gizmo's center. It is quite user-friendly.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
414a865dff [ui] Viewer3D: TransformGizmo - clean parameter names 2020-08-13 14:22:19 +02:00
Julien-Haudegond
ad2f287b66 [ui] Viewer3D: TransformGizmo - clean mouse handling translation 2020-08-13 14:22:19 +02:00
Julien-Haudegond
cd630418e4 [ui] Viewer3D: TransformGizmo - new mouse handling scale
- Scale is computed using the distance between the gizmo's center and the mouse. The scale unit (where nothing changes) is defined by the distance between the gizmo's center and the picked position.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
fb3b541a7f [ui] Viewer3D: TransformGizmo - new mouse handling translation
- Translations are computed using the dot product between the mouse vector (picked position to current position) and the projected picked axis vector. Like this, the behaviour is a lot more natural and user-friendly.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
29c4be6210 [ui] Viewer3D: TransformGizmo - use one global FrameAction
- Use only one global FrameAction instead of having one per axis
2020-08-13 14:22:19 +02:00
Julien-Haudegond
6a9f229838 [ui] Viewer3D: TransformGizmo - individual color picking 2020-08-13 14:22:19 +02:00
Julien-Haudegond
45fae981ba [ui] Viewer3D: TransformGizmo - add picking and transformations
- For now, transformations do not take well in count the orientation of the mouse but gizmo is functional.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
30004fe690 [ui] Viewer3D: TransformGizmo - add needed mathematics functions
- Add Quaternions functions
- Add Matrices computation functions
2020-08-13 14:22:19 +02:00
Julien-Haudegond
98936b97d5 [ui] Viewer3D: add a Transform Gizmo Component
- Visual entity is done
- Need to make it pickable and to apply changes
2020-08-13 14:22:19 +02:00
Fabien Castan
778c88583c [ui] typo in comment 2020-06-30 22:07:14 +02:00
Yann Lanthony
3ae95869bd [ui] Viewer3D: introduce SphericalHarmonics shader + display mode
Add experimental render mode to display model normals or shading based on spherical harmonics coefficients
2020-05-25 22:47:09 +02:00
Yann Lanthony
5a4384916e
[ui][3D] expose status on EnvironmentMapEntity
get loading status when env map is loading in 3D view
2019-12-13 17:17:03 +01:00
Yann Lanthony
63ffb20819
[ui][3D] add EnvironmentMapEntity to display equirectangular images
Load EXR files in the 3D viewport as environment maps mapped on a sphere "attached"  to the camera.
* improve exr loading strategy by considering depthmaps and env maps
* update to DepthMapEntity 2.1 (required to get the loading status)
2019-12-13 17:17:03 +01:00
Yann Lanthony
1c873508ef
[ui] Inspector3D: double click on media now sets node as "active"
To be consistent with the Graph Editor behavior, double clicking on a node sets it as the active node of its type. This, for example, enables to switch from one SfM to another from the media list.
2019-09-11 10:49:09 +02:00
Yann Lanthony
03e91bea49
[ui] Inspector3D: simplify handling of scene media items hovering
* add MouseArea at root of media
* use flow to display media info and avoid text clipping
2019-09-11 10:49:09 +02:00
Yann Lanthony
312b9f5e0b
[ui] Inspector3D: provide camera from Viewer3D 2019-09-11 10:09:27 +02:00
Yann Lanthony
2a3093b292
[ui] AlembicLoader: only select cameras on still left-clicks
don't trigger Camera selection if mouse has moved to rotate camera
2019-09-10 19:43:14 +02:00
Yann Lanthony
796517ccb1
[ui] AlembicLoader: use CuboidMesh extent to disable picking
Using an additional scale Transform changes Cuboid's size relatively to the Camera locator, which was unwanted.
2019-09-10 19:41:38 +02:00
Yann Lanthony
6e47235c9c
[ui] Viewer3D: don't display contextual menu on alt+right-click zoom
Only prompt right-click contextual menu when it was not used to zoom in the 3D view.
2019-09-10 19:37:54 +02:00
Yann Lanthony
8dce4fc72f
[ui] Viewer3D: add "Sync with Image Selection" camera mode
* Inspector
   * changed "SETTINGS" to "DISPLAY"
   * new "CAMERA" section: activate camera synchronization + control image overlay
* ImageOverlay: new component to display (undistorted) image on top of the 3D view
* ViewpointCamera: new component that sets up a Camera based on a Viewpoint internal parameter
* Viewer3D: additional ViewpointCamera to perform synchronization with image selection
* Viewer3DSettings: new properties related to camera synchronization mode
2019-09-10 19:33:55 +02:00
Yann Lanthony
774675bd65
[ui] Viewer3D: move Inspector3D outside Viewer3D
Inspector3D is not an overlay anymore to simplify 3D manipulations, by having view center at the center of the 3D view.
2019-09-10 19:28:14 +02:00
Yann Lanthony
606cfc39c2
[ui] Viewer3D: fix Alembic visibility issues
Binding the "enabled" property of AlembicLoader's ObjectPicker to the parent MediaLoader's own "enabled" property caused invalid state where the loaded AlembicEntity was partially visible when toggling object visibility (since Qt 5.13).
In order to disable camera picking when AlembicEntity is disable, scale the camSelector component to 0.
2019-08-12 17:58:43 +02:00
Yann Lanthony
aff5a98a4b
[ui] Viewer3D: use RenderSettings.Always renderPolicy
Since Qt-5.13, RenderSettings.OnDemand can lead to rendering issues due to non-triggered updates (e.g: when resizing the viewport or changing visibilities of objects displayed).
2019-07-24 18:04:39 +02:00
Yann Lanthony
cee8d1b612
[ui] Viewer3D: add support for vertex-colored meshes
Use PerVertexColorMaterial if any vertex color data is available on a mesh without textures.
2019-07-10 16:35:44 +02:00
Yann Lanthony
2b07699f65
[ui] Viewer3D: improved trackball parameters
Make trackball larger and adjust rotation speed to make 3D navigation easier.
2019-06-26 12:57:30 +02:00
Yann Lanthony
438622a14b
[ui] Introduce ClipboardHelper for copying to clipboard from QML
* add ClipboardHelper class that contains a QClipboard and exposes its method as Slots
* use Clipboard instead of hidden TextEdit where meaningful
2019-05-07 11:47:09 +02:00
Yann Lanthony
da1b842493 [ui] MediaLibrary: enable dynamicRoles on mediaModel
If an outside 3D media file is the first thing ever loaded, 'model.attribute' will be initialized to 'null' and will prevent an actual Attribute to be associated to this role. This breaks media loading from within Meshroom.
2019-02-07 19:55:05 +01:00
Yann Lanthony
6199de0b45 [ui] Inspector3D: improve pointSize/cameraScale sliders
* reduce pointSize maximum value for better precision
* replace texts by icon
* add tooltips with values
2019-02-07 19:11:06 +01:00
Yann Lanthony
a9cb4afe2a [ui] DepthMapLoader: update to DepthMapEntity 2.0
* map render modes to custom visualization modes
2019-02-07 18:27:29 +01:00
Yann Lanthony
9bd53c7c89 [ui] CameraController: check KeyboardHandler status for all actions with modifiers 2019-02-07 18:24:52 +01:00
Yann Lanthony
829aa24a4a [ui] CameraController: avoid allocating new objects on bindings
Change existing objects values instead of re-creating point/size objects, on bindings that can be evaluated very often.
2019-02-07 18:14:16 +01:00
Yann Lanthony
1793a30861 [ui][Viewer3D] Locator3D: properly initialize buffers with 'new'
Fix crash using PySide2 5.12: "calling a TypedArray constructor without new is invalid"
2019-02-06 14:37:53 +01:00
Yann Lanthony
971d4d7f0e [ui][Viewer3D] MediaCache: add debug mode
add 'debug' mode to ease debugging of 3D Media cache
2019-01-31 16:12:42 +01:00
Yann Lanthony
6a297d5bff [ui][Viewer3D] fix cache update and reparenting issues
* don't try to put object in cache on MediaLoader 'Component.onCompleted' callback ; only effect was to put back in cache a media retrieved from cache during 'onFinalSourceChanged'
* redesign 'updateModelAndCache' as 'updateModel' and 'updateCacheAndModel' for this purpose
* wait for MediaLoader full initialization (@ 'NodeInstiator.onObjectAdded' callback) to reparent an object retrieved from cache; otherwise it silently fails.
2019-01-31 16:07:33 +01:00
Yann Lanthony
10c3454bad [ui][3D] MediaLoader: bind 'enabled' property of AlembicEntity
Ensure AlembicEntity is properly disabled when parent is. Fix pickable hidden cameras issue.
2019-01-31 15:58:23 +01:00