polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

Suggestions on rotate/zoom/pan behavior

Open Kiord opened this issue 2 months ago • 3 comments

Hi, thanks for this great lib !

  • The recent feature that allows to select a focus point with ctr+shift+left click is very convenient.
  • The trackball follows the rule of path invariance which is great too !

However, I'd like to suggest other features that could improve the ergonomy when carefully inspecting a scene.

Rotate

Current trackball seems to be an azimuth/elevation control which is fine, but disallows roll completely. This "turntable" behavior might be desired, but a more standard approach is to use an azimuth/elevation behavior in the center of the viewport fading to a more roll-permissive behavior further from the center. This nice blog post from Scott Shambaugh summarizes different trackball implementations, including the standard OpenGL one.

Zoom

The default mouse scroll zoom should be relative (without pressing shift+ctrl). The absolute zoom is bad because zooming is supposed to give an impression of scaling things. When far from the scene, it is painfully slow, and way too sensitive near an object's surface.

Pan

Currently, panning the camera does not move the focus point which creates a incomfortable setup if the user decide to rotate again. I suggest to also translate the focus point by a same amount to prevent that. Also, the panning is absolute thus suffers from the same issues of the absolute zoom. I recommend to make it proportional to the distance between the eye and the focus point.

Lastly, I find the focus point picking so convenient I think it should be more accessible (maybe double click like in Meshlab ?)

Those are only suggestions of course.

Kiord avatar Dec 09 '25 13:12 Kiord

Hi, thanks for sharing!

Unfortunately it's impossible to make everyone happy when it comes to view navigation, so I have to be a bit opinionated, but there is certainly room for improvement. A few thoughts:

rolling

I'm reluctant to enable rolling in the default navigation. I think it's more often used accidentally than intentionally, for non-experts. However, we could enable it in an alternate navigation mode! Actually, there is a semi-secrete ArcBall camera mode from when I once tried to implement a more general arcball, but never got around to making it fully work. I'd happily merge a PR for that camera mode fixing it up and implementing the falloff-from-center behavior you describe.

relative zoom/pan

I'm reluctant to make this default, because content-dependent behavior can be non-obvious. Best to be simple! We should support it with an easy hotkey, though.

pan should move the rotation center point

I agree with this one, I've thought the same thing myself lately. The main reason I haven't done it yet that I try to very rarely break/modify existing behavior in Polyscope, but I think here it is worth it.

easier hotkey for focus point

I agree with this too! The ctrl-shift click is super cumbersome. I didn't realize Meshlab supported this with double click, it'd be great to match behavior!

nmwsharp avatar Dec 10 '25 06:12 nmwsharp

FYI I just pushed a few commits ending in 61fc32a which change the panning behavior and add the double-click hotkey.

nmwsharp avatar Dec 10 '25 08:12 nmwsharp

rolling

Yeah rolling can quickly mess up the view if the user is not used to. But disabling it completely makes it impossible to achieve certain view angles which can be frustrating. A very gentle fallof is good solution I think.

relative zoom/pan

Do you have an example of undesired effects ?

pan consistency & focus hotkey

I will appreciate these features a lot ! Meshlab also has a visible gizmo (on the focus/center point) and I think it also contributes to a solid grasp of the 3D orientation.

Kiord avatar Dec 10 '25 09:12 Kiord