Pick rotation center

To post any request/idea for new functionalities
Post Reply
Aarie
Posts: 43
Joined: Sun Apr 27, 2014 10:07 am
Location: Berlin

Pick rotation center

Post by Aarie »

Hey Daniel,
would it be possible to add a short-cut for selecting the rotation center? It would make the navigation of pointcloud much more efficient since changing the rotation point is done quite frequently and always selecting the small icon is somewhat cumbersome.

Or as an alternative, one could do it similiarly to meshlab, double-clicking in the pointcloud sets the rotation center.
Cheers.
Arie.
jedfrechette
Posts: 45
Joined: Mon Jan 20, 2014 6:31 pm
Location: Albuquerque, NM
Contact:

Re: Pick rotation center

Post by jedfrechette »

Even better would be to rotate around the point underneath the cursor. That is, do a ray cast every time the user clicks the mouse to initiate a rotation and use the first point found as the rotation center. This method works really well for efficiently navigating around irregularly shaped objects. Of course, there needs to be a fall back in case the rotation is initiated when the cursor is not over an object in the scene, in which case the previous rotation center or some other sensible location can be used.

This change is also high on the list of UI improvements I would like to make when I've got some time to dive in to CC coding.
Jed
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Pick rotation center

Post by daniel »

Yes, I think the 'double click' idea has already been proposed (we 'just' have to implement it ;). And the shortcut would also be very easy.

For the dynamic ray cast, I fear it would be too much CPU intensive. Or we would have to compute the octree for all entities, all the time... That could be an option of course.
Daniel, CloudCompare admin
jedfrechette
Posts: 45
Joined: Mon Jan 20, 2014 6:31 pm
Location: Albuquerque, NM
Contact:

Re: Pick rotation center

Post by jedfrechette »

daniel wrote:For the dynamic ray cast, I fear it would be too much CPU intensive. Or we would have to compute the octree for all entities, all the time... That could be an option of course.
I think this would be interesting to test. In my experience with other applications that aren't backed by a spatial data structure like an octree, but still do this, getting a dynamic rotation center doesn't cause a noticeable slow down. This is even true for the ones with much worse overall viewport performance than CC. I'm not an OpenGL expert, but it seems like there might also be some clever tricks to achieve a similar behavior without doing an actual ray cast since we could live with coordinates that are close, but maybe not exact.

Speaking as someone who typically works with large mostly asymmetrical point clouds, having a static rotation center is almost unusable. Making it easier to move the center would certainly help, but it still adds up to a lot of extra clicks.
Jed
Aarie
Posts: 43
Joined: Sun Apr 27, 2014 10:07 am
Location: Berlin

Re: Pick rotation center

Post by Aarie »

Hey,
as great as Jeds suggestion is, I would really appreciate a simple shortcut for changing the rotation center.
I've been doing a lot of work in CC recently and this would definetely help for now.
Cheers!
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Pick rotation center

Post by daniel »

I've played with these concepts today and here what I managed to add:
- by default the 3D views are now in 'auto center picking mode' which will automatically set the point at the center of the screen as the rotation center
- otherwise this mode can be deactivated (there's a new checkable icon on the left side toolbar) and the rotation center can now be picked by double clicking anywhere on a 3D entity

I've updated the 2.9 beta version online. I'll let you play with it.
Daniel, CloudCompare admin
jedfrechette
Posts: 45
Joined: Mon Jan 20, 2014 6:31 pm
Location: Albuquerque, NM
Contact:

Re: Pick rotation center

Post by jedfrechette »

Very cool. I'm just curious though why you opted for the center of the screen rather than the mouse cursor as the rotation point?

I haven't had a chance to test in CC yet, but from regularly using software that implements both behaviors I find rotation around the cursor to be much more predictable and user friendly. If rotation is around the center of the screen you often end up needing to do it in two steps: 1. Pan to pick rotation center. 2. Rotate scene. Doing step 1. is also very inaccurate unless there is a crosshair at the center of the viewport, and of course you don't know if you've missed until starting step 2.

Personally, the way I would rank 3D viewport rotation methods is:

Rotate around mouse > Rotate around fixed point > Rotate around viewport center.
Jed
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Pick rotation center

Post by daniel »

Oh it's mainly because in CC the rotation is always computed about the screen center (I mean that we consider the position of the cursor relatively to the screen center as if it was moving on the surface of a big sphere). If you set the center on any point, especially in a corner, and then start rotating the cloud from there, you'll get a very weird behaviour.

And frankly I already spent way too much (free) time on this. I won't be able to do this again before long.
Daniel, CloudCompare admin
Aarie
Posts: 43
Joined: Sun Apr 27, 2014 10:07 am
Location: Berlin

Re: Pick rotation center

Post by Aarie »

Daniel, awesome! Thanks so much for that.
Definitely makes life easier!
Post Reply