Camera files

Overview

These file formats define how TV cameras are triggered and positioned in IndyCar Racing 2. The .SCR file controls when and where to switch cameras during a race (based on distance along the track), while the .CAM file defines the spatial and behavioral properties of the cameras themselves.

File Extensions Summary

ExtensionPurpose
.SCRCamera trigger zones on the track
.CAMActual 3D camera properties

.SCR File — Camera Triggers

Purpose:

Specifies which camera to use depending on the car’s longitudinal position along the track (DLONG), for TV1 or TV2 broadcast “views”.

Binary Structure:

  • int32: Number of views (usually 1 or 2)
  • int32[]: Number of cameras per view (length = number of views)
  • Camera entries: 4 int32 values per camera:
    1. Mark — Camera type ID (corresponds to camera type in .CAM, e.g., 6, 2, or 7)
    2. Cam ID — Index of the camera to activate (refers to .CAM)
    3. Start DLONG — Start distance to trigger this camera
    4. End DLONG — End distance to stop using this camera

Notes:

  • Each view’s camera entries are grouped together sequentially.
  • Total number of entries = sum of all cameras in all views.
  • The Mark field determines which type of camera this trigger activates, e.g., Type 6 (main), Type 2 (alt), or Type 7 (static).

Example:

If num_views = 2 and the file starts with [2, 4, 5], it means:

  • View 1 has 4 cameras
  • View 2 has 5 cameras
  • Followed by (4 + 5) * 4 = 36 int32 values representing camera triggers

.CAM File — Camera Definitions

Purpose:

Defines physical location, behavior, and characteristics of cameras.

Layout:

The file is structured into three blocks of camera definitions:

  1. Type 6: Dynamic main cameras
  2. Type 2: Alternate dynamic cameras
  3. Type 7: Static cameras with angle/rotation

Each block starts with a count of cameras, followed by data for each.


Type 6 and Type 2 Cameras:

  • Count: int32
  • Each camera: 9 int32 values
IndexDescription
0Middle DLONG (track pos)
1X position
2Y position
3Z position
4Start DLONG
5Start zoom
6Middle zoom
7End DLONG
8End zoom

Type 7 Cameras:

  • Count: int32
  • Each camera: 12 int32 values
IndexDescription
0Always zero? (padding)
1X position
2Y position
3Z position
4Z-axis rotation
5Vertical rotation
6Tilt
7Wide angle zoom and or wide zoom lens (per Tjerk’s tutorial)
8–11Reserved / zero

General Notes

  • .SCR camera entries reference .CAM entries by index (Cam ID).
  • DLONG is the track distance measurement unit used in ICR2.
  • Type 6/2 cameras interpolate zooms and transitions along a path.
  • Type 7 cameras are static.