Page 1 of 2

Problems with a single click

Posted: Thu Feb 04, 2021 11:44 pm
by jackkirk
I have some pretty large jobs involving 50 to 100 scans of 60 million coloured points each, for a total of 3 to 6 billion points per job.

I've found a technique to winnow this data down to something of the order 1.5 billion points - so it will all fit in my GPU "dedicated memory" and thus have good visual manipulation - a primary requirement of what I am using CC for.

Sometimes when manipulating the point cloud I will attempt a double click to change the rotation centre but will accidentally do a single click instead.

This sends CC into a lengthy tailspin - the cursor changes to the "busy" blue donut and the Task Manager > Performance > CPU show a couple of cores maxed out.

It looks like it is doing some sort of search through the point cloud.

What is it doing? Is there any way to stop it doing this?

Yes - I have already adjusted my mouse double click timing but still manage to do this too often.

Any insights are welcome...

Re: Problems with a single click

Posted: Fri Feb 05, 2021 12:55 am
by WargodHernandez
It is trying to determine which object was clicked on specifically a timer is set when single clicked that will execute

Code: Select all

void ccGLWindow::doPicking()
it is then calling the startOpenGLPicking function:

Code: Select all

//DGM: WARNING: OpenGL picking with the picking buffer is depreacted.
//We need to get rid of this code or change it to color-based selection...
void ccGLWindow::startOpenGLPicking(const PickingParameters& params)
{


which modifies the current context and redraws the scene. The redraw takes a surprisingly long time. On my system evaluating a 600 million point cloud I get 11.026 frames per second or 90.7 milliseconds per frame, but the redraw for a single frame using GL_SELECT takes 3.5 seconds.

Maybe we should add an option to disable single click point picking for those of us with excessive point clouds :)

Re: Problems with a single click

Posted: Fri Feb 05, 2021 2:12 am
by jackkirk
Disabling it sounds good - what is it actually useful for (forgive me if this is a stupid question)?

Re: Problems with a single click

Posted: Fri Feb 05, 2021 3:57 am
by WargodHernandez
It lets you click on an object and select that object in the db tree.

It's useful when you db tree gets big and you aren't sure where in the tree your object is.

You can also hold down alt and click and drag to box select multiple objects

Re: Problems with a single click

Posted: Fri Feb 05, 2021 5:55 am
by jackkirk
Thanks for your prompt response.

None of that functionality is of interest to me (at the moment :)) so an on/off toggle would be good.

Thanks...

Re: Problems with a single click

Posted: Fri Feb 05, 2021 11:56 pm
by jackkirk
Dam, I did again...

Just a thought - would it be possible to make the search process stop by hitting ESC?

Thanks...

Re: Problems with a single click

Posted: Fri Feb 05, 2021 11:59 pm
by WargodHernandez
I doubt that would work well, we would have to add check points for whether it should continue, but it is just using the normal object draw code that runs every frame, so it's not a good option.

We just need to add a toggle, I'll try to get it added this weekend

Re: Problems with a single click

Posted: Sat Feb 06, 2021 10:28 am
by daniel
Object selection is still done the "old way", with OpenGL. Thus, it's the driver that does the job (populating the point picking buffer, etc.). And this mechanism is a little bit deprecated, and less and less supported by drivers.

We would need to manage it ourselves (typically the "standard" seem to render each entity with a unique color, read the picked pixel (and its neighbors) color, and then deduce the entity from this color. And everything with a PBO to go fast and avoid displaying anything to the screen.

Re: Problems with a single click

Posted: Wed Feb 24, 2021 12:57 am
by jackkirk
Chris/WargodHernandez,

Your post of 6 Feb suggested "We just need to add a toggle, I'll try to get it added this weekend"

Any luck with this?

Sorry to bug you but it is a real pain with really large point clouds.

Thanks...

Re: Problems with a single click

Posted: Wed Feb 24, 2021 6:51 pm
by WargodHernandez
No I'm sorry, I've been tied up recently.

I just created a branch to work on this and it should be pretty quick to implement we'll see if I can get a PR done today.

Once accepted it will usually make it into the windows alpha within a week (depending on Daniel's availability)