Monday, May 23, 2011

Tracking Shots with GEF3D

One of the most important things for 3D user interfaces are good navigation tools. So far, GEF3D comes with a nice first person like camera tool. You can fly around in the 3D scene and orbit around figures. If you have watched previous GEF3D videos, you may have noticed how we fiddled to nicely position figures in front of the camera. This is more or less ok for editing smaller diagrams, but in the long run it's annoying. In order to improve navigation, we needed a basic technique for tracking shots (see bug 30019 ). I have now added a basic API for tracking shots, together with some predefined shots for moving the camera in front of figures, as demonstrated in the following video.



These tracking shots are now (as of GEF3D revision 578) available, and the default camera tool provides the following (old and new) navigation features:
  • move camera around with keys (up, down, etc.), mouse (grab scene and drag it around) or mouse wheel or touch pad with two fingers (zoom in / out)
  • orbit around figures by holding down a modifier key and clicking on a figure to be the center of the orbit
  • new: double click on a figure to start a tracking shot, ending in front of the figure. The double clicked figure will then be shown in the center of the 3D scene, much as if opened in a 2D editor.
  • new: double click on background, to start a tracking shot to a predefined position. The default camera tool defines three positions, in order to look at the 3D scene from the front, from the side (hold modifier), or from the top (hold shift and modifier).

Actually, the idea of tracking shots in GEF3D is not that new. It had been prototypically implemented in a master thesis 2008 (see A. Bauer: Visualisierung von Suchtreffern und Clustern in 3D-Diagrammeditoren.) -- however the new moves are much nicer ;-) I'm looking forward to re-implementing the basic feature of this thesis again using the new tracking shot API: We combined EMF search with GEF3D, in order to automatically move the camera to search hits visualized in the 3D scene. And there are much more applications for tracking shots, such as following connections, visualizing timelines, switch between "sub-scenarios" in the 3D scene, etc. Stay tuned!

Jens

2 comments:

  1. Hi,

    GEF3d looks more and more cool. I am starting to imagine some use case in landscape architecture and house fitting (like in the Sims ;).
    Technically, can you tell me whether you rely on (use or extend) the org.eclipse.draw2d.IFigure or the org.eclipse.gef.EditPart ?

    ReplyDelete
  2. @mickaelistria: The red rectangles in the video (representing some nodes) actually are 2D draw2d.IFigures. GEF3D extends GEF in a way that you can reuse -- without any code changes -- most classes of an existing GEF/GMF based 2D editor (basically, you only have to exchange/extend the root diagram figure). That's the basic idea behind GEF3D: Programming an 3D editor is absolutely similar to programming an 2D GEF editor. In other words: If you can implement an editor with GEF/GMF, you can implement an 3D editor with GEF3D. GEF3D tries to hide almost all complexity and problems of 3D editors -- good navigation was/is one of these issues.

    GEF3D is fully 3D, and I could imagine some kind of house fitting editors. However, at the moment no external 3D models can be imported, so there is work to do. I'm not that sure about landscape architecture. Although you have (more or less) full access to OpenGL (GEF3D uses a thin abstraction layer), so that you would be able to create special "figures" for the landscape, I'm not that sure how that would fit in the "nodes and connections"- and MVC-design of GEF/Draw2D.

    ReplyDelete