cameras.cfg

The Cameras.cfg File Tab In The SimObject Editor

 

The cameras configuration file is an optional file that may be included along with other files for a SimObject and is called cameras.cfg. 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. Note that we do not recommend that you edit this file directly but instead edit the Camera properties from The Cameras Tab in The SimObject Editor. You can also find a page that outlines the general best practices that should be followed for cameras here:

 

 

[Version]

The [Version] section provides version information for the configuration file. In Microsoft Flight Simulator 2024, major versions should always be at least equal to 1.

 

Note that this information is mandatory and should always be included.

 

Parameter Description Type Required
major Major CFG file version number, values must be greater than 0. Integer No
minor Minor CFG file version number, values must be greater than 0. Integer No

 

 

[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 Required
eyepoint longitudinal, lateral, and vertical distance from the center of the aircraft model.

List of Floats

Yes
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:

  • For airplanes the distance will be (depending on circumstances)

    1. the wingspan multiplied by 1.2 or,

    2. the shadow sphere radius multiplied by 1.75 or,

    3. the wing chord (calculated by wing area and wingspan) multiplied by the camera_distance_coefficient or,

    4. 11 meters by default in case of failed data loading.

  • For helicopters the distance will be (depending on circumstances)

    1. rotor diameter multiplied by 1.2 or,

    2. shadow sphere radius multiplied by 1.75 or,

    3. shadow sphere radius over rotor diameter, multiplied by the camera_distance_coefficient or,

    4. 11 meters by default in case of failed data loading.

Float No
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 No
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 No
camera_distance_coefficient

This value will be used as a multiplier on the camera distance under certain circumstances, and when the external_camera_distance has not been set manually.

Default value is 7.

Float No

 

 

[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) and InitialPbh (angle): These are used to set the initial position offsets and the viewing angle for the camera. Note that InitialPbh is not used when the SubCategoryItem is set to "PilotVR", and the "bank" value will not be used when the camera is set to Cockpit.
  • 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 Required
Title The name of the camera. This can be used as a reference to the camera in specific situations, for example, in a checklist file. String Yes
UITitle This is a localisable string that will be used to show the name of the camera in the simulation. String Yes
GUID Camera definition's unique identifier. This GUID must be unique. String
(format {GUID})
Yes
Description A brief description of the camera. String Yes
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 (AirTraffic, Runway, Multiplayer and Tower) can also be instance-based, meaning new cameras are created automatically based on the object type.


The most useful categories are:

  1. Cockpit - For the cockpit camera's default position (first one), then for instrument cycle
  2. Custom - For the Quickviews. Always in this order: left, down, right, up
  3. FixedOnPlane - For cameras fixed to the object
  4. Aircraft - For shifting the default external camera original position (title must be DEFAULT_CHASE or name of an flight state)

 

Note that the first camera definition (0) should always be for the Cockpit, and also always have the Pilot sub-category.

String:

  1. "Aircraft"
  2. "AirTraffic"
  3. "Cockpit"
  4. "Custom"
  5. "Outside"
  6. "Multiplayer"
  7. "Runway"
  8. "Scenery"
  9. "Tower"
  10. "FixedOnPlane"
  11. "CameraToTexture"
Yes
SubCategory

You can specify the principle role of the camera with the "subcategory". This defines the context we need the user to view.

String:
  1. "Pilot" - The view can be used by the cockpit to load any "pilot" view, like VFR, IFR, Landing, Copilot, etc...
  2. "Instrument" - Allow you to define an instrument camera which we can cycle through while in instrument view.
  3. "QuickView" - Allow you to define a Quickview camera which we can cycle through while in the Quickview view.
  4. "CheckList" - Any Checklist view
  5. "Custom" - Used to create a custom view.
  6. "FixedOnPlaneIntern" - Allows you to define a fixed camera on one place in the interior of the object
  7. "FixedOnPlaneExtern" - Allows you to define a fixed camera on one place on the exterior of the object
  8. "Shadow Center" - Used only to specify a correct position of shaders for the interior model.

 

  1. "None" - No specific subcategory is required.
Yes
SubCategoryItem

SubCategoryItem is used to specify a unique view. For each object, you can only have one of those views linked to a particular Subcategory/ Category combo, eg:

Aicraft/ Quickview can have only one QuickView1. But Cockpit/ Quickview can also have one. SubCategoryItem can only be used with its linked SubCategory.

String:
  1. "ClosePilot"
  2. (Subcategory:Pilot) - Pilot view specialized for IFR flight (better view on instruments)
  3. "DefaultPilot"
  4. (Subcategory:Pilot) - Pilot view specialized for VFR flight (better view on scenery)
  5. "LandingPilot"
  6. (Subcategory:Pilot) - Pilot view specialized for Landing (better view on ground)
  7. "CoPilot"
  8. (Subcategory:Pilot) - Pilot view place at the copilot position
  9. "TrueCockpit"
  10. (Subcategory:Pilot) - Pilot view for homemade cockpits (centered, cockpit hidden)
  11. "QuickView1...8"
  12. (Subcategory:QuickView)
  13. "PilotVR"
  14. (Subcategory:Pilot) - Pilot view used when VR is active.

 

  1. "None"
  2. No specific subcategory item is required.
Yes
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

List of Floats

Yes
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:

  1. -90 to 90.0 (pitch)
  2. -180 to 180.0 (bank and heading)

NOTE: This parameter is not used when the SubCategoryItem is set to "PilotVR".

IMPORTANT! When using the Cockpit camera, the "bank" value will be ignored.

List of Floats

Yes
Initialzoom

Sets the initial camera zoom level.

The defaults value is 1.0.

Float
0.0 to 512.0
No
VarToggle

This parameter operates the same way as the VarToggle_EX1 parameter, only it requires the un-scoped L vars, not L:1 vars.

String No
VarToggle_EX1 (Scoped)

This parameter functions as a simple toggle for local variables. You supply one (or more) L:1 Vars and then when the camera is active the variable will be toggled to 1 (TRUE) and when it is deactivated it will be toggled to 0 (FALSE).

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 is viewing an instrument.

Note that this toggle of the L:1 var will only happen if it's value is less than one when the camera is selected. If it is already 1 (or greater) then the toggle will not happen, and that includes it being set to 0 on switching away from the camera.

 

The default value is "", and you may supply multiple L:1 vars in a single string by separating them with a space.

String No
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
0.0 - 100.0
No
ChaseDistance

The initial distance (in meters) of the camera from the target object in external views.

The default value is 0.0.

Float
0.0 - 3000.0

No
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
No
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
No
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
No
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
No
HotKeySelect Links the camera to one of the 10 pre-defined key events for activating cameras.

Integer

1 - 10

No
Origin

Every camera definition must have an origin that defines the object or point on which the camera is oriented. In Microsoft Flight Simulator 2024.

Default value is "Virtual Cockpit".

String:

  1. Cockpit - Camera is locked at fixed position in the 2D cockpit. Forward views include 2D instrument panel. Oblique view angle show virtual cockpit interior.
  2. Virtual Cockpit - Camera is mounted at the eye point defined in the aircraft's CFG file.
  3. Center - External (spot plane) camera that points at the center of the aircraft's visual model.
  4. Pilot - External (spot plane) camera that points at the pilot position inside the aircraft's visual model.
  5. Tower - External camera mounted at a control tower defined via the facilities (BGLCOMP) database.
  6. Fixed - External camera at a fixed position. Fixed camera definitions must include FixedLatitude, FixedLongitude and FixedAltitude values.
  7. WorldObject - Used by SimConnect clients. Not available through CFG settings.
No
InstancedBased

If TRUE (1) then a new instance of the camera is created for each instance of the object referenced by the TargetCategory setting.

Default value is FALSE (0).

Bool No
NoSortTitle

Set to TRUE (1) to disable sorting cameras by title in the menu system, or FALSE (0) otherwise.

Default value is TRUE (1).

Bool No
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 Transition settings for both cameras are set to TRUE (1). If either or both are set to FALSE (0) then the view switch is instantaneous.

Default value is FALSE (0).

Bool No
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).

Bool No
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.

Float
0.0 - 100.0
No
ShowPanel

Determines whether the 2D instrument panel is shown (1, TRUE) or not (0, FALSE).

Default value is FALSE (0).

Bool No
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.

Float
0.0 to 30.0
No
TargetCategory

When a new instance is created this determines which object class triggers the creation of a new InstanceBased camera.

Default value is "None".

String:

  1. None
  2. AI Planes
  3. Fixed
No
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.

Float
0.0 - 30.0
No
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.

Float No
XYZAcceleratorTime

The desired acceleration time (in seconds) that it takes the camera to go from 0 to XYZRate.

The default value is 1.

Float

0.0 - 100.0

No

 

 

[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 Required
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 i starts at 1 and ends on 10. The definition itself is a hash map comprised of the following key/value pairs:

  1. ModelDefinition - either "Interior" or "Exterior"
  2. Name - the name of the node, as defined in the glTF

You can see an example node definition below:

node.1 = ModelDefinition:Interior #Name:NO_HMD_COLLISION

Hash Map

No