TokisanGames / Terrain3D

A high performance, editable terrain system for Godot 4.
MIT License
1.97k stars 114 forks source link

Consolidate Tools & Hotkeys #122

Closed ettiSurreal closed 2 weeks ago

ettiSurreal commented 1 year ago

Raise and Lower are combined into one tool, with a toggle somewhere into UI to change between addition and subtraction. Additionally, a modifier key should be implemented to temporarily switch to the opposite mode (it goes back to what it was before when it's let go). CTRL should be familiar for Blender sculpt mode users.

TokisanGames commented 1 year ago

In the UI, separate raise/lower buttons is the same as a combined button plus a raise/lower toggle.

I'm not opposed to defaulting to raise and CTRL for the opposite for raise/lower. The same for expand/reduce. And the same for smooth/erode.

Calinou commented 1 year ago

I'm not opposed to defaulting to raise and CTRL for the opposite for raise/lower. The same for expand/reduce. And the same for smooth/erode.

I think that ideally, you should be able to perform all common operations using a single mode + key modifiers. This way, you never have to reach for keyboard keys other than modifiers while painting.

For instance:

This follows a convention where Ctrl inverts the behavior, and Shift or Alt change the mode.

[^1]: Won't work on Linux out of the box due to most window managers intercepting Alt + Click for window management purposes.

TokisanGames commented 1 month ago

Currently, CTRL works as negative for Holes, Navigation, Autoshader and Foliage.

@tcoxon is working on adding a lift floor / flatten peak option that will likely go with Alt in #275 .

Here's what I'm thinking we move towards: Positive Negative
Click: Raise Ctrl + Click: Lower
Alt + Click: Expand Ctrl + Alt + Click: Reduce
Shift + Click: Smooth Ctrl + Shift + Click: Erode (To be implemented)
Shift + Alt + Click: Lift floors Shift + Ctrl + Alt + Click: Flatten peaks

The alternate mode buttons are hidden, and are replaced when the keys are pressed.

Raise/Lower strengths need refinement. They're fine when far out, but up close they're too strong. I think their strength needs to adjust based on distance. Raise should be lessened *0.1 to match Expand, and/or adjusted based on distance to the camera.

For the rare tablet user (we have at least one), we can detect if we're on an android/ios/(touch enabled?) system, and enable modifier toggle buttons on the toolbar at the bottom of the stack to enable CTRL, SHIFT, ALT. The toolbar because they modify it, and we'll have a lot more room after hiding the negatives.

TokisanGames commented 1 month ago

With #409 and #418, we have expanded support for CTRL to invert all operations it can:

Also Alt provides a lift floors and reduce peaks mode shown in #409.

TokisanGames commented 2 weeks ago

I've adjusted the default brush settings and application in #444. I'm considering dropping the expand/reduce brushes. Shift for smooth was also added.

After these changes, are they different enough from raise/lower that they're worth keeping? Please test out the build and give me feedback.

TokisanGames commented 2 weeks ago

444 removes expand/reduce. Now we respond to ctrl(negative), alt (lift/flatten), and shift(smooth) keys.