Continuing to expand the definitions, here are my initial thoughts for some of the data requirements for what goes into the CAMFIG file. Please understand that the different sections shown appear as different objects but that is only for the purpose of making clear as a specification how the data is used. So long as the usage requirements are met, I do not care one way or the other about how the programmer decides to physically code the object(s).
ALL CAMERAS SHALL HAVE THIS DATA
- CameraUI( Int ) <--- Something that uniquely identifies each camera, such as a serial number (e.g., 0, 1, 2, 3...).
- CameraName( String )
- CameraFOV( Real )
- Camera NearZClip ( real ) <--- How close, in meters, is the view range of the camera.
- Camera FarZClip ( real ) <--- How far, in meters, is the view range of the camera.
- CameraBaseInOutCode ( String ) <--- Inside the train or Outside of it
- CameraMovement ( String ) <--- Circular, Straight line, or None.
After that basic data is collected, it seems that everything from here on out depends largely on whether the camera is being used by "a person" inside of the train or outside of it. The value of CameraBaseInOutCode() will therefore determine what gets collected in the block of data.
ALL OUTSIDE CAMERAS SHALL HAVE THIS DATA
- CameraTerrainBounce( Binary ) <--- may be implemented in later phases
- CameraManMadeObjectBounce( Binary ) <--- may be implemented in later phases
- CameraNaturalObjectBounce( Binary ) <--- may be implemented in later phases
- CameraOutsideSubtypeCode( Int )<--- How the outside camera will be used where 1 = Player Tracking, 2 = Software Tracking, 3 = Fixed Location (e.g., Tower), 4 = RR Employee, 5 = The Public
As you can see, most of the above relates to rules about camera collisions. I expect those features will most likely be addressed well after the initial phases of Camera Sets and so at this time no further specification for those features will be provided. That said, the last parameter in the list is important from the start as it determines the data necessary to define the type and extent of camera movement.
FOR OUTSIDE CAMERAS THE REST OF THE NECESSARY DATA VARIES BY HOW THE CAMERA IS USED
When CameraOutsideSubtypeCode(2)... (To replicate what MSTS Camera 4) does this data is necessary:
- DefaultAttachedTo( Int, 0-999 ) <--- the default unit number in the consist used to attach the camera, w/ consist designated first unit = 0 and last unit = 999.
- DefaultExteriorOffsetXY( Real, 1-9999 ) <--- the default number meters away from the center of the attached unit the camera will be placed on the XY plane as measured along the track the unit is located upon.
- DefaultExteriorOffset( Real, -180 to 0 to +180 ) <--- the default degrees offset the camera will have from perfect alignment to the direction of the attached unit, in degrees, where 0 means aimed from straight ahead of the first unit in the consist facing the rear of the consist (as defined in the .con file) and 180 means aimed from straight behind the last unit in the consist facing the front of the consist (as defined in the .con file) and-90.01 TO 360.0 TO +90.01 means aimed towards the front of the consist (as defined in the .con file),where negative values always mean on the left side of the train as viewed from the end of the consist (as defined in the .con file) and positive values always mean on the right side of the train as viewed from the end of the consist (as defined in the .con file).
- DefaultOffsetZ( Real, 1-9999 ) <--- the default Z dimension offset, in meters, relative to the center of the attached unit.
- DefaultYaw( Real, 0-180 ) <--- the default direction the camera looks, in degrees, where 0 means directly at the center of the attached unit; negative means towards the camera's left, positive means towards the camera's right.
- DefaultCameraPitch ( Real, -90 To 0 To +90 ) <--- the default orientation of the camera lens, in degrees, relative to the center point of the attached unit.
- MaxRise( Real, 0-9999 ) <--- the allowed change of position on the Z Axis the camera may move upwards from DefaultExteriorOffsetZ, in meters.
- MaxFall( Real, 0-9999 ) <--- the allowed change of position on the Z Axis the camera may move downwards from DefaultExteriorOffsetZ, in meters.
n.b., My expectation is there will initially be 8-10 such cameras defined, all positioned at ground level and all assigned to a single Tracking Set. I would not be surprised to see users add more such cameras that are positioned above ground level and to assign those cameras to sets at various altitudes well above ground level.
QUESTION: I used Degrees as an offset... should that be meters to the left or Right instead? In the later case the OR software would need to determine the correct radius value so the distance from the tracked unit remains the same when swing motion is done.
Goof. DefaultExteriorOffset( X Y ) has the data, where Y will specify the number of meters to the left or right of the track.
When CameraOutsideSubtypeCode(1)... (To replicate the behavior of MSTS camera types 2 and 3) this data is necessary:
All of the data available to MSTS camera type 4 (shown above), plus
- MaxTurnLeft( Real, 0-360 ) <--- the allowed change of position on the XZ plane the camera may move to the left from DefaultYawDegrees(), in degrees.
- MaxTurnRight( Real, 0-360 ) <--- the allowed change of position on the XZ plane the camera may move to the right from DefaultYawDegrees(), in degrees.
- MaxRunIn( Percent, 0-100 ) <--- The allowed movement, in meters, the camera may move towards the attached unit, relative to its initial position. Probably should not exceed the value of DefaultExteriorOffsetXY().
- MaxRunOut( Percent, 0-999 ) <--- The allowed movement, in meters, the camera may move towards the attached unit, relative to its initial position.
Data for CameraOutsideSubtypeCode(3) -- fixed location, such as a tower, to be determined later.
Data for CameraOutsideSubtypeCode(4) -- RR employee on the ground, such as a brakeman, to be determined later.
Data for CameraOutsideSubtypeCode(5) -- member of the public, on the ground, such as a passenger approaching a car, to be determined later.
ALL INSIDE CAMERAS SHALL HAVE THIS DATA- CameraInsideSubtypeCode( Int ) <--- 1 = RR Employee, 2 = The Public
- DefaultRollingStock ( Int ) <--- 1 = Locomotive Cab, 2 = Passenger Car, 3 = Freight Car, 4 = Caboose
- DefaultInteriorOffsetX( Real ) <--- the X axis offset, in meters, from the position defined in the .wag or .eng
- DefaultInteriorOffsetY( Real ) <--- the Y axis offset, in meters, from the position defined in the .wag or .eng
- DefaultInteriorOffsetZ( Real ) <--- the Z axis offset, in meters, from the position defined in the .wag or .eng
- DefaultInteriorOrientation ( Real ) <--- the aim of the camera lens, in degrees, where 0 = the direction of the unit containing the camera; Negative is to the left, positive to the right.
- DefaultInteriorYaw( Real, 0-180 )
All of the above relates to the initial position of the camera within a car or locomotive. I expect most / all of the data will still come from .wags and .engs. Providing for that data in the CAMFIG file enables the means to assign interior based camera to specific camera sets.
That's all for the moment.
This post has been edited by Genma Saotome: 24 July 2014 - 10:23 PM
Reason for edit:: Correction.