Forum Navigation
You need to log in to create posts and topics.

Change view with WASD keys

I don't know how complicated this would be to implement, but it would be nice to be able to change the camera view with the WASD keys. Shift could be used to go down, and space could be used to go up. This is similar to how flying works in the game Minecraft. Blender also has an implementation of moving the camera like this, as detailed in this answer. This would make it easier to control the view, in addition to the current mouse capabilities.

Thank you for this useful suggestion. Yes, that sounds like a good idea, I agree. Keyboard controls for the viewport camera would be useful,  either in the form of a "fly/walk" mode or for orbiting around the model. I'll try to implement something in this direction and then come back to you asking for your opinion.

That's awesome, thank you! I feel honored.

Since we're on the topic of views, I wanted to bring up something that I've been thinking a bit about. I'm sure you know how difficult it sometimes is for us to view 3D models on 2D screens with 2D input devices. I myself have this problem in Blender.

One thing that usually throws me off in Ovito is the way the center of rotation is static. You can change it with a double click, but otherwise it stays anchored at a fixed point. This means that if you pan away too much from that point, the view will rotate extremely quickly when you try to change it.

I was recently using a program called Avogadro—maybe you've heard of it! The way they do it is that whenever you rotate the view, it'll rotate around the atom currently under the mouse, or if there's nothing around the mouse, around a nearby area on the molecule.

Their implementation feels really solid and really intuitive to me. I noticed that whenever I rotate a molecule, I usually want to rotate it around atoms near the mouse. It really helps in usability for me. Ever since I used Avogadro's implementation, I have been double clicking in Ovito to change the rotate point every time I pan away to another part of the molecule.

I don't mean to bombard you with requests, but I just wanted to bring it up for you to consider. Maybe an easy(?) implementation would be an option which would automatically "double click" and change the rotation point every time you try to rotate the view. I would definitely use that, but then again I'm only one person so it may not be worth it spending time implementing it.

In any case, Ovito is a great app and I'm very thankful to the whole development team as well as you two people for contributing so passionately to us users. Thank you!

Thanks for the ideas. I'll take a look at Avogadro's mouse and keyboard input handling. In the meantime I've added some basic keyboard viewport controls to OVITO. In OVITO 3.2.1, you can use the arrow keys to orbit the camera around the dataset, and shift+arrow keys to move the camera laterally. Note that the viewport window needs to have the input focus for this to work, so you must first click into one of the viewports after you've used other parts of the UI.

I am going to work on the implementation to improve the behavior. The current implementation is only a very early test. Your comments show that user expectations can be very different and heavily depend on the kind of dataset a user typically works with (e.g. a free-floating molecule vs. a solid specimen that is fixed in the laboratory frame). And a user's prior experience with other software also makes a difference. To make everyone happy, I guess we'll need a highly configurable input system.

Thanks! I just tried it out and it looks nice :). I have some suggestions about this if you'd find them helpful:

  1. Using WASD keys instead of arrow keys, because those are easier to press than arrow keys when you're holding a mouse with your other hand
  2. Making the steps a bit larger (but it might feel small to me just because of the dataset I'm using)
  3. Making the animations smooth instead of discrete. This might help if you have a repetitive molecule and you're moving laterally—it's hard to know which direction the camera is moving in. By making the animation smooth it might be easier to visualize. However, I know that's a bit more involved than it sounds because "smooth scrolling" usually has some sort of acceleration built into it.
  4. The other method of always rotating the camera around the current section of the molecule (à la Avogadro) might be better if we have such a navigation system. Here's a video showing what I mean:

I understand that all of these changes require resources to implement and that being a relatively niche product you need to be conservative with which features you implement.

I also just realized that my implementation with the WASD keys (which moves the camera itself in space when those keys are pressed) is a bit more involved than what I previously thought it to be, since you also need to use the mouse to navigate when using such controls. Perhaps the mouse could be used to click and drag to change the view though, just an idea.