How to change point cloud rotation origin (on the fly)?

Feel free to ask any question here
mapdeep
Posts: 15
Joined: Tue Nov 04, 2014 12:29 am

How to change point cloud rotation origin (on the fly)?

Post by mapdeep »

I have a point cloud in geographic coordinates that is about a kilometer wide. I would like to be able to zoom in to the outer edge of the point cloud (away from the center) and be able to rotate about the middle of what I see on my screen rather than what is the actual center of the entire point cloud. I would also like to do this "on the fly" (ie without changing any coordinates / coordinate system). Is there perhaps a setting I have not found?

A very related question: I would also like to know how I can rotate around my camera position rather than around the point cloud? (I thought that checking "camera link" would do this, but apparently not)

On a broader note, I am wondering what are the technical terms for this actual origin vs visible origin vs camera origin rotation behavior that I am trying to explain?

Thanks for any tips
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to change point cloud rotation origin (on the fly)?

Post by daniel »

Interesting question:
  • the 'rotation center' is by default the center of the entity bounding-box (if multiple entities are displayed, we take the center of the global bounding-box)
  • you can change it by picking any visible point (use the 'Pick rotation center' icon - just beneath the '1:1' icon on the left side toolbar)
  • you can also change it manually via the 'Camera parameters' dialog (camera icon)
  • if you have multiple entities, you can also select just one (or several of them) and use the magnifier icon to set the rotation center as their bounding-box center (it will also change the zoom however)
  • the concept of 'camera center' only has a proper meaning in perspective mode. You can rotate around it (instead of rotating the objects) in the 'Viewer-based perspective' mode (click the icon just below the 'Pick rotation center' one or use the F4 shortcut).
Daniel, CloudCompare admin
mapdeep
Posts: 15
Joined: Tue Nov 04, 2014 12:29 am

Re: How to change point cloud rotation origin (on the fly)?

Post by mapdeep »

Hi Daniel,

Thanks for all this information. I had been trying the "pick" tool before, but apparently did not give CloudCompare enough time to process:I was tesing this using fairly large point cloud file (350 Megabytes). It takes CloudCompare about 15 to 20 seconds to "re-center" the point cloud (it freezes while processing and I had previously been restarting it). I'm not sure if this slow behavior is to be expected for this size file, or if making this quicker would involve a feature request? Also, is there a simple way or re-setting the center to the original point?
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to change point cloud rotation origin (on the fly)?

Post by daniel »

To reset the center to the original point, simply select the entity and click on the magnifier icon.

For the slow behavior:
  • it depends on your GPU (the faster the better). On Intel chipset, you can go take a coffee!
  • it also depends on the zoom level (the less points in the picking area, the faster). So don't hesitate to zoom in, pick the point, then zoom out.
Making this function independent on the graphic card would require to compute an octree. You would have to wait a little bit once, and then it would be (potentially) faster for all following clicks (so it's interesting only if you do this operation a lot... and you have a poor GPU ;).

I think there's already a task in the TODO list. But due to the permanent increase in GPU power, we are a bit lazy ;)
Daniel, CloudCompare admin
BuBu
Posts: 6
Joined: Fri Nov 07, 2014 10:09 am

Re: How to change point cloud rotation origin (on the fly)?

Post by BuBu »

Hy to all,

sorry about my bad english, i'am from Germany....

I want to rotate a mesh around a given Point, but it don´t work for me. Here my workflow:

-loading mesh
-Change camera Parameters: Input Rotation Center to my coordinates (The pivot point is moving to the coordinates)
-try to rotate with the translate/rotate button, but the rotation is always arount the middle of the mesh, and so my coordinates are wrong :(

what i'am doing wrong?

Greetings
BuBu
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to change point cloud rotation origin (on the fly)?

Post by daniel »

Indeed, the interactive rotation is always done relatively to the center of all the selected entities...

We should at least let the user redefine the rotation center during the interactive transformation. I'll add this to the TODO list.
Daniel, CloudCompare admin
BuBu
Posts: 6
Joined: Fri Nov 07, 2014 10:09 am

Re: How to change point cloud rotation origin (on the fly)?

Post by BuBu »

Thanks for the quick answer,

can i rotate around a given point with apply tranformation?

In the moment i move the rotation-point to 0,0,0 and then apply the rotation, is there a possibility to to this with one step?

Thank you
BuBu
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to change point cloud rotation origin (on the fly)?

Post by daniel »

Nope, sadly to apply a rotation around a given point you indeed have to do this in 2 steps with the 'Apply transformation' tool.

I'm currently fixing the code so as to set the rotation center inside the 'Interactive transformation' tool.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to change point cloud rotation origin (on the fly)?

Post by daniel »

Ok it's done.

Are you able to compile the code on your side or do you prefer to wait for a beta-release?
Daniel, CloudCompare admin
BuBu
Posts: 6
Joined: Fri Nov 07, 2014 10:09 am

Re: How to change point cloud rotation origin (on the fly)?

Post by BuBu »

Oh no, i will wait,

thank you very much

BuBu
Post Reply