Version 7 (modified by 15 years ago) (diff) | ,
---|
TracNav
Documentation
- Getting Started
BuildEnvironment...
- Terrain Data
- Architecture
Modules...
osgVisual Configuration via XML...
- SerializationNotes
- ExecuterNotes
- CameraControl
- Theories of Terrain Deformation
- Theories of Image Distortion
- Home
About...
- Screenshots
- Downloads
Projection Designer...
- Wiki Edit
- Website Credits/Impressum
Camera Control
Introduction
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. All camera control mechanismd are implemented as camera manipulatord. This way it is easy to switch between them during runtime.
The camera can be controlled via:
- All standart OSG manipulators like flight, terrain, spherical, nodetracker
- A Spacenavigator (http://www.3dconnexion.com) based manipulator
- A Spacenavigator based nodetracker manipulator.
- Attaching camera to an object and positioning it the scene
- External Link
Standard 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
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. This manipulator can be used with or without auto homing of the camera:
- Auto homing camera position: Always returns to the standart viewpoint if the spacemouse is released. Spacemouse represents camera position.
- Static camera position: The spacemouse input is added to camera position. The camera remains on the last position if the spacemouse is released.
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)
Camera controlled via external Link
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.