Jump to content
  • Cameras.ini


    OWA
    • Supported Version: W3D Engine 5.0

    The [Profile_List] section defines a list of camera profiles with name strings:

     

    Example

    [Profile_List]
    0=Default
    1=Sniper
    2=First_Person
    3=Death
    4=APC
    5=Ranger
    6=Allied_Artillery
    7=Arty_Side
    8=Arty_Side2

     

    Following that are sections which define the parameters of these cameras:

    Example

    [Default]
    Name=Default
    TranslationTilt=22.5
    ViewTilt=0
    Distance=1.5
    Height=1.4
    FOV=90
    LagUp=0.2

     

    There are five hard coded cameras that must be defined: Default, First_Person, Death, Sniper, Cinematic (the last one is optional for MP games).

     

    In Mammoth, the cameras can then be applied to vehicle presets using the Profile and Alt. Camera Profiles settings:

    image.png

     

    Profile Parameters

    All angular values are specified in degrees, distances in world space meters. Take note that the default values are not 0 for many of these parameters. This is especially important if you want to use OriginOffsetUp instead of Height.
    In W3D Engine version 5.0, the parameters can be changed at runtime using the edit_camera console command (only works on a listen server with max player count 1, will not save the changes to cameras.ini).

    Parameter

    Default

    Description

    FOV

    65

    FOV measured in 4:3 aspect ratio (i.e. 16:9 will get wider than this value).

    Height

    0.2

    Height of camera pivot point above the model center in terms of the world space up-axis.

    Distance

    3.1

    Distance of the camera from the pivot point.

    ViewTilt

    20

    A tilt angle (pitch) offset for the camera. Positive values tilt the camera down.

    TiltTweak

    0.6

    Multiplies the camera tilt from mouse movement before applying it to the "Distance" vector (from the pivot point to your camera).
    A value lower than 1 means the camera origin will always stay slightly more behind the model instead of rotating towards the front as you tilt your camera down.
    This value will also determine when the camera will collide with an invisible plane and stop moving lower. At 1 it will never collide, at 0 it will collide at the height of the pivot point.

    TranslationTilt

    19.9

    Tilt angle offset applied to the "Distance" vector before doing the above. Determines at which angle the camera is positioned from the pivot.

    LagUp
    LagLeft
    LagForward

    0

    This is a time value in seconds (hopefully, not 100% sure) which is used to make the camera not immediately follow sudden movement, for example jumping.

    Forward
    Sideways

    0

    These are used to move the camera position *after* all other transformations including rotations are applied. They can be beneficial for sidecams, e.g. the Artillery or V2 in APB, but should not be used for "first person" or turret cams. Also, "Forward" is actually applied up in world space, so it's mostly useless. See video below for usage example.

    OriginOffsetForward
    OriginOffsetLeft
    OriginOffsetUp

    0

    These offsets are applied to the camera pivot point before all other transformations. This allows you to make the camera essentially stick to specific point on the model, e.g. for first person or turret cams. Height will always translate up in world space while OriginOffsetUp will operates in object space, i.e. the camera pivot point will follow your vehicle's orientation if you set OriginOffset, which is why it's good for first person cams. The Forward/Left/Up axes are meant to be X/Y/Z in object space respectively, so if your specific model has different orientations you may need to exchange some values.

    Small note on infantry cameras: Do not under any circumstances use OriginOffset or Sideways for the third person camera. For the first person camera, you should set everything to 0 except FOV. You may use OriginOffsetUp to modify first person camera height (but I wouldn't overdo it), while Left and Forward are definitely not recommended.

    FollowVehicleOrientation

    False

    Note: Experimental, implementation may change at any time.
    Forces the camera to face forward on entering a vehicle and then fully transfers any vehicle orientation changes to the camera (on all axes). Might be useful for planes in the future or for non-combat first person cameras (e.g. Supply Truck). Currently can't be used for mouse controlled planes and also leaves camera in a semi-random heading when exiting the vehicle.

    DisableFloatingPlayerName

    False

    Disable the floating player name for this camera (useful for first person views).

    CameraBone

    <empty>

    You can specify the name of a bone here that will replace the player origin as the anchor point of the camera.

    This adds a new method to do first person / turret cameras:

    1. Attach the camera to the "turret" bone (or any other bone).
    2. Set all parameters except FOV to 0.
    3. Use Forward/Sideways/Distance to tune position.

    Keep in mind that Forward is actually up (can't change due to backwards compatibility). You can raise TiltTweak to prevent clipping into the vehicle below.

    Note: I tried making OriginOffset work with the bone orientation instead of the vehicle orientation, but that can cause problems with the game auto-adjusting turret orientation to match the 3rd person targeting mechanics. This will also affect you if you try to attach the camera to the muzzle bone since that will actually change position based on targeting.

    NearClip

    0.1

    This value adjusts where the near clip plane is for this camera. I would not recommend adjusting this below zero.

    The Near and Far Clip Planes determine where the camera’s view begins and ends. The planes are laid out perpendicular to the Camera’s direction and are measured from its position. The Near plane is the closest location that will be rendered, and the Far plane is the furthest. The Far plane is controlled by the DrawDistance command in tt.ini. This is useful for if a vehicular first person view requires a little bit more culling than the default 0.1 near clip plane provides.

     

    Added in W3D Engine version 5.0

    The following is a comparison video of using Forward/Sideways (first half of the video) vs OriginOffset (second half). For side views like the ones of the Artillery, OriginOffset feels a bit weird because the camera pivots around empty space and the pivot is moving in a circle along the model orientation when you drive around. Turret cams are what OriginOffset was intended for, which is clearly visible in the Cruiser example, where side cams are woefully inadequate.

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...