[[TracNav(TracNav/TOC)]] = osgVisual configuration = To use osgVisual, you have to configure osgVisual according to your needs. Basiccally, osgVisual provides two configuration mechanisms: * Via commandline parameters * Via configuration file == Configuration via parameters == osgVisual is build on top of !OpenSceneGraph. The core module is osgViewer which provides all the background technology to render the scene graph on the screen. You can use all osg related command line options by adding these options to osgVisual. To get an overview of the available parmeters, execute {{{ #!sh osgviewer --help }}} or go to http://www.openscenegraph.org == Configuration via configuration file == For all options which are not OSG but osgVisual related, the configuration mechanism is an XML configuration file. This file contains sections for each module to configure and for the scenery to display. Example of a configuration file with module and scenery configuration: {{{ #!xml }}} === Module configuration === The "module" sections are parsed while instantiation the modules at the beginning of the startup process. Each module configuration contains at least the name and the enabled/disabled status of the module. Further module parameters are optional and module dependent. Some modules ignore the "enabled" attribute because they are mendatory in osgVisual. If a module is compiled and used in osgVisual but the correpsonding XML entry is not available in the configuration file, the modules will raise an error and remain unconfigured. The behavior of an unconfigured module is unpredictable and hence should be avoided. The order of the entries is arbitrary, you must only take care of its position in the the hierarchy in the XML file. Example: {{{ #!xml }}} A full list of all available modules with their XML configuration options is available [wiki:XmlModuleConfiguration here]. === Scenery configuration === ==== Terrain ==== It is possible to load one or more terrain databases with the following command: {{{ #!xml }}} You can add further databases with attributes beginning with "filename", follow by a number (e.g. filename3="") ==== Animation Path ==== You can load an animation path file and use the !OpenSceneGraph animation path camera manipulator to animate the camera movement. It is possible to record camera movements and playback these movements with the animation path. It is also useful to start osgVisual with teh camera at a specific location. {{{ #!xml }}} ==== Models ==== Inside the XML "" entry you can specify a list of models to displayed. It is possible to attach some of the model attributes to data slots to allow animation. Example: {{{ #!xml ... ... }}} A full description and explenation of the model configuration via XML is available [wiki:XmlModelConfiguration here]. You can track models based on their trackingID. It is possible to configure a slot which content is used to update the trackingId the camera should track: {{{ #!xml }}} You should specify the entry after the models, otherwise the model with the trackingId you want to track is not yet available and the tracking would be disabled. ==== Daytime ==== To configure the date and time of the scenery, use: {{{ #!xml }}} The basic setup is the system time of the IG. You cna override the systmetime by the XML entry. To skip overriding a value set a emtpy value. ==== Visibility ==== To configure the visibility settings, use: {{{ #!xml }}} You have to specify the visibility range as well as the turbidity. A turbidity of 2.2 represents a usual day. ==== Cloudlayer ==== To configure a cloudlayer, use: {{{ #!xml }}} A full description and explenation of the cloudlayer configuration via XML is available [wiki:XmlCloudLayerConfiguration here]. ==== Windlayer ==== To configure a windlayer, use: {{{ #!xml }}} You have to specify the bottom altitude and the top altitude of the wind volume, as well as the direction and the speed.