Anim8or Community

General Category => Ongoing Anim8or Development => Topic started by: Steve on March 23, 2016, 12:38:31 am

Title: Picking Rules
Post by: Steve on March 23, 2016, 12:38:31 am
Here's an overview of how picking should work in Anim8or, in particular for Points, Edges and Faces in the Point Editor. As usual, comments and suggestions are welcome.

1) If it's not visible you can't pick it. For example, if edges aren't being drawn in flat shaded views, you can't use them as edit targets. The opposite is not always true.

2) If it's not enabled you can't pick it. For example if points, edges or faces are disabled in the left-hand toolbar, you can't use them as edit targets. Points at then end of edges may still highlight when you're selecting the edge even if they aren't themselves enabled.  This is used to make the line selection more visible.

3) Points generally have priority, then edges, then faces. Without this rule it would be difficult to select anything other than faces.

4) Closer to the viewer has priority over further. Generally something in front is what you want to select.

5) Closer to the mouse has priority over further. Generally you want the thing closest to your mouse.

There is a conflict between #4 and #5 that increases with the size of the picking area. Recent builds have increased the diameter of the "pick zone" around points and edges. As a result it is much more common that the mouse is closer to point A than point B but point B is closer to the user, and yet both are within the zone. So we have:

6) Points further from the viewer are penalized relative their distance from the viewer. In effect you can be further (on the screen) from points closer to the viewer and they'll still be the one chosen. This rule generally prevents accidental selection of back side points in wireframe mode without requiring them to be disabled.

A similar problem is that there can be edges and faces that are closer to the mouse that the "chosen" point. How to choose the "winner" is not simple. For this, as a start, we have:

7) Minimum Winning Distance. If a point is within a minimum distance it is selected even if an edge is closer or the mouse is over a face. This is true for a "close" edge and a face.  I'm considering making the settings for "closeness" a user parameter, and also the size of the "pick zones" but I want to make sure that the underlying scheme is solid before I do this since pushing the boundaries can cause everything to break down.

These rules work fairly well. They are available in build 1230 (http://www.anim8or.com/download/preview/files/animcl1230.zip). Check it out and let me know what you think :)
Title: Re: Picking Rules
Post by: cooldude234 on March 23, 2016, 04:17:31 am
The only thing I have a problem with is that minimum distance (or snap - select). I hate it when I have a mouse over something I want to click on and it selects something else just because it is 'in range'. Making this a user defined preference would work but in my opinion selections should be pixel perfect always.
Title: Re: Picking Rules
Post by: Steve on March 23, 2016, 06:01:33 am
Pixel Perfect is much, much easier to do, but it's almost impossible to select single pixel wide lines or points. You'd always be selecting a face because they cover most of the pixels. I don't think any modeling software uses it for that. Anim8or has never used it. In v0.98 you can only enable points OR edges OR faces. It uses a 4 to 8 wide window, depending on the tool, but you never have to click exactly on a point or edge. Enabling multiple P/E/F at the same time, as it does now, requires a smarter hit algorithm which I described above.

Note that Anim8or highlights what you are going to select before you click. You shouldn't have any problems knowing when you're over the desired thing. Give it a try and see if it works for you.
Title: Re: Picking Rules
Post by: Thanos on March 23, 2016, 09:52:00 am
They work very well. I noticed great improvement between v1229 and v1230.
When in fast select, with the move tool, if I select an edge and then drag one of its points, the whole edge will move. Is this expected? On the contrary, if I select a face, then drag one of its edges, the edge will be moved.
Title: Re: Picking Rules
Post by: Raxx on March 23, 2016, 03:19:38 pm
Steve, awesome! It's just about perfect now. Manipulating the elements feels very natural and things happen nearly always as I expect them to happen :)

They work very well. I noticed great improvement between v1229 and v1230.
When in fast select, with the move tool, if I select an edge and then drag one of its points, the whole edge will move. Is this expected? On the contrary, if I select a face, then drag one of its edges, the edge will be moved.

This is because selecting an edge also selects the edge's points. There may have already been a discussion about it already, but maybe it's time to revisit it: Should selecting an edge also select the points of the edge? I ran into Thanos's issue a few times before as well, having accidentally selected an edge instead of a point, and then when subsequently trying to move the point again it also moves the edge's other point. This forces me to have to undo the accidental manipulations (when in fast select mode), then deselect everything and try again.

With the new fast select and topo tools in place along with the new selection conversion when switching between p/e/f, I feel that selecting an edge should only select the edge and not its points. Afterall, if you switch to point mode, it automatically selects the points of the edge anyway.
Title: Re: Picking Rules
Post by: nemyax on March 23, 2016, 03:22:16 pm
With the new fast select and topo tools in place along with the new selection conversion when switching between p/e/f, I feel that selecting an edge should only select the edge and not its points. Afterall, if you switch to point mode, it automatically selects the points of the edge anyway.
Hear, hear!
I'd say that points should be drawn only if Vertex Select is enabled.
Title: Re: Picking Rules
Post by: cooldude234 on March 26, 2016, 08:55:48 am
Pixel Perfect is much, much easier to do, but it's almost impossible to select single pixel wide lines or points. You'd always be selecting a face because they cover most of the pixels. I don't think any modeling software uses it for that. Anim8or has never used it. In v0.98 you can only enable points OR edges OR faces. It uses a 4 to 8 wide window, depending on the tool, but you never have to click exactly on a point or edge. Enabling multiple P/E/F at the same time, as it does now, requires a smarter hit algorithm which I described above.

Well that's why you allow the changing of the line/point thickness and sizes.