This document describes the camera extensibility features of Prepar3D. The camera system is highly customizable and extensible, enabling add-on providers to create interesting and useful views. There is a distinction between the view system and the camera system. The view system manages the 3D windowing system by tracking the active window, processing keyboard and mouse input and providing methods for opening new windows, selecting windows, etc. The camera system defines what appears in each view window.
Camera Configuration File Format
Default camera definitions are data driven based on text configuration files. These files contain one or more sections—one for each camera definition. Each section contains parameter definitions for the camera.
Global Cameras
The simulation loads a set of global camera definitions from CAMERAS.CFG located in the user's application data folder %APPDATA%\Lockheed Martin\Prepar3D v2. This file is copied from the Prepar3D root folder the first time a new user launches Prepar3D or whenever the file cannot be found in the application data folder (if it was deleted or moved).
Aircraft Cameras
Aircraft can have cameras that are unique to them. For example, an airliner with complicated landing gear might define a "belly camera" that provides a close up view of the gear extension/retraction process. Aircraft cameras are defined in the AIRCRAFT.CFG (or SIM.CFG) file for the aircraft using the same format. Refer to the Aircraft Configuration Files documentation.
Each time a user loads an aircraft the existing aircraft cameras are removed from the camera system and any cameras defined for the selected aircraft are added.
Flight/Mission Cameras
You can also define cameras that specific to a flight or mission. As with aircraft cameras these are defined in the .FLT file using the same definition format. When a user loads a flight or mission any existing flight-specific cameras are removed and new ones are added. Refer to the Mission Creation documentation.
Camera Definitions
[cameradefinition.n]
This section describes the parameters that make up camera definitions. Almost all parameters are optional with reasonable defaults (shown in bold, or given if numeric), only title and Guid are required.
Property | Type | Range | Description | Examples |
---|---|---|---|---|
title | String | Camera title; appears in the upper-right corner of the view window when changing cameras. |
Cockpit( title = Cockpit ) Virtual Cockpit( title = Virtual Cockpit ) Spot( title = Spot ) Locked Spot( title = Locked Spot ) FlyBy( title = FlyBy ) Top-Down( title = Top-Down ) Nearest Tower( title = Nearest Tower ) Facilities Tower( title = Facilities Tower ) Facilities Runway( title = Facilities Runway ) AI Planes( title = AI Planes ) Multiplayer Planes( title = Multiplayer Planes ) |
|
guid | GUID | Camera definition's unique identifier. This GUID must be unique. |
Cockpit( Guid = {B1386D92-4782-4682-A137-738E25D1BAB5} ) Virtual Cockpit( Guid = {C95EAB58-9E4A-4E2A-A34C-D8D9D948F078} ) Spot( Guid = {BCA3FDD1-FB83-4BBA-8407-4922A7F0D00C} ) Locked Spot( Guid = {BCA3FDD1-FB83-4BBA-8407-4922A7F0D00D} ) FlyBy( Guid = {6B79DD49-9B4A-439D-BF40-ACBF157B0BA0} ) Top-Down( Guid = {A2849229-938A-448f-8AC6-01EF2291C171} ) Nearest Tower( Guid = {60BC0819-BD04-4AF6-8954-8FC8AA3545FF} ) Facilities Tower( Guid = {AA8C80C0-9EE2-4284-A1C2-B20CD3F5F3D9} ) Facilities Runway( Guid = {607C4520-CA6F-4135-AE10-8BF28838068F} ) AI Planes( Guid = {75A8357E-AB58-4294-9416-90C73FAFDD90} ) Multiplayer Planes( Guid = {2559BCED-9F13-4bc0-88C8-3996B9311681} ) |
|
description | string | Camera description. This is not used by the system, but can be used to provide a descriptive string in the configuration file. |
Cockpit( Description = This is the description of the cockpit view ) Virtual Cockpit( Description = This is the description of the virtual cockpit view. ) Spot( Description = This is the description of the spot view. ) FlyBy( Description = This is the description of the fly by view. ) Top-Down( Description = This is the description of the map or top down view. ) Nearest Tower( Description = This is the description of the tower view. ) Facilities Runway( Description = This is the description of the runway view. ) AI Planes( Description = This is the description of the AI aircraft view. ) Multiplayer Planes( Description = This is the description of the Multiplayer other aircraft view. ) |
|
origin | list |
Cockpit Virtual Cockpit Center Pilot Tower Fixed Observer WorldObject |
Every camera definition must have an origin that defines the object or point on
which the camera is oriented: • Cockpit – Camera is locked at fixed position in the 2D cockpit. Forward views include 2D instrument panel. Oblique view angle show virtual cockpit interior. • Virtual Cockpit – Camera is mounted at the eye point defined in the aircraft's CFG file. • Center – External (spot plane) camera that points at the center of the aircraft's visual model. • Pilot – External (spot plane) camera that points at the pilot position inside the aircraft's visual model. • Tower – External camera mounted at a control tower defined via the facilities (BGLCOMP) database. • Fixed – External camera at a fixed position. Fixed camera definitions must include FixedLatitude, FixedLongitude and FixedAltitude values. • Observer – Observer-based camera. Observer camera definitions must include ObserverLatitude, ObserverLongitude, and ObserverAltitude values to specify an initial position. • WorldObject – Used by SimConnect clients. Not available through CFG settings. Note that this does not affect the View menu that the camera title appears in, the menu is set by the category parameter. |
Cockpit( Origin = Cockpit ) Virtual Cockpit( Origin = Virtual Cockpit ) Spot( Origin = Center ) Nearest Tower( Origin = Tower ) Facilities Tower( Origin = Fixed ) |
showpanel | bool | Yes/No | Determines whether the 2D instrument panel is shown. | Cockpit( ShowPanel = Yes ) |
snappbhadjust | list |
None Ordinal Swivel Orthogonal |
These settings control how camera movement is handled when the camera system receives
a view pan or "snap to" command.
• None – Commands are ignored (position remains fixed). • Ordinal – Camera moves to the next ordinal compass position in the direction of the command. • Swivel – Camera moves incrementally in the direction of the command. • Orthogonal – Camera rotates in the direction of the command (used in top-down view). |
Cockpit( SnapPbhAdjust = Ordinal ) Virtual Cockpit( SnapPbhAdjust = Swivel ) Top-Down( SnapPbhAdjust = Orthogonal ) Facilities Tower( SnapPbhAdjust = None ) |
panpbhadjust | list |
None Ordinal Swivel Orthogonal |
Same range of options as snappbhadjust. |
Cockpit( PanPbhAdjust = Ordinal ) Virtual Cockpit( PanPbhAdjust = Swivel ) Top-Down( PanPbhAdjust = Orthogonal ) Facilities Tower( PanPbhAdjust = None ) |
snappbhreturn | bool | True/False | If true, camera position returns to its initial position when the snap movement command key is released. |
Cockpit( SnapPbhReturn = True ) Virtual Cockpit( SnapPbhReturn = False ) |
panpbhreturn | bool | True/False | If true, camera position returns to its initial position when the pan movement command key is released. |
Cockpit( PanPbhReturn = True ) Virtual Cockpit( PanPbhReturn = False ) |
track | list |
None FlyBy Track TrackBank FlatChase FlatChaseLocked |
External cameras have the ability to track a user or AI object. The Track parameter
controls this behavior: • None – No tracking behavior. User has manual control over the camera. • FlyBy – Fly-by mode; the camera is positioned away from the user aircraft (at a location given by ChaseDistance, ChaseAltitude and ChaseHeading values) and tracks the aircraft for ChaseTime seconds before computing a new position. • Track – Camera tracks the object while maintaining its position. • TrackBank – Camera tracks the object while maintaining its position. • FlatChase – Camera moves with the object, maintaining a fixed distance from it. Camera movements are dampened. • FlatChaseLocked – Camera moves with the object, maintaining a fixed distance from it. Camera movements are rigid. |
Cockpit( Track = None ) Spot( Track = FlatChase ) Locked Spot( Track = FlatChaseLocked ) FlyBy( Track = FlyBy ) Nearest Tower( Track = Track ) Facilities Runway( Track = TrackBank ) AI Planes( Track = Flat Chase ) |
showaxis | list |
Yes No FrontOnly |
Determines whether the axis indicator is shown. |
Cockpit( ShowAxis = FrontOnly ) Virtual Cockpit( ShowAxis = YES ) Spot( ShowAxis = No ) Top-Down( ShowAxis = Yes ) |
allowzoom | bool | Yes/No | Controls whether the camera responds to zoom commands. |
Cockpit( AllowZoom = TRUE ) Spot( AllowZoom = Yes ) |
VerticalFOV | float |
1.0 to 179.0 Default: 45.0 |
The vertical field-of-view, in degrees. If HorizontalFOV is not specified, the horizontal field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. | No examples. |
HorizontalFOV | float |
1.0 to 179.0 Default: 45.0 |
The horizontal field-of-view, in degrees. If VerticalFOV is not specified, the vertical field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. | No examples. |
initialzoom | float |
0.0 to 512.0 Default: 1.0 |
Sets the initial zoom. |
Cockpit( InitialZoom = 1.0 ) FlyBy( InitialZoom = 10.0 ) Top-Down( InitialZoom = 256 ) Nearest Tower( InitialZoom = 8.0 ) |
smoothzoomtime | float |
0.0 to 30.0 Default: 5.0 |
The zoom time in seconds. By default, zooming in and out is "smoothed" by changing between old and new zoom levels over a small time period (5 seconds). This setting enables you to control this effect on a per-camera basis. | Cockpit( SmoothZoomTime = 2.0 ) |
showweather | bool | Yes/No | Determines whether weather visuals are shown. |
Cockpit( ShowWeather = Yes ) Top-Down( ShowWeather = No ) |
InitialXyz | XYZ (see notes) |
-500.0 to 500.0 (for each of the three)
Defaults: 0.0 |
Camera XYZ position offset from the default location in meters. | See MBCameras example. |
InitialPbh | XYZ (see notes) |
-90 to 90.0 (pitch) -180 to 180.0 (bank and heading) Defaults: 0.0 |
Camera pitch, bank and heading orientation offset from the default in degrees. Note that positive pitches give a downward view. Positive headings are to the right. | See MBCameras example. |
xyzAdjust | bool | True/False | Controls whether the camera responds to position change commands. |
Cockpit( XyzAdjust = TRUE ) Spot( XyzAdjust = FALSE ) |
xyzRate | float | Default: 0.25 | The desired speed of the camera in meters per second. The direction of movement is determined by the camera control keys that are pressed. | |
xyzAccelleratorTime | float | Default: 5.0 | The time in seconds it will take for the camera to reach the speed set by xyzRate. A value of 0 will disable acceleration. Note that xyzAdjust must be set to True for this feature to be enabled. | |
showlensflare | bool | True/False | Determines whether lens flare effect can be shown (based on user setting). |
Cockpit( ShowLensFlare=FALSE ) Spot( ShowLensFlare=TRUE ) |
category | list |
Aircraft AirTraffic Cockpit Custom Outside Multiplayer Runway Scenery Observer Tower |
Every camera definition must include a category that defines how the camera is exposed in the user interface. Categories define the view cycling behavior (S and A keys) as well as the menu structure. Some categories (AirTraffic, Runway, Multiplayer and Tower) can also be instance-based, meaning new cameras are created automatically based on the object type. |
Cockpit( Category = Cockpit ) Spot( Category = Outside ) Nearest Tower( Category = Tower ) Facilities Runway( Category = Runway ) AI Planes( Category = AirTraffic ) Multiplayer Planes( Category = MultiPlayer ) |
momentumeffect | bool | Yes/No | Controls whether the camera exhibits momentum effect. This is determined by the settings in the Dynamic Head Movement section. | Virtual Cockpit( MomentumEffect = Yes ) |
zoompanscalar | float |
0.0 to 100.0
Default: 0.0 |
One side effect of zooming in on an object is that it becomes difficult to make fine camera panning adjustments because the absolute movement of the camera around its position remains constant. The ZoomPanScalar setting compensates for this by adjusting panning movements by the given factor in relation to zoom level. Movement is scaled by dividing the ZoomPanScalar value by the zoom level. For example, with a ZoomPanScalar setting of 1, camera panning is reduced by half at 2x zoom (1 / 2). A setting of 2, on the other hand, accelerates panning to twice the normal rate at 1x zoom (2 / 1) and is exactly the normal rate at 2x zoom (2 / 2). | Virtual Cockpit( ZoomPanScalar = 1.0 ) |
pitchpanrate | float |
0.0 to 100.0 Default: 10.0 |
Controls the rate at which pitch is changed in degrees per second. |
Virtual Cockpit( PitchPanRate=20 )
See PanRateTest example. |
headingpanrate | float |
0.0 to 100.0
Default: 30.0 |
Controls the rate at which heading is changed in degrees per second. |
Virtual Cockpit( HeadingPanRate=60 )
See PanRateTest example. |
panacceleratortime | float |
0.0 to 30.0 Default: 5.0 |
Pan acceleration time in seconds. When panning the camera, an acceleration/deceleration effect is added over a period of time. The larger this value is the longer it takes for the pan movement to reach its full rate (as controlled by PitchPanRate and HeadingPanRate), thus yielding smoother panning movement. Lower numbers yield more abrupt panning. | No examples. |
SmoothPanTime | float |
0.0 to 30.0 Default: 1.0 |
Smooth pan time in seconds. This is the target amount of time it will take to pan the camera to a new location. Use 0.0 to instantly pan. | No examples. |
hotkeyselect | integer |
1 to 10 No default. |
Links the camera to one of the 10 pre-defined key events for activating cameras; see the Control Assignments dialog. |
Virtual Cockpit( HotKeySelect=1 ) Spot( HotKeySelect=2 ) Nearest Tower( HotKeySelect=3 ) |
transition | bool | Yes/No | When switching between camera views a "smooth" transition is obtained by moving the camera in real time from its old location to the new one. Note that this behavior is only applied if the Transition settings for both cameras are set to yes. If either or both are set to No then the view switch is instantaneous. |
Spot( Transition = Yes ) Top-Down( Transition = No ) |
clipmode | string |
Normal
Minimum Spot Tower |
This setting is used to control how the clip planes are computed. Clip planes are
used to set the minimum and maximum distances for rendering in a 3D graphics program.
The relative location of these planes determines how precise the graphics engine
can maintain the Z-order of objects. A discussion of clip plane management is beyond
the scope of this document. However, the concept is relevant to the camera system
because it determines whether the camera favors near or far objects in the view:
• Normal – The near clip plane is scaled along with the zoom level. Useful for most views. • Minimum – Clamps the near clip plane at its absolute minimum value (1 meter). Useful for cameras where the camera is placed close to object geometry (e.g., aircraft cameras). • Spot – Favors distant objects by scaling the near clip plane with altitude and distance. Useful when the camera is positioned a reasonable distance away from the target object (e.g., spot view). • Tower – Favors near objects by scaling the near clip plane by one-half the zoom level and clamping the far plane based on visibility settings with an absolute limit of 20km. Useful when objects at the limits of visibility aren't important. |
Spot( ClipMode = Spot ) FlyBy( ClipMode = Tower ) |
chasedistance | float |
0.0 to 3000.0 Default: 0.0 |
Initial distance in meters of the camera from the target object in external views. | FlyBy( ChaseDistance = 500 ) |
ChaseDistanceAdjustRate | float |
1.0 to 250.0
Default: 5.0 |
Controls the rate at which chase distance changes when incremented or decremented using key events | |
chaseheading | float |
-180.0 to 180.0 Default: 0.0 |
Initial angular offset in degrees of the camera relative to the target object in external views. | FlyBy( ChaseHeading = 15 ) |
chasealtitude | float |
-1000.0 to 3000.0 Default: 0.0 |
Initial altitude in feet of the camera relative to the target object in external views. | FlyBy( ChaseAltitude = 10 ) |
chasetime | float |
0.0 to 200.0 exclusive Default: 10.0 |
Length of time in seconds an aircraft is kept in Fly-By view before a new position is computed. | FlyBy( ChaseTime = 20 ) |
instancedbased | Bool | Yes/No | If Yes, a new instance of the camera is created for each instance of the object referenced by the TargetCategory setting. | Facilities Tower( InstancedBased = Yes ) |
cyclehideradius | float |
0.0 to 100.0 Default: 0.0 |
For instance based cameras, sets the distance (in nautical miles) beyond which the camera is skipped in the cycling order. | Facilities Tower( CycleHideRadius = 7 ) |
targetcategory | list |
None AI Planes Fixed |
Determines which object class, when a new instance is created, triggers the creation of a new InstanceBased camera. |
Facilities Runway( TargetCategory = Fixed ) AI Planes( TargetCategory = AI Planes ) |
cyclehidden | bool | Yes/No | If Yes, the camera is hidden from view cycling—it does not appear when cycling through views using the keyboard. | Facilities Runway( CycleHidden=Yes ) |
menuhidden | bool | Yes/No | If Yes, the camera is not displayed on any standard view menus. Typically only used for virtual cameras that render special off-screen features. | See FixedCameraTest. |
LinkGroup | integer |
1 or greater Default: 0 (Disabled) |
If set to an integer value greater than 0, all other cameras with the same LinkGroup number will all move concurrently when this camera is controlled. This requires View Linking to be enabled. To enable View Linking assign a key to the "View - link all (toggle)" event in the control options menu. | LinkGroup = 1 |
PanelOnly | bool | True/False | Controls whether the camera is Panel Only (render to black). | |
MultiViewDisplay | bool | True/False | Enables Multi-view display configuration. (Used to create a grid of views.) | |
BezelCorrection | float |
0.0 to 10.0 Default: 0.0 |
Specify the bezel correction (in degrees) used for multi view displays | |
GridX | integer |
1 to Number of Displays Default: 1 |
Specify number of horizontal views in the multi display configuration | |
GridY | integer |
1 to Number of Displays Default: 1 |
Specify number of vertical views in the multi display configuration | |
HideShadows | integer |
0 to 1 Default: 0 |
Disables shadows on a per-view basis. 0 uses global display settings, 1 disables shadows. | |
HideReflection | integer |
0 to 1 Default: 0 |
Disables reflections on a per-view basis. 0 uses global display settings, 1 disables reflections. | |
HideModels | integer |
0 to 1 Default: 0 |
Disables models on a per-view basis. 0 uses global display settings, 1 disables models. | |
HideParticles | integer |
0 to 1 Default: 0 |
Disables the particles on a per-view basis. 0 uses global display settings, 1 disables the particles. | |
HideSky | integer |
0 to 1 Default: 0 |
Disables the sky on a per-view basis. 0 uses global display settings, 1 disables the sky. | |
HideTerrain | integer |
0 to 1 Default: 0 |
Disables terrain on a per-view basis. 0 uses global display settings, 1 disables terrain. | |
HideUserAircraft | integer |
0 to 1 Default: 0 |
Disables user aircraft on a per-view basis. 0 uses global display settings, 1 disables user aircraft. | |
HideAutogen | integer |
0 to 1 Default: 0 |
Disables autogen on a per-view basis. 0 uses global display settings, 1 disables autogen. | |
HideScreenSpace | integer |
0 to 1 Default: 0 |
Disables screen space on a per-view basis. 0 uses global display settings, 1 disables screen space objects. | |
HideMissionObjects | integer |
0 to 1 Default: 0 |
Disables mission objects on a per-view basis. 0 uses global display settings, 1 disables mission objects. | |
ShowLabels | bool | True/False | Overrides global aircraft label setting on a per view basis. | |
AllowBelowGround | bool | True/False | Allow camera to go below ground. | |
NoSortTitle | bool | True/False | Disable sorting camera by title in the menu system. | |
UseSimVelocity | bool | True/False | Allow simulated velocity to affect camera movement. | |
MinZoom | float |
0.3 to 512 Default: 0.3 |
Sets the minimum zoom level of camera. This acts as a threshold. The actual minimum zoom level in the simulation will be greater-than or equal-to this value and will be chosen from an internal table. | |
MaxZoom | float |
0.3 to 512 Default: 512 |
Sets the maximum zoom level of camera. This acts as a threshold. The actual maximum zoom level in the simulation will be less-than or equal-to this value and will be chosen from an internal table. | |
UseGlobalTerrainView | bool | True/False | By default, every camera has its own terrain view which requests texture and dem tiles near the camera. For multi-view scenarios, it may be desirable to have views simply render the terrain tiles loaded by other views. Setting this option to True will prevent this camera from creating a terrain view unless it is the default 3d view. If set, this value will override the UseGlobalTerrainView entry in the Terrain section of Prepar3D.cfg which effects all cameras. |
Notes:
- "XYZ" value types denote a set of three numeric values expressed as a comma-separated string in the configuration file (for example: InitialPbh=0, 10, -40). Each value can be positive or negative and there must be a space between each comma and the following value.
- Yes and No are interchangeable with True and False for boolean entries.
Observer Options
Property | Type | Range | Description | Examples |
---|---|---|---|---|
ObserverStepSize | float |
0.0 to 3.4E+38 Default: 1.0 |
For Observer-based cameras, the discrete step size used for user-initiated movements, in meters. | No examples. |
ObserverAngularStep | float |
0.0 to 3.4E+38 Default: 0.05 |
For Observer-based cameras, the discrete step size used for user-initiated rotations, in radians. | No examples. |
ObserverVerticalFOV | float |
1.0 to 179.0 Default: 45.0 |
For Observer-based cameras, the vertical field-of-view, in degrees. If ObserverHorizontalFOV is not specified, the horizontal field-of-view will be automatically calculated based on the display aspect ratio. | No examples. |
ObserverHorizontalFOV | float |
1.0 to 179.0 Default: 45.0 |
For Observer-based cameras, the horizontal field-of-view, in degrees. If ObserverVerticalFOV is not specified, the vertical field-of-view will be automatically calculated based on the display aspect ratio. | No examples. |
ObserverFocalLength | float |
1.0 to 100000.0 Default: 2.0 |
Focal length used with view direction to calculate the target position | No examples. |
FixedLatitude | latitude |
-90.0 to 90.0 Latitude values can be expressed in decimal (-90 to +90) or hemispheric (N90 to S90) notation. Default: 0.0 |
For Fixed camera types, the latitude of the cameras position. | See FixedCameraTest. |
FixedLongitude | longitude |
-180.0 to 180.0 Longitude values can be expressed in decimal (-180 to +180) or hemispheric (W180 to E180) notation. Default: 0.0 |
For Fixed camera types, the longitude of the cameras position. | See FixedCameraTest. |
FixedAltitude | float |
-500.0 to 30,000,000.0
Default: 0.0 |
For Fixed camera types, the altitude of the cameras position in meters. | See FixedCameraTest. |
ObserverLatitude | latitude |
-90.0 to 90.0 Latitude values can be expressed in decimal (-90 to +90) or hemispheric (N90 to S90) notation. Default: 0.0 |
For Observer-based camera types, the latitude of the initial observer position. | No examples. |
ObserverLongitude | longitude |
-180.0 to 180.0 Longitude values can be expressed in decimal (-180 to +180) or hemispheric (W180 to E180) notation. Default: 0.0 |
For Observer-based camera types, the longitude of the initial observer position. | No examples. |
ObserverAltitude | float |
-500.0 to 30,000,000.0
Default: 0.0 |
For Observer-based camera types, the altitude of the initial observer position in meters. | No examples. |
TargetLatitude | latitude |
-90.0 to 90.0 Latitude values can be expressed in decimal (-90 to +90) or hemispheric (N90 to S90) notation. Default: 0.0 |
For Observer-based camera types, the latitude of the observer target (focal) point. If a target point is specified, it will override any InitialPbh settings. | No examples. |
TargetLongitude | longitude |
-180.0 to 180.0 Longitude values can be expressed in decimal (-180 to +180) or hemispheric (W180 to E180) notation. Default: 0.0 |
For Observer-based camera types, the longitude of the observer target (focal) point. If a target point is specified, it will override any InitialPbh settings. | No examples. |
TargetAltitude | float |
-500.0 to 30,000,000.0
Default: 0.0 |
For Observer-based camera types, the altitude of the observer target (focal) point in meters. If a target point is specified, it will override any InitialPbh settings. | No examples. |
ObserverAllowBelowWater | bool | True/False | Allow observer camera to go under water. | |
ObserverGhostMode | bool | True/False | Enable ghost mode allowing the camera to pass though objects and terrain. |
Sensor and Post Processing View Options
IR Sensors use a basic thermal model in which terrain, water, air, buildings, and vehicles have different core temperatures. Terrain and water temperatures change in response to location/climate, time of day, and day of year. Post Processing can be used to simulate IR or NVG (Night Vision Goggles), by applying image post processing to colorize/modify the rendered scene. Sensor and Post Processing modes are not exclusive and can be used together simultaneously if needed. Either view type can be combined with RenderToTexture settings to create a glass-cockpit display showing a sensorized or post processed view.
Property | Type | Range | Description | Examples |
---|---|---|---|---|
SensorMode | list |
NONE IRWhiteHot IRBlackHot GData |
Used to render the view in IR Sensor Mode. | See PostProcessedViews. |
PostProcess00 - PostProcess15 | string | N/A | Adds a post process effect to a camera. This string must match the filename of a post process in the PostProcess directory (Prepar3D\ShadersHLSL\PostProcess) without the .xml extension (i.e. PostProcess00 = GreenScaleColorizer). Up to 16 effects can be added to a view and will run in the order specified. Custom post process effects, if defined, can also be added this way. | See PostProcessedViews. |
VCTransparency | integer |
0 to 100 Default: 0 (Fully opaque) |
Adjusts the virtual cockpit transparency percentage. | |
ExcludeVcPostProcess | bool | True/False | Prevents entire virtual cockpit from having a PreVC (defined in post process xml) post process applied. (Default is false, only panels are excluded) | |
ExcludeVcPanelsSensor | bool | True/False | Prevents virtual cockpit panels from being sensorized. |
Render To Texture Options
Views can be configured to render the scene into a virtual texture. These textures can be used in the same way that VCockpit panel textures are used to map the output onto a polygon in the virtual cockpit.
Property | Type | Range | Description | Examples |
---|---|---|---|---|
RenderToTexture | bool |
FALSE TRUE |
Enables or disables render-to-texture functionality. These views are not selectable in the view menu and are only displayed if embedded in a panel, virtual cockpit, etc. | See PostProcessedViews. |
TextureSizeX | integer |
0 to 4096 Default: Automatically scales. |
Overrides texture size, if not set texture will size according to the size of the view. | |
TextureSizeY | integer |
0 to 4096 Default: Automatically scales. |
Overrides texture size, if not set texture will size according to the size of the view. |
Dynamic Head Movement
The Prepar3D camera system can compute acceleration parameters to simulate head movement. The effect is controlled by settings in the Prepar3D.cfg file, which can be found in the the %APPDATA%\Lockheed Martin\Prepar3D v2 folder. The simulation uses these settings to compute how much camera acceleration (pitch, roll, side-to-side, and fore-to-aft) is generated in relation to aircraft accelerations. The table below describes each setting. Note that negative numbers move the camera in the opposite direction to the acceleration.
Note:
This same section can be added to an individual aircraft.cfg file to override the global defaults in the Prepar3D.cfg for that particular aircraft.
[dynamicheadmovement]
Property | Type | Range | Description | Examples |
---|---|---|---|---|
lonaccelonheadlon | float | -0.02 | Computes the camera's longitudinal (fore-to-back) change generated by longitudinal acceleration of the aircraft. | LonAccelOnHeadLon=-0.020000 |
lonaccelonheadpitch | float | -0.01 | Computes the camera's pitch change generated by longitudinal acceleration of the aircraft. | LonAccelOnHeadPitch=-0.010000 |
rollaccelonheadlat | float | 0.01 | Computes the camera's lateral (side-to-side) change generated by rolling acceleration of the aircraft. | RollAccelOnHeadLat=0.010000 |
yawaccelonheadlat | float | -0.1 | Computes the camera's lateral (side-to-side) change generated by yawing acceleration of the aircraft. | YawAccelOnHeadLat=-0.100000 |
rollaccelonheadroll | float | 0.1 | Computes the camera's rolling motion generated by rolling acceleration of the aircraft. | RollAccelOnHeadRoll=0.100000 |
maxheadangle | float | 5.0 | Maximum allowed angular change in degrees. | MaxHeadAngle=5.000000 |
maxheadoffset | float | 0.3 | Maximum allowed lateral change in feet. | MaxHeadOffset=0.300000 |
headmovetimeconstant | float | 1.0 | Acceleration multiplier (higher numbers increase responsiveness). | HeadMoveTimeConstant=1.000000 |
Examples
The SDK includes several example files that you can use to observe how changes to camera configuration settings affect behavior. Copy the .FXML files to the %USERPROFILE%\Documents\Prepar3D v2 Files folder and then load them in Prepar3D.
Example | Description |
---|---|
PostProcessedViews |
This flight defines two cameras that appear in the "Custom" category with different
post process view settings. Camera one creates a normal window-based view that presents
the scene in a faux-white-hot green-scale display. Camera two creates a gauge-driving
view that presents the scene in grayscale; it is rendered offscreen with its resultant
texture handled only by the gauge. It cannot be accessed through any normal view
operations. To the end-user, this view does not exist within the context of the
window-based system. They only see the result as displayed by the gauge. If FLT files are associated with the simulation -- click here to run the flight: PostProcessedViews.FLT |
PanRateTest |
This flight defines six cameras that appear in the "Custom" category with different
pan rate settings. Pan the view with the joystick hat switch or numeric keypad (with
NumLock selected).
If FLT files are associated with the simualtion -- click here to run the flight: PanRateTest.FLT |
FixedCameraTest |
This flight defines four fixed cameras that surround the end of runway 04 at Rochester
(New York) International airport. The positions are defined by these settings in
the camera definitions of the flight file: FixedLatitude=N43.103570 FixedLongitude=W77.690494 FixedAltitude=230 These cameras also feature smooth transitions. Select one of the cameras from the Views menu and then press the A key to cycle through each position. If FLT files are associated with the simualtion -- click here to run the flight: FixedCameraTest.FLT |
Mooney-Bravo-Cameras-text |
This file includes definitions that add two additional Virtual Cockpit cameras to
the Mooney Bravo, including rear seat right and rear seat left views. To use these
cameras you must first copy the contents of the file into the AIRCRAFT.CFG file
located in the Mooney Bravo folder. By default this is C:\Program Files (x86)\Lockheed
Martin\Prepar3D v2\i386\SimObjects\Airplanes\Mooney_Bravo. After you save
the file simply load the Mooney Bravo in Prepar3D. These new views will be
available from the Cockpit category. The views were created by offsetting the default
eye point using the InitialXyz and InitialPbh settings. The views are 90 degrees
out and 10 degrees down, and give images such as (rear seat right): |