In this post I’ll try to illuminate why these things behave the way they do, hoping that you’ll understand the constraints we’ve considered when we came up with the current behaviour…
In 2D, bodies have one degree of rotational freedom, so things are pretty simple in an app like Photoshop, which only deals with 2D stuff. On the other hand, when we add one more dimension, things become much more complicated! 3D modellers know that 3D bodies have three degrees of rotational freedom, which poses a problem: our commonly used input devices work with two dimensional data (i.e. cursor x,y position), which is not enough to cover the space of possible rotations.
Various applications use different techniques to work around this problem, each with their own tradeoffs. One way to do it is to simply throw away one degree of freedom, and map the x,y coordinates of the mouse to a two-dimensional subspace of all rotations. Basically all FPS games do this, where the x-displacement of the mouse rotates the camera around the world Z axis (here Z = up), and the y-displacement rotates around the camera’s X axis. This is mostly intuitive, because humans don’t often tilt their heads like dogs do, so people don’t miss this lost degree of rotational freedom from FPS games. This way of rotation is the default behaviour of most 3D modelling tools as well, because if you have a “ground plane” in your model (like the grid in Shapr3D), this technique will ensure that the horizon always stays level. This is also what Blender does by default, and this is what Fusion360 calls “Constrained Orbit”. This is also called “turntable-style camera motion”.
In Shapr3D, this means that the horizontal motion of your finger/cursor will rotate the camera around the normal vector of the grid (the Z axis with the default grid). This works very well in 3D, but consider what happens when you look straight down: horizontal motion of your finger causes the image to rotate clockwise/counterclockwise, and you will keep facing the grid. This is due to the fact that the normal vector of the grid points straight towards you. In 3D this is a pretty rare occurrence, so the turntable-style camera rotation is fine while we’re in 3D. But when you enter 2D mode by e.g. double-tapping a face, it is precisely this head-on grid scenario that we end up with! Some of you might remember that back in 2018 Shapr3D was using this turntable-style rotation even for rotating out of a 2D view, which was very annoying and counterintuitive, so we sought to improve on it: we knew that when rotating out of a 2D view, people expected the object on the screen to rotate as if they were dragging the surface of a ball. Geometrically speaking, this meant that the camera should rotate around an axis that’s perpendicular to the direction of the motion of your finger. This is sometimes called “trackball-style camera motion”, or “Free Orbit” in e.g. Fusion360.
The only problem with it, is that it produces a path-dependent camera trajectory: moving your cursor up 100 pixels and to the left 100 pixels produces a different camera orientation than moving it 100 pixels to the left and 100 pixels up. To get a feeling of what this means, play around with the demonstrations on this page: Internal Combustion Engine – Bartosz Ciechanowski . You will find that once you rotate the models a bit, it is very-very hard to get them back to their original upright orientation! This is due to the path-dependence of this rotation mechanism (which is due to the non-commutativity of 3D rotations), and this is why free orbit is not really a good choice when there’s a specific upright orientation of your model or a ground plane (i.e. grid).
So in Shapr3D, we do something clever: when you start dragging your finger to rotate out of the 2D view, we start rotating the camera with the “free orbit” way, but only until a certain threshold! Past this threshold, we start incrementally adjusting the rotation axis, so that at the end of the dragging, it will nicely line up with the normal vector of the grid, and you end up with the usual turntable-style rotation in 3D. This also ensures that there’s no way of quitting the 2D view such that you would end up with a non-level horizon in 3D.
In certain cases, this rotation axis correction can be up to 90 degrees, like when you try to rotate from the Top view to the Left/Right. It might feel similar to the gimbal lock phenomena that @dwineman talked about, but I can assure you that there’s no such thing going on - I have the source code in front of me, and it uses quaternions throughout
@robischulze, using a SpaceMouse will eliminate all of these issues, because unlike a regular mouse it has all 3 degrees of rotational freedom, so there’s no impedance mismatch between the input device and the geometric nature of 3D rotations.