Explanation about the mirror format in 3dCkpit.dat. I’ll use the F15 cockpit as a reference.
mirrors distance_ft: 1.20 tilt_deg: -15.0 texture_size: 600 draw_ownship_geometry: true offset_ft { right: 0.0 up: 3.5 } fov_multiplier: 1.0
This is the main mirror entry. It gives general information about the mirror. See this a single mirror glass that covers the entire view of the pilot (for performance reasons, instead of one glass per mirror). What do we have here:
distance_ft
: the distance of the surface from initial pilot position is 1.2ft.tilt_deg
: the surface is slightly tilted down (15 degs). We do this because we place the mirror above the aircraft, so that we can see its own geometry.texture_size
: the RTT texture size, in pixels x pixels. The more, the better looking it will be. And more expensive as well (more pixel shader computation => more GPU needed).draw_ownship_geometry
: draw the player aircraft. Set to true to be able to show external parts. Notice this is not the 3d cockpit geometry. This is work for the future.offset_ft
: offset in feet, from the center of the external aircraft model. We place it usually a few feet above, so that the view is not blocked by the aircraft geometry.fov_multiplier
: if you want the mirror to have higher or smaller fov than the default camera, set this. It is a multiplier (so a player with 100 FoV and fov_multipler 1.1 will result in 110 FoV).Now how to draw the stencils (the mirror image is drawn inside these stencil polygons). Each mirror is a mirror_group. Its geometry does not affect the image (ie, even if you tilt it, it will not tilt the image, it uses the tilt from the main section above). The final result can be seen in this video: https://www.youtube.com/watch?v=wUXbKUjAtGY
// Central mirror.
mirror_group
mirror_stencil center { forward: 1.20 left: 0.0 up: 0.231 } scale { wide: 0.1 tall: 0.07 } rotation_deg: 0.0 shape: STENCIL_SHAPE_CIRCLE num_triangles: 10;
mirror_stencil center { forward: 1.20 left: 0.13 up: 0.223 } scale { wide: 0.12 tall: 0.067 } rotation_deg: 4.0 shape: STENCIL_SHAPE_SQUARE;
mirror_stencil center { forward: 1.20 left: 0.25 up: 0.214 } scale { wide: 0.04 tall: 0.067 } rotation_deg: 0.0 shape: STENCIL_SHAPE_CIRCLE num_triangles: 20;
mirror_stencil center { forward: 1.20 right: 0.13 up: 0.220 } scale { wide: 0.12 tall: 0.067 } rotation_deg: -5.5 shape: STENCIL_SHAPE_SQUARE;
mirror_stencil center { forward: 1.20 right: 0.25 up: 0.208 } scale { wide: 0.04 tall: 0.067 } rotation_deg: 0.0 shape: STENCIL_SHAPE_CIRCLE num_triangles: 20;
mirror_group_end op { rotate{ pitch_deg: 15 } } op { scale { wide: 1.19 tall: 1.07 } } op { translate { forward: 0.01 up: 0.06 right: 0.001 } };
This starts with a mirror_group
stanza.
For the F15C, this is the central mirror. It is composed of 5 stencils: 2 rectangular (shape: STENCIL_SHAPE_SQUARE
), 3 circular (shape: STENCIL_SHAPE_CIRCLE
). The 2 two rectangles compose the biggest part of the mirror. The circles are used to fill the gap between the inclined rectangles and the extremes. Notice that each stencil can be moved around (center, in feet), scaled in 2 axis (width and height) and rotated (in the forward/back axis). The field num_triangles
allow more circular shapes while drawing circles. The more, the better in terms of look. By default, we use 12 if omitted. For rectangles, it is always 2.
When the group ends, we do the final transformations. This applies to the whole group of stencils, as if they were a single object. The reference is it’s middle. Here we are pitching the stencil a bit so it points to the sky (most aircraft frames are like this). Notice this pitch does not affect the mirrored image, which is tiled according to the main section. This is just to fit the mirror frame properly. We also scale it a bit to better fit the frame and bring it a bit forward and to the right for final adjustments.
Now, on the the other mirrors. Notice the left and right mirrors are of the same shape as the middle one. We simply rotate, translate scale them.
// left.
mirror_group stencils_from_group: 0
mirror_group_end op { scale { wide: 1.18 tall: 1.05 } } op { rotate { roll_deg: 44.5 } } op { rotate { pitch_deg: 16.0 } } op { translate { back: 0.116 left: 1.01 down: 0.350 } }
// right.
mirror_group stencils_from_group: 0
mirror_group_end op { scale { wide: 1.16 tall: 1.07 } } op { rotate { roll_deg: -43.5 } } op { rotate { pitch_deg: 16.0 } } op { translate { back: 0.116 right: 1.05 down: 0.342 } }
When we say: mirror_group stencils_from_group: 0
, we simply mean that this mirror group uses the same stencils as the first one (group 0) WITHOUT it’s final transformation (mirror_group_end
). Then, we apply its own transformations instead:
wide: 1.18
) and taller (tall: 1.05
).roll_deg: 44.5
) to match the side frame. Then we pitch it 16 degs (pitch_deg: 16.0
).As you probably noticed, valid coordinates are up
, down
, left
, right
, forward
, back
. All related to pilot position.
In your Falcon BMS User.cfg
file, set:
set g_bActivateDebugStuff 1
Then, when working with mirrors, keep a text editor open while running falcon. Modify the file and in 3d, open chat and type .3dpit
.
It will reload the file in 3d and you will be able to see the changes immediately.