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
Extension | Purpose |
---|---|
.SCR | Camera trigger zones on the track |
.CAM | Actual 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 (usually1
or2
)int32[]
: Number of cameras per view (length = number of views)- Camera entries: 4
int32
values per camera:Mark
— Camera type ID (corresponds to camera type in.CAM
, e.g., 6, 2, or 7)Cam ID
— Index of the camera to activate (refers to.CAM
)Start DLONG
— Start distance to trigger this cameraEnd 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:
- Type 6: Dynamic main cameras
- Type 2: Alternate dynamic cameras
- 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
Index | Description |
---|---|
0 | Middle DLONG (track pos) |
1 | X position |
2 | Y position |
3 | Z position |
4 | Start DLONG |
5 | Start zoom |
6 | Middle zoom |
7 | End DLONG |
8 | End zoom |
Type 7 Cameras:
- Count:
int32
- Each camera: 12
int32
values
Index | Description |
---|---|
0 | Always zero? (padding) |
1 | X position |
2 | Y position |
3 | Z position |
4 | Z-axis rotation |
5 | Vertical rotation |
6 | Tilt |
7 | Wide angle zoom and or wide zoom lens (per Tjerk’s tutorial) |
8–11 | Reserved / 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.