Jump to content
Peter Werner

On-canvas controls for Frequency Separation behave strangely

Recommended Posts

When using the Frequency Separation effect, dragging inside the document view will interactively adjust the Radius parameter. So far that's pretty awesome.


However, dragging with the mouse will lead to strange and very erratic changes in value for the parameter. Dragging horizontally in a single direction, it might go down and then up again, which is really strange.


I looked at the slider behaviour a little more closely, and it turns out the algorithm currently calculates the radius using something like this:


Radius = RadiusBeforeAnyChanges + FixedMultiplier * distance( CurrentMousePos, InitialMouseDownPos );


This means that it is impossible to go lower than the initial slider value. So dragging right will increase the radius, but then dragging back left without releasing the mouse will only decrease the value until the original point where the mouse button was pressed is reached, at which point the distance is going to increase again, meaning the slider goes up again. Values lower than when the mouse was pressed can never be reached since a distance is always positive or zero of course.


This is confusing to the user to the point where I would consider it a bug that makes the feature useless.


I would suggest that the algorithm detect on first mouse move whether the mouse is predominantly moving horizontally or vertically and then to use that axis like a slider, for example Radius = InitialRadius + FixedMultiplier * DeltaX for horizontal movement. Any movement upwards or to the right would be defined as positive increments, and anything to the left or downwards as negative increments. That way the user could go below the value that the slider had when the mouse was first held down, and it would mean that the value would always change in a predictable and consistent way when the user drags in a particular direction. 


When going beyond the limits of the slider, it would probably ideally behave in a way that if, say, the slider limit was 1.0 and the user went to the right to the point where 10.0 would be, moving back to the left would then instantly lead to the slider value being decremented again.


One possible addition (though that would probably be considered a feature request) would be support for holding down modifier keys to influence the FixedMultiplier so that the parameter could optionally be changed faster or with more fine-grained precision.


Sorry if all this sounds a bit confusing.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now