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 v4. 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.
Avatar Cameras
When the user is in the Avatar SimObject, the control scheme can be switched between first and third person on a per camera basis. Setting the AvatarMode camera definition property (see below) can be used to determine which control scheme should be used for that camera. The Avatar SimObject will select the control scheme based on which view is currently active. When switching into Avatar, the camera definition with the Avatar Default GUID (see below) will be selected.
Scenario Cameras
You can also define cameras that specific to a scenario. As with aircraft cameras these are defined in the .FXML file using the same definition format. When a user loads a scenario, any existing scenario-specific cameras are removed and new ones are added. Refer to the Scenario 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} ) Avatar Default( Guid = {4488BE22-8EB5-479f-8B36-5A150EF732E2} ) |
|
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 Center No Orient Pilot Tower Fixed Observer WorldObject Virtual Cockpit World Object AttachPoint |
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. • Center No Orient – External (spot plane) camera that not inherit target orientation. • 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. • Virtual Cockpit World Object – Used by SimDirector's Camera Object. Not available through CFG settings. • AttachPoint – Can be used to position the camera at an attach point. Requires the AttachPointName property to be defined. 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 ) |
TerrainLodOrigin | list |
Default Camera Target User |
Cameras load terrain with a certain radius of the camera's terrain LOD origin. For some cases such as tracking cameras, it is desirable to load terrain based on the location of the target, or the location of the object to which the camera is attached. |
Allow Prepar3D to choose based on the camera type:
Default( TerrainLodOrigin = Default ) Use location of the camera: TerrainLodOrigin = Camera Use the location of the camera's target: Target( TerrainLodOrigin = Target ) Use location of sim object the camera is associated with: User( TerrainLodOrigin = User ) |
SceneryLodOrigin | list |
Default Camera Target User |
Cameras load scenery (models, buildings, etc) within a certain radius of the camera's scenery LOD origin. By default, the camera's location is used. |
Allow Prepar3D to choose based on the camera type: Default( SceneryLodOrigin = Default ) SceneryLodOrigin = Camera Use the location of the camera's target: Target( SceneryLodOrigin = Target ) Use location of sim object the camera is associated with: User( SceneryLodOrigin = User ) |
AttachPointName | string | The name of the attach point where the camera should be positioned. Requires the Origin property to be set to AttachPoint. |
First Person (Attached)( Origin = AttachPoint ) First Person (Attached)( AttachPointName = attachpt_EyePoint_0 ) |
|
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 = FlatChaseLocked ) |
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. |
LeftSideAngle | float |
-70.0 (left), 70.0 (right) 0 is the forward view axis. Default: Unused |
Angle offset to the left edge of the view. Side angles can be used to override the field-if-view and create an off-axis projection. All four side angle values should be set. If not specified, the field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. |
A 60 degree HFOV and 30 degree VFOV expressed using SideAngles: LeftSideAngle = -30 RightSideAngle = 30 TopSideAngle = 15 BottomSideAngle = -15 |
RightSideAngle | float |
-70.0 (left), 70.0 (right) 0 is the forward view axis. Default: Unused |
Angle offset to the right edge of the view. Side angles can be used to override the field-if-view and create an off-axis projection. All four side angle values should be set. If not specified, the field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. |
Off-axis projection that displays the left half of a 60 degree HFOV and 30 degree VFOV expressed using SideAngles: LeftSideAngle = -30 RightSideAngle = 0 TopSideAngle = 15 BottomSideAngle = -15 |
TopSideAngle | float |
-70.0 (bottom), 70.0 (top) 0 is the forward view axis. Default: Unused |
Angle offset to the top edge of the view. Side angles can be used to override the field-if-view and create an off-axis projection. All four side angle values should be set. If not specified, the field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. |
A 60 degree HFOV and 30 degree VFOV expressed using SideAngles: LeftSideAngle = -30 RightSideAngle = 30 TopSideAngle = 15 BottomSideAngle = -15 |
BottomSideAngle | float |
-70.0 (bottom), 70.0 (top) 0 is the forward view axis. Default: Unused |
Angle offset to the left edge of the view. Side angles can be used to override the field-if-view and create an off-axis projection. All four side angle values should be set. If not specified, the field-of-view will be automatically calculated based on the display aspect ratio. Zoom values are ignored when field of view is set directly. |
Off-axis projection that displays the top-right quarter of a 60 degree HFOV and 30 degree VFOV expressed using SideAngles: LeftSideAngle = 0 RightSideAngle = 30 TopSideAngle = 15 BottomSideAngle = 0 |
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. |
CenterOffsetXyz | XYZ (see notes) |
-500.0 to 500.0 (for each of the three)
Defaults: 0.0 |
The offset of the camera Origin in meters. This setting is only valid when the Origin is set to type Center. | |
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 HMD |
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 ) Head-Mounted Displays( Category = HMD ) |
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 ) |
AvatarMode | list |
None First Third |
Used to specify the AvatarMode of this camera. This setting informs the Avatar which control scheme
should be used when this camera is active.
• None – Avatar mode not specified. • First – Avatar should use the first person control scheme when this camera is active. • Third – Avatar should use the third person control scheme when this camera is active. |
First Person( AvatarMode = First ) Third Person( AvatarMode = Third ) |
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 ) |
ChaseVelocityScalarMin | float |
Greater than or equal to zero. Default: 0.4 |
The minimum scalar value applied to the chase camera velocity. | Third Person( ChaseVelocityScalarMin = 0.0 ) |
ChaseVelocityScalarMax | float |
Greater than or equal to zero. Default: 0.4 |
The maximum scalar value applied to the chase camera velocity. | Third Person( ChaseVelocityScalarMax = 0.4 ) |
ChaseVelocityDeltaMin | float |
Greater than or equal to zero. Default: 0.0 |
The minimum delta position in meters between frames to begin interpolation between minimum and maximum velocity scalar values. | Third Person( ChaseVelocityDeltaMin = 15.0 ) |
ChaseVelocityDeltaMax | float |
Greater than or equal to zero. Default: 0.0 |
The maximum delta position in meters between frames to continue interpolation between minimum and maximum velocity scalar values. | Third Person( ChaseVelocityDeltaMax = 25.0 ) |
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 |
OffsetX | float | -500.0 to 500.0 | When set to a value less than or greater than 0.0, the camera will remain offset by that distance from the origin point of a camera group. | OffsetX = 1.0 |
OffsetY | float | -500.0 to 500.0 | When set to a value less than or greater than 0.0, the camera will remain offset by that distance from the origin point of a camera group. | OffsetY = 1.0 |
OffsetZ | float | -500.0 to 500.0 | When set to a value less than or greater than 0.0, the camera will remain offset by that distance from the origin point of a camera group. | OffsetZ = 1.0 |
OffsetP | float | -180.0 to 180.0 | When set to a degree value less than or greater than 0.0, the camera will Pitch by that value. | OffsetP = 45.0 |
OffsetB | float | -180.0 to 180.0 | When set to a degree value less than or greater than 0.0, the camera will Bank by that value. | OffsetB = 45.0 |
OffsetH | float | -180.0 to 180.0 | When set to a degree value less than or greater than 0.0, the camera will change its heading by that value. | OffsetB = 45.0 |
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 drawing of shadows on a per-view basis. 0 uses global display settings, 1 disables shadows. |
|
HideReflection | integer |
0 to 1 Default: 0 |
Disables drawing of reflections on a per-view basis. 0 uses global display settings, 1 disables reflections. |
|
HideModels | integer |
0 to 1 Default: 0 |
Disables drawing of models on a per-view basis. 0 uses global display settings, 1 disables models. |
|
HideParticles | integer |
0 to 1 Default: 0 |
Disables drawing of particles on a per-view basis. 0 uses global display settings, 1 disables the particles. |
|
HideSky | integer |
0 to 1 Default: 0 |
Disables drawing of the sky on a per-view basis. 0 uses global display settings, 1 disables the sky. |
|
HideTerrain | integer |
0 to 1 Default: 0 |
Disables drawing of terrain on a per-view basis. 0 uses global display settings, 1 disables terrain. |
|
HideUserAircraft | integer |
0 to 1 Default: 0 |
Disables drawing of the user aircraft on a per-view basis. Can be used to prevent the user's Virtual Cockpit from being displayed. 0 uses global display settings, 1 disables user aircraft. |
|
HideUserAvatar | integer |
0 to 1 Default: 0 |
Disables drawing of the user avatar on a per-view basis. 0 uses global display settings, 1 disables user avatar. |
|
HideAutogen | integer |
0 to 1 Default: 0 |
Disables drawing of autogen on a per-view basis. 0 uses global display settings, 1 disables autogen. |
|
HideScreenSpace | integer |
0 to 1 Default: 0 |
Disables drawing of 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 drawing of scenario objects on a per-view basis. 0 uses global display settings, 1 disables scenario 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. | |
NearClipOverride | float |
Greater than zero. Default: Variable |
Overrides the near clip plane of the camera. Units are in meters. Setting a near clip value too low could potentially cause z-fighting in the distance due to lose of depth buffer precision. | |
FarClipOverride | float |
Greater than zero. Default: Variable |
Overrides the far clip plane of the camera. Units are in meters. This value should be large enough to cover the distance desired to be visible to the camera. If NearClipOverride is used, the FarClipOverride value should be larger than the NearClipOverride value. | |
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. | |
HmdType | list |
None Oculus |
Sets if the camera is to be used with an HMD (Head-Mounted Display) | |
RenderDesignators | bool | True/False | Enable/disable the rendering of designator lasers produced by objects that implement the IDesignatorService interface or when receiving Designator PDU's from an active Distributed Interactive Simulation (DIS) session. | |
TargetCrosshairs | bool | True/False |
When enabled, this option will force the avatar's gun system to orient all equipped guns in the same direction as the main view's camera.
Notes:
|
|
ScaleformOverlay | string | The path and name of the .swf file to use as an overlay for this view. The overlay will display on top of the camera when opened. This path can be relative to the config file containing this camera or an absolute path. If only a filename is provided the .swf file we be looked for in the directory locations provided by the scaleform.cfg file. |
First Person( ScaleformOverlay=Crosshair.swf ) |
|
SourceDataFromTarget | bool | True if the camera's target object should be used to source data such as simulation variables or key events. This is currently only used by Scaleform overlays. |
Compass( SourceDataFromTarget=TRUE ) |
|
PitchAdjustRate | float | default: 2.5 | The adjustment rate of pitch in degrees per second while pitching using smooth axis event based pitch control. Use PitchPanRate for POV or button based pan rate control. | |
BankAdjustRate | float | default: 2.5 | The adjustment rate of bank in degrees per second while banking using smooth axis event based bank control. There is no equivalent for POV or button based bank rate control. | |
HeadingAdjustRate | float | default: 2.5 | The adjustment rate of heading in degrees per second while changing heading using smooth axis event based heading control. Use HeadingPanRate for POV or button based pan rate control. | |
LateralMoveRate | float | default: 0.01 | The adjustment rate in meters per second while laterally moving using smooth axis event based eyepoint control. Use XyzRate for POV or button based lateral rate control. | |
LongitudinalMoveRate | float | default: 0.01 | The adjustment rate in meters per second while longitudinally moving using smooth axis event based eyepoint control. Use XyzRate for POV or button based longitudinal rate control. | |
VerticalMoveRate | float | default: 0.01 | The adjustment rate in meters per second while vertically moving using smooth axis event based eyepoint control. Use XyzRate for POV or button based vertical rate control. | |
ZoomAdjustRate | float | default: 0.10 | The adjustment rate in magnification per second while zooming using smooth axis event based zoom control. Use ZoomPanScalar for POV or button based zoom rate control. | |
SmoothOrientationResetTime | float | default: 0.50 | The time in seconds that it will take to reset the orientation back to the origin when using smooth orientation reset. | |
SmoothEyepointResetTime | float | default: 0.50 | The time in seconds that it will take to reset the eyepoint back to the origin when using smooth eyepoint reset. | |
SoundDisabled | bool | True/False | Set to true to mute all sounds when this camera is active. |
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. | |
TargetFrameRate | float |
0.0 to 60.0
Default: 0.0 |
Sets the target frame rate for the specific camera. This is only used to reduce the rate at which certain cameras update and will be ignored if this value is greater than the current average frame rate. | No examples. |
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. |
IgnorePostProcess00 - IgnorePostProcess03 | string | N/A | Adds a post process effect to a list of ignored effects. This prevents the application or plugins from adding these effects at runtime. | Disable HDR and FXAA for a specific camera: IngnorePostProcess00 = HDRPostProcess IngnorePostProcess01 = FXAAResolve |
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 %APPDATA%\Lockheed Martin\Prepar3D v4 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 v4 Files folder and then load them in Prepar3D.
Example | Description |
---|---|
Post Processed Views |
This scenario 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 FXML files are associated with the simulation -- click here to run the scenario: post_processed_views.fxml |
Pan Rate Test |
This scenario 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 FXML files are associated with the simulation -- click here to run the scenario: pan_rate_test.fxml |
Fixed Camera Test |
This scenario 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 scenario 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 FXML files are associated with the simulation -- click here to run the scenario: fixed_camera_test.fxml |
Mooney Bravo Cameras |
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\Lockheed
Martin\Prepar3D v4\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): |