Request for comments: keyboard and mouse navigation in CaWE

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Request for comments: keyboard and mouse navigation in CaWE

Post by Carsten » 2009-02-27, 18:21

Hi all,

as I'm currently working on introducing wxAUI to CaWE, and in that process also revise many aspects about the 2D and 3D view handling (the 2x2 splitter views are gone already; in fact, the work is nearly complete), and as in another thread there was a suggestion by Kai to change the keyboard and mouse navigation in CaWE, I now have a question:
Kai wrote: Navigation is not my style, it feels awkward to press space to navigate, as it is one of the most used needs, so no extra button should be needed to be pressed !
my suggestion would be to map the key more like in UED3 which is very intuitive
Here is the key list for navigation:
  • 2D Mode
    • LMB drag - panning viewport
    • RMB drag - panning viewport
    • LMB + RMB - zooming in\out
  • 3D Mode
    • LMB drag up\down - dolly camera (move forward, backward)
    • LMB drag left\right - pan left right (rotate left, right)
    • RMB drag all - pivoting camera in all directions (like mouse look)
    • LMB + RMB - move vertical and horizontal
    • hold U + LMB drag - tumble around camera local pivot
    • hold U + RMB drag - move towards\away the local pivot
    • hold U + MMB drag - Pan in local screen space
    • hold L + LMB (item selected) snap and tumble around selected item
    • hold L + RMB (item selected) zoom towards\away selection
Ok, thanks, this sounds very well, but how is this supposed to work with the tools?
That is, the function of the LMB is normally reserved for the main purpose of the currently active tool: Create new brushes, place new entities, drag vertices, etc. When the LMB is at the same time supposed to be used for navigation, we have a conflict. (There is no conflict only when the camera tool is activated.)

Can you (especially Kai, and others) please help me to understand this better? :cheesy:
I'd be very grateful, as I'm currently re-coding the association of 3D views with cameras and the camera tool... :up:
Best regards,
Carsten
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Re: Request for comments: keyboard and mouse navigation in CaWE

Post by Kai » 2009-02-28, 23:17

Hi Carsten

lets see:
Can you (especially Kai, and others) please help me to understand this better?
Im glad to help :)


Its quite simple
Most commands for the viewport are only used with a "drag" status of the button.
Its still possible to simple click LMB to select something for example or do RMB to create a popup menue for example !

All tools are used by either shortcut command or by pressing the appropriate button.

Here is a workflow example:

Lets say you want to create a new level this is what you do:
  • Start by selecting a subtractive or additive mode to build up the world (this is new in UED3 as prior version of the game only offer subtractive mode, so you started with a full solid world)
  • When starting you always have a red "builder brush", representative approximation of the volume you could now instantly create, that is shown as simple wireframe. To create a real csg brush, you simple click the "Add" or "Subtract" button to create a cube or carve in a cube (depending on what mode you had selected before, additive or subtractive)
  • to modify the "builder brush" you can RMB on the cube primitive icon, to edit size or thickness of walls if you want to activate them. You have to create a new brush then into the world to see the result of your new settings !
  • You can also edit the real csg brush with going into "Edit mode"
  • To edit other items or surfaces, simply click on it to select, then RMB and a menue will offer you a lot of things to edit or add
  • To move any object or entity you simply use a widget to translate, rotate or scale something
  • To create a light you can simply press "L" + LMB to create a light in 3D View
  • Objects like static meshes, as well as textures or anything else are loaded through the "Generic Browser" This is a huge loader for all things like materials, meshes, animations, textures etc. it can used with different filter to give you a fast overview of what you want.
    You simply select an item you would like to load then place your mouse in 3D view and use RMB to open the menue that contains a "Add Actor" > and the list will then give you you mesh in the first place and some commonly used actor classes as well (like "startpoint" or "light")
  • you finally need to rebuild all bsp and light solutions to see a result inside of the editor (duplicated or transformed brushes are not visible as long as no rebuild was done)
  • Selecting multiple items: Ctrl+Alt and LMB drag will create a marquee selection
  • Duplicate items: via menue > duplicate or (faster) Alt + LMB drag
Notice that some operations (like duplicate) are only possible because the translate widget is always visible by default when selecting something. So to duplicate i use ALT + LMB on the one axis of the widget ! Tabbing Space bar will toggle through Move>Rotate>Scale . Brushes seems to get the the widget location based on center of mass, meshes may use their world zero when exported as center (but im not sure about this)
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Request for comments: keyboard and mouse navigation in CaWE

Post by Carsten » 2009-03-01, 23:24

Kai, thanks for the information!

I read your post several times - slowly - however I have to admit that I don't fully get everything, probably because both the nomenclature as well as the workflows are just a bit too different.
( E.g., what is a widget? widget == tool ? )

So instead of dealing with the details (key 'x' is for action y), I would like to let you know a few key ideas and concepts behind CaWE regarding user input:
  • As every modern graphical application, CaWE is event driven. That means that for anything that happens, CaWE receives an event message. Event messages are for example "left mouse button went down", key 'A' was released, etc.
    In summary, the most interesting event messages for user input are: LMB, RMB, MMB went up/down, mouse was moved, and key 'x' was pressed or released.

    CaWE forwards such events to the currently active tool. The tool can "use" the event for any action it desires, for example on "LMB went down" it can select the object under the mouse pointer.

    If the tool did not "use" the event, the window (a 2D or 3D view of the map) is free to implement a "default action" for the "unused" event instead. For example, if the tool didn't use the "mousewheel moved" event, the 3D views will move the camera forward or backward, and the 2D views zoom in or out.
  • Another key concept that is implemented in CaWE is that operations that are conceptually similar to operations in Windows Explorer (or e.g. Konqueror on Linux) should also work, behave and "feel" similar in CaWE.
    This is what users expect, both newcomers and experts: What works in Windows Explorer should intuitively work everywhere.
    For example: LMB selects, Ctrl+LMB toggles selection, left-drag selects when the drag started in free space, left-drag moves when the drag started on a selected object, Shift + left-drag copies, etc.

    For the new version of CaWE, I've looked at Googles Sketch-up, which is very intuitive to use and works on similar principles, and I like the simplicity of their user interface a lot.
  • At the same time - I much agree with you! - navigation should be easy, both in the 2D and 3D views.

    The "problem" is that many "simple events" like LMB-click are already taken by the currently active tool.
    For example, the selection tool uses LMB for beginning a new selection, the "Create new object" tool places a new object where the LMB went down, etc.

    Therefore, we have to find and use keys and mouse operations for navigation that are
    • simple and easy to use
    • used by no other tool
    • intuitive
    For example, for navigating the 2D views, I personally use the arrow keys :arrow: :arrowd: :arrowl: :arrowu: and + and - on the numpad very much - but I rarely use SPACE for panning.

    However, for example, the middle mouse button (MMB) is currently entirely unused in CaWE - it would perfectly be possible to reserve and use it for nothing but navigating the 2D and 3D views, no matter the currently active tool! What do you think?
  • It is certainly true that the RMB is currently very much underutilized in CaWE. (Although it could be used for any purpose, I think it should be used for context menus only.) That is, indeed, we should offer a lot more power by context menus - which is not even difficult to implement by the way.

In summary, I think that in general
  • LMB should select and drag objects (or object handles) most of the time,
  • RMB should open context menus most of the time,
  • 2D and 3D navigation should be very easy, but should not conflict with the normal use of LMB and RMB
(I also like the idea of a "ghost shape" ("preview cursor") that can be seen before a new object is actually created...)

I think that the user interface of CaWE should be based on key principles like these (instead of trying to mimic the behavior or keymap of some application X or Y; doing so would be a bottomless pit, because everyone has another favorite application). There is no official "user interface design guide" for CaWE, but if anyone is interested in helping with one, I'd be all for it! :)
Best regards,
Carsten
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Re: Request for comments: keyboard and mouse navigation in CaWE

Post by Kai » 2009-03-02, 08:30

Ah sorry, yes its a little confusing, since some names are used in different ways, my fault, sorry.

A widget is (in UED3 Term) the control object for translate, rotate or scaling, and sometimes referred as gizmo, locator or pivot
Here is a screenshot of a translate widget
Image

Lets see about navigation:

First of all i agree its really a complex task and also a very important one. There is a good reason why so many tools and company's have so many concepts for a "good" navigation.
And yes there is no perfect solution as any artist is individual and therefore wants his solution based on his experience.

For me there are 2 main ideas for controling a software:
  • 1. Utilize already known keys and behaviors known to the user , like Ctrl+C for copy Ctrl+V for paste etc
  • 2. Use unique and different behaviors in favorite of a more fluid,intuitive,precise workflow.
There always mixtures of these two ideas as well.

The most and first way to find out is to prioritize the goal of each program, or in other words:
What is the most used key/mouse button ? What is the most important part to fulfill the task the App was made for.
And also: Is a current way blindly used but way to complicated or outdated ? Are there much more context sensitive ways to solve problems ?

This is a very science of its own :) And I'm not really an expert, however i had to used many tools in the past and found out that the first conclusion not always leads to a better way.

In case of UED3:
I'm not owning the latest editor so far, but i think i get a copy of "UT3" or better "Gears of War", just to check it out.
Thinking of working as a level designer, and always as artist is:
  • To have (ideally) full control at any time of the workspace I'm in
    can i modify the gui, dock and undock windows, is it dynamic for re sizes, can i set a key for all commands on my own, is there an overview to all available commands ?
  • To have full overview of my task that I'm doing, to show and hide specific parts that im focused on.
    can i filter by categorys, sets, layers or type, can i isolate specific elements, can switch into different visual supporting modi, are tools smart, modable or can i combine them, is precision and control available ?
  • Workflow easy enough to become intuitive rather then needed to be memorized.
    is the gui based on distinguishable symbols, is there an instant feedback close to the final result, is a toggle more usable than 3 different buttons
Google Sketchup is a wonderful example because its a pleasure to see how easy it is to create very complex rooms in minutes.
Icons are few, distinguishable, and work smart enough, so smart that i.e.: a extrude can also be an intrude partial or full, it works on all planar surface fast and the same way, crops away any illegal surfaces, tessellate the face and so on. Still its only one simple tool, no need for options.
Also Sketchup is totally specialized on creating walls and ceiling fast and efficient, so snapping and orienting is so smart it supports your action WHILE creating, and not AFTER.
The list goes on .. Skechtup simply is amazing and commonly used in many company's as a pre-production tool due to its speed.
I also vote for some tool concepts in Ca3D !!!
Pen and extrude the way they work in Sketchup would give a tremendous speed up, simplify the way to build brushes and a much more intuitive way to add complexity to a brush.
It's so damn intuitive to carve in holes and add volumes to existing geometry. Most wanted if possible 8)


I really think that the event based concept of CaWe is modern and flexible enough for all tasks as well as to be able to get fully customizable and context sensitive for a tool.
So for simple events we have to decide on priority what buttons need to be the most used and also based on constant logic.

LMB is THE most used button so its mapped on the most used tasks:
  • click LMB on object (in any view) to select or deselect any.
  • if anything is clicked the transform widget/gizmo is active.
    (in 3D) Clicking and drag on a handle you can move,scale,rotate in this direction (toggle using spacebar)
    (in 2D) same as in 3D except you can simply drag anywhere to move,scale in the 2d plane of the viewport
  • click on an empty space will deselect
  • click and drag on empty space will move the camera along the world, resulting in a pan :cheesy:
You asked why LMB drag is not used for doing a marquee selection as in the window explorer.
Answer: It's not an data explorer and the need for selecting multiple object at once is much less important, as you deal a lot more on a one by one object manipulation.
If an object would be used with another you would rather group it together as is faster and less cluttering than using a marquee selection (also prevents from selecting unwanted elements).
Besides you need multiple selections more on editing values, again here UED3 offers logic filter like "select adjacent walls" or selection groups, this speeds up a lot !

Interesting that you prefer arrows to navigate for the 2D, any reason why ?
I use mouse because it very much faster then arrows and also much more precise and not stuttering. Also traveling a far distance is much easier with mouse.
Besides i really don't like to move my left hand that far to the right (as a right handed mouse user), and using SPACE is also convenient for a Photoshop user like me (to pan the canvas).

I also have another idea that could be helpful:
There is really often a need for a "repeat last tool/action" key
This also speeds up different things that can be tedious, the result could be placed exactly on the mouse cursor in 3D view.

And Yes use the MMB, every additional button can be helpful :)
Same goes for context menus, more control, less cluttering. I'm also a fan of toggle and sticky keys.
While toggle should be self explanatory, sticky keys are a little underrated but REALLY efficient:
The first application i found using this method was XSI.
Sticky keys take a little getting use to, but once you do it is a very easy concept to understand and take advantage.
A sticky key is a key board hot key that can toggled.
If you tap the "v" key, you will turn on the Move tool.
If you press and hold the "v" key, you will turn on the Move tool, but when you let up on the "v" key, you will turn off the move tool. By tapping on the "v" you are toggling on the tool and tapping it again will turn it off. That is a sticky key.
So an example of a work flow would be to tap the "v" key to turn on the Move tool, then hold down the "t" key to select some vertices, let up on the "t" key and XSI will return you back to the Move Tool and now move the vertices.

I found this quite useful when switching between 2 important tools/modes i need.
Sticky key timings can be adjusted under the User Preferences.

And in the end:
Picasso once said something like i'm actually nothing more
than a stealer!
Other painters are poor men when i get to know their works , because I steal all their ideas and make it better.
I guess there is no need to reinvent the wheel, so use whatever inspirations and ideas may come and make something new out of it :)
Just my thoughts about it :oops:
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Request for comments: keyboard and mouse navigation in CaWE

Post by Carsten » 2009-03-10, 01:40

Hi! :-)

First of all, sorry for my delayed replies. I'm very busy these days, and will eventually come back to all of your posts and mails!
(We can however take comfort from the fact that it's mostly CaWE that keeps me busy... ;) thousands of small and large changes that I've wanted to address since a long time, and they're important enough to include them in the upcoming release - some need testing.)
A widget is (in UED3 Term) the control object for translate, rotate or scaling, and sometimes referred as gizmo, locator or pivot
Ah, thanks! I know this kind of control under the name "gizmo".
For me there are 2 main ideas for controling a software:
* 1. Utilize already known keys and behaviors known to the user , like Ctrl+C for copy Ctrl+V for paste etc
* 2. Use unique and different behaviors in favorite of a more fluid,intuitive,precise workflow.
There always mixtures of these two ideas as well.

The most and first way to find out is to prioritize the goal of each program, or in other words:
What is the most used key/mouse button ? What is the most important part to fulfill the task the App was made for.
And also: Is a current way blindly used but way to complicated or outdated ? Are there much more context sensitive ways to solve problems ?
I much agree with this, as well as with the following sections you wrote about (the enumerations with the parts written in blue), and the part about SketchUp!!
(Unfortunately, there will not be enough time to implement most of this in the next version, but the improvements will be very large as-is.)
LMB is THE most used button so its mapped on the most used tasks:

* click LMB on object (in any view) to select or deselect any.
* if anything is clicked the transform widget/gizmo is active.
(in 3D) Clicking and drag on a handle you can move,scale,rotate in this direction (toggle using spacebar)
(in 2D) same as in 3D except you can simply drag anywhere to move,scale in the 2d plane of the viewport
* click on an empty space will deselect
* click and drag on empty space will move the camera along the world, resulting in a pan :cheesy:

You asked why LMB drag is not used for doing a marquee selection as in the window explorer.
Ah, I like this! Finally some practical advice that I can actually and practically implement! :cheesy:
I think that CaWE (as-is, i.e. the upcoming version), comes pretty close to what you describe:
  • LMB does selection (actually with Ctrl and/or Shift key modifiers this is pretty powerful, I've even taken some concepts from SketchUp already: With a marquee selection, whether the marquee is dragged left-to-right or right-to-left decides whether objects are selected by touch or must be entirely inside the marquee).
  • We have no gizmos in CaWE right now, but the "transformation box" that we currently have comes close - it serves the same purpose and is easy and intuitive to use as well. Soon even in 3D! 8)
  • I now see the sense in the "drag in empty space results in a pan"! This is only the case in the 2D views, right? I've not yet implemented this in CaWE (the default is currently the marquee drag), but I'll reconsider it seriously!! (Would like to think about the consequences regarding other tools and key combinations first - e.g. how would we activate the marquee selection then??)
If an object would be used with another you would rather group it together as is faster and less cluttering than using a marquee selection (also prevents from selecting unwanted elements).
Two issues about this:
  • Can primitives be in more than one group at a time? (Does it make sense anyway?)
  • Avoiding to select unwanted objects in 2D views is very difficult, e.g. when two crates of the same size are exactly stacked on top of each other. CaWE has a built-in solution for such cases (the selection cycles over time, as long as the button is held down), but I'd be very interested to hear any other ideas regarding this problem... (personally, when I select individual objects, I prefer to do this in the 3D view...)
Interesting that you prefer arrows to navigate for the 2D, any reason why ?
:mrgreen: Well, I have the mouse in my left hand, and use the arrow keys with the right, where also the numpad +/- are close for zooming in/out. The advantage is that you can mentally separate the navigation (done with the keys) from the "work" (done with the mouse).

But I think that if e.g. the panning was on the MMB or even the RMB (also used for the context menu when no movement), I would get used to it as well!
Do you think panning with the MMB or RMB is a good idea? It might even be possible to use them in the 3D views for navigation, too, and consistency is good. ;)
There is really often a need for a "repeat last tool/action" key
Agreed, Gimp has a similar menu and I like it well. It's unfortunately not trivial to implement. Good news is that in many cases, a user can help himself by exploiting the power of Ctrl+C, Ctrl+V.
I'm also a fan of toggle and sticky keys.
While toggle should be self explanatory, sticky keys are a little underrated but REALLY efficient:
Yes, I like this idea, too...!
I even think it might be easy to implement this concept with the existing CaWE tools - I'll have to check.
I guess there is no need to reinvent the wheel, so use whatever inspirations and ideas may come and make something new out of it
Yes! :-)
To help that process (as we agreed, consistency is important, too), I guess I'll make a keymap that helps to better "design" the decisions related to "what key or mouse event causes what action?"
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests