Version 4 (modified by Torben Dannhauer, 10 years ago) (diff)


Camera Control


osgVisual provides several approaches to control the camera (point of view). Independent from the selected driver the cluster modul transfer this camera position to all slaves, which modify their field of view according to the master view and their configured camera offset.

The camera can be controlled via:

  1. All standart osg Manipulators like flight, terrain, spherical, nodetracker
  2. A Spacenavigator ( based manipulator
  3. A Spacenavigator based Nodetrackermanipulator for dynamic views
  4. A Spacenavigator based Nodetrackermanipulator for semi dynamic views
  5. Object position in the scene
  6. External Link

Standart OSG manipulators

It is possible to move the camera inside the application wich OSG's default manipulators. This could be useful for demonstration purposes.

Spacenavigator based manipulator

For comfortable movements in the scene, a 3D mouse is recommended. This manipulator works with the Spacenavigator by 3Dconnexion. You can move and rotate along all axis simultaneously.

Spacenavigator based Nodetrackermanipulator for dynamic views

This Manipulator works also with the Spacenavigator by 3Dconnection, but it hast to be attached on a node to track it. The point of view relative to this tracked node is controlled by the Spacenavigator. It is very sensitive and always returns to the standart viewpoint if the spacemouse is released.

A Spacenavigator based Nodetrackermanipulator for semi dynamic views

Basically this manipulator works like the Nodetrackermanipulator described above. In this manipulator, the camera position is not only controlled by the spacemouse, but also of the last camera position. The spacemouse is used to _MODIFY_ the camera attitude, not to represent the camera attitude. All spacemouse inputs will be added to the camera attitude. Therefor the camera remains at the last position if the spacemouse is released. This allows comfortable but slower and smoother movements of the camera.

Camera attached to object

Another approach of camera control is the attachment to objects in the scene. Every object has a free configurable camera offset to specify offsets between object's and camera's position/attitude. This way the view out of an objects window (like the cockpit in a car or aircraft) can be represented. To move the camera view, the object hast to be repositioned, usually by connection the object to the externalLink.

While the view out of the cockpit is the same like in other camera control methods, this way directly moves the objects to the right place, wich make's it easy to add a 3rd person viewer, collision detection etc. to the scene.

The approach to control camera by attaching to node and moving node is recommend

For simulators, this approach should be used. Adding 3rd person viewers in the scene can simply be realized via adding render machines the simulation network (also connected via externalLink)

Another method to control camera is to control it via the external link. This way the camera could be placed automatically (by the simulator) without sideeffects in the scene, but without corresponding object movement.