CAMERA DEFINITION PROPERTIES
The cameras configuration file is an optional file that may be included along with other files for a SimObject and is called cameras.cfg
. Legacy projects not made with (or for) Microsoft Flight Simulator will have their camera properties set in either sim.cfg
or container.cfg
- for SimObjects - or aircraft.cfg
- for non-aircraft SimObjects.
Below you can find information on the different sections used in the cameras.cfg
file as well as what parameters and values are expected within them.
[VERSION]
The [VERSION]
section provides version information for the configuration file. In Microsoft Flight Simulator, major versions should always be at least equal to 1. Note that this information is mandatory and should always be included.
Parameter | Description | Type |
---|---|---|
major | Major CFG file version number, values must be greater than 0. | Integer |
minor | Minor CFG file version number, values must be greater than 0. | Integer |
[VIEWS]
The [VIEWS]
section has the following elements and is used to determine the base position of the cockpit camera (note that all the camera definitions will be defined relative to this point):
Parameter | Description | Type |
---|---|---|
eyepoint |
longitudinal, lateral, and vertical distance from the center of the aircraft model. |
1D Table of Floats (see Data Types for more information) |
external_camera_distance |
If this parameter is included and the value given is positive, it will be used as the priority distance for the camera (in feet) from the aircraft.
If set to 0 or a negative value or not included, then the following rules will be applied to the camera distance:
|
Float |
camera_distance_coefficient |
This value will be used as a multiplier on the camera distance under certain circumstances, and when the Default value is 7. |
Float |
[CAMERADEFINITION.N]
In a single cameras.cfg
file you can define multiple cameras for a single aircraft or SimObject. Each camera will need it's own [CAMERADEFENITION.N]
header and contents, where N
is the numeric identifier for the camera, starting at 0. The table below outlines all the possible entries into the CFG file for a camera, but it's worth pointing out the following as being the most important when it comes to setting up:
InitialXyz
(position) andInitialPbh
(angle): These are used to set the initial position offsets and the viewing angle for the camera. Note thatInitialPbh
is not used when theSubCategoryItem
is set to "PilotVR", and the "bank" value will not be used when the camera is set toCockpit
.Origin
: The origin of the camera, which can be any one of a number of pre-defined values (listed in the table below)Category
: What kind of camera you are setting, which can be any one of a number of pre-defined values (listed in the table below)
IMPORTANT! The first camera to be defined (0), must have the Category set to Cockpit, and have the Pilot subcategory, otherwise the camera file will not be parsed correctly.
Parameter | Description | Type |
---|---|---|
Title |
This is descriptive only, not used by the system | String |
UITitle |
This is a localisable string that will be used to show the name of the camera in the simulation. | String |
GUID |
Camera definition's unique identifier. This GUID must be unique. | String (format {GUID}) |
Description |
A brief description of the camera. | String |
Category |
Every camera definition must include a category that defines how the camera is exposed in the user interface. Categories define the view cycling behavior as well as the menu structure. Some categories (
Note that the first camera definition (0) should always be for the Cockpit, and also always have the Pilot sub-category. |
String:
|
SubCategory |
You can specify the principle role of the camera with the "subcategory". This defines the context we need the user to view. |
String:
|
SubCategoryItem |
|
String:
|
InitialXyz |
Camera XYZ position offset from the default location. All values are in meters with a range of -500.0 to 500.0 (for each of the three), and default to 0.0 |
xyz defined as a 1D Table of floats
(see Data Types for more information) |
InitialPbh |
Camera pitch, bank and heading orientation offset from the default in degrees. Note that positive pitches give a downward view, and positive headings are to the right. All values are in degrees, between:
NOTE: This parameter is not used when the IMPORTANT! When using the Cockpit camera, the "bank" value will be ignored. |
pbh defined as a 1D Table of Floats
(see Data Types for more information) |
Initialzoom |
Sets the initial camera zoom level. The defaults value is 1.0. |
Float 0.0 to 512.0 |
VarToggle |
Originally this parameter was for defining a node that would be hidden when the camera being defined was active, however now it functions as a simple toggle for local variables. You supply one (or more) This is useful, in particular when using different model behaviours - for example using the visibility template to to hide the yoke when a specific camera that is viewing an instrument. Note that this toggle of the
The default value is "", and you may supply multiple |
String |
BoundingBoxRadius |
Allows you to define a bounding box to the camera - in meters - which can be used with the instrument camera to give more or less "space" between the camera and the instrument auto selection and the focus with the mouse going over it. The default value is 0.1, and all values are in meters. |
Float |
ChaseDistance |
The initial distance (in meters) of the camera from the target object in external views. The default value is 0.0. |
Float |
ChaseHeading |
Initial angular offset in degrees of the camera relative to the target object in external views. The default value is 0.0. |
Float -180.0 - 180.0 |
ChaseAltitude |
Initial altitude in feet of the camera relative to the target object in external views. The default value is 0.0. |
Float -1000.0 - 3000.0 |
ChaseTime |
Length of time in seconds an aircraft is kept in Fly-By view before a new position is computed. The default value is 10.0. |
Float 0.0 - 200.0 |
ChaseDistanceAdjustRate |
This controls the rate at which chase distance changes when incremented or decremented using key events. The default value is 5.0. | Float 1.0 - 250.0 |
external_camera_follows_heading |
This sets the speed (in ktas) below which the external camera should follow the aircraft heading. Default value is 19.4 (corresponds 10 m/sec exactly). |
Float |
external_camera_follows_velocity |
This sets the speed (in ktas) above which the external camera should follow the aircraft velocity vector. Default value is 48.6 (corresponds 25 m/sec exactly). |
Float |
HotKeySelect |
Links the camera to one of the 10 pre-defined key events for activating cameras. |
Integer 1 - 10 |
Note that a number of settings in this file are legacy from FSX or have been deprecated in the current version, and as such are not used by Microsoft Flight Simulator, but may still be included in the CFG file. These settings are listed in the table below and have a default value which you should always use when creating new cameras, as any other value will not work.
Parameter | Description | Version | Type |
---|---|---|---|
MomentumEffect |
Controls whether the camera exhibits momentum effect. The default value is TRUE (1). |
FSX |
Bool |
SnapPbhAdjust |
These settings control how camera movement is handled when the camera system receives a view pan or "snap to" command. The default value is "Swivel". |
FSX | String:
|
SnapPbhReturn |
If TRUE (1), camera position returns to its initial position when the snap movement command key is released. The default value is FALSE (0). |
FSX | Bool |
PanPbhAdjust |
Same range of options as The default value is "Swivel". |
FSX |
String:
|
PanPbhReturn |
If true (1), camera position returns to its initial position when the pan movement command key is released. The default value is FALSE (0). |
FSX | Bool |
Track |
External cameras have the ability to track a user or AI object. The Track parameter controls this behavior. The default value is "None". |
FSX | String:
|
ShowAxis |
Determines whether the axis indicator is shown. The default value is ON. |
FSX |
Enum:
|
AllowZoom |
Controls whether the camera responds to zoom commands. The default value is TRUE (1). |
FSX | Bool |
ZoomPanScalar |
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 The default value is 1.0. |
FSX | Float 0.0 to 100.0 |
ShowWeather |
Determines whether weather visuals are shown. The default value is true (1). |
FSX | Bool |
XyzAdjust |
Controls whether the camera responds to position change commands. The default value is TRUE (1). |
FSX | Bool |
ShowLensFlare |
Determines whether lens flare effect can be shown (based on user setting). The default value is FALSE (0). |
FSX | Bool |
PitchPanRate |
Controls the rate at which pitch is changed in degrees per second. The default value is 20.0. |
FSX | Float 0.0 - 100.0 |
HeadingPanRate |
Controls the rate at which the heading is changed in degrees per second. The default value is 60.0. |
FSX | Float 0.0 - 100.0 |
ClipMode |
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. Default value is "Normal". |
Microsoft Flight Simulator |
String:
|
BoundingBoxRadius |
Allows you to define a bounding box to the camera - in meters - which can be used with the instrument camera to give more or less "space" between the camera and the instrument auto selection and the focus with the mouse going over it. The default value is 0.1, and all values are in meters. |
Microsoft Flight Simulator |
Float |
TargetCategory |
When a new instance is created this determines which object class triggers the creation of a new Default value is "None". |
Microsoft Flight Simulator |
String:
|
PanAcceleratorTime |
This defines the 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, thus yielding smoother panning movement. Lower numbers yield more abrupt panning. The default value is 5.0. |
Microsoft Flight Simulator |
Float 0.0 - 30.0 |
InitialXyz |
Camera XYZ position offset from the default location. All values are in meters with a range of -500.0 to 500.0 (for each of the three), and default to 0.0 |
Microsoft Flight Simulator |
1D Table of Floats (see Data Types for more information) |
XYZRate |
The desired speed of the camera (in meters per second). The direction of movement is determined by the camera control keys that are pressed. The default value is 0.25. |
Microsoft Flight Simulator |
Float |
XYZAcceleratorTime |
The desired acceleration time (in seconds) that it takes the camera to go from 0 to The default value is 1. |
Microsoft Flight Simulator |
Float 0.0 - 100.0 |
Origin |
Every camera definition must have an origin that defines the object or point on which the camera is oriented. In Microsoft Flight Simulator. Default value is "Virtual Cockpit". |
Microsoft Flight Simulator |
String:
|
InstancedBased |
If TRUE (1) then a new instance of the camera is created for each instance of the object referenced by the Default value is FALSE (0). |
Microsoft Flight Simulator |
Bool |
NoSortTitle |
Set to TRUE (1) to disable sorting cameras by title in the menu system, or FALSE (0) otherwise. Default value is TRUE (1). |
Microsoft Flight Simulator |
Bool |
Transition |
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 Default value is FALSE (0). |
Microsoft Flight Simulator |
Bool |
CycleHidden |
If TRUE (1), the camera is hidden from view cycling and it does not appear when cycling through views using the keyboard. Default is FALSE (0). |
Microsoft Flight Simulator |
Bool |
CycleHideRadius |
This sets the distance (in nautical miles) beyond which the camera is skipped in the cycling order for instance based cameras. The default value is 0. |
Microsoft Flight Simulator |
Float 0.0 - 100.0 |
ShowPanel |
Determines whether the 2D instrument panel is shown (1, TRUE) or not (0, FALSE). Default value is FALSE (0). |
Microsoft Flight Simulator |
Bool |
SmoothZoomTime |
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. The default value is 0.5. |
Microsoft Flight Simulator |
Float 0.0 to 30.0 |
[CAMERA_RAY_NODE_COLLISION]
This section permits you to define up to 10 different nodes on the user aircraft model (interior and/or exterior) with which to check if the camera is "pointing" at them, using a ray traced from the camera. This camera ray is defined as coming from a point in the center of the FOV of the camera and going "forward" relative to the camera angle. Once you have defined these nodes, you can then use the SimVar IS CAMERA RAY INTERSECT WITH NODE
to check for collisions.
Parameter | Description | Type |
---|---|---|
node.i |
This is the model node definition that you want to check for collisions with the camera. You may have up to 10 of these node definitions where
You can see an example node definition below: node.1 = ModelDefinition:Interior#Name:NO_HMD_COLLISION |
Hash Map (see Data Types for more information) |