[GUIDE] Setting up spectator cameras and welcome points

Discussion in 'Tutorials & Resources' started by sevin, Aug 10, 2016.

  1. sevin

    aa sevin

    Messages:
    943
    Positive Ratings:
    636
    INTRO

    We've all seen the alpha builds with welcome screens that greet us with the underside of a map. Or the maps with no spectator cameras. These maps are suffering from a lack of info_observer_point's. These entities control our view at the welcome screen and create fixed spectator cameras that dead players or those in spectate can cycle through. Today, we're going to talk about their setup, how to orient them, and how to choose an appropriate FOV for each.

    I would consider spectator cameras and welcome points to be as important as things like cubemaps, soundscapes, and repacking to include in your a1 builds, at least at a basic level.


    IN GAME

    The best way to decide where to set a spectator camera or welcome point is not in Hammer; it's in-game. You can fly around your map using noclip and scope out areas that will give a commanding view of the action, or at least an interesting vantage point to watch the game, and then dump the coordinates in the console to ensure exact placement. You can also experiment with different FOVs in-game without needing to recompile.

    Here is a screenshot of a point that I think will give spectators a good view of the action in my dodgeball map:

    [​IMG]

    Once you have decided on a location and angle, play around with your field of view to see which looks best for the area. You may change your field of view by using the console command _fov <value>, where <value> can be any number between 75 and 90. Most players use an FOV of 90 in TF2, which is the in-game maximum. info_observer_point's can go higher or lower; I use one with an FOV of 110 in my dodgeball map. Unfortunately, previewing FOVs higher than 90 is impossible, but you can set your fov lower than 75 using a second cvar: _fov. Besides _fov, you will just need to guess and do a fast compile to decide.

    Here's a screenshot of another spectator camera location I want for viewing Blu players:

    [​IMG]

    Notice that the building ahead looks rather distant and there is quite a lot of visible space that is not included in the playable area. In this case, I determined I would like a lower FOV and I decided on 70:

    [​IMG]

    After you've chosen a location and FOV, open up the console and use the command getpos to dump your current position and angle in y z x format. Then, copy this information from the console to a text file for reference later. Remember to copy down your chosen FOV for each as well. Fly around and find as many cool spectator points as you want.

    When deciding on a welcome point, you need only one camera that provides a nice backdrop of the level, not necessarily something that will best capture the action. 5CP maps tend to recycle mid's spectator camera as the welcome point.

    Here are some example welcome points from several Valve maps:

    [​IMG]
    [​IMG]
    [​IMG]

    For regular spectator cameras, try to choose areas where much of the battle will take place. These areas usually focus on control points or other objectives.

    • KotH spectator cams tend to focus on the control point.
    • CTF has cams for the intel and central area.
    • CP maps have cams for each CP and any other important battlegrounds.
    • PL and PLR have cams for checkpoints and central areas. Bear in mind, info_observer_point's may be enabled and disabled through checkpoint capturing, so cameras can be turned on and off when a particular checkpoint is reached. Payload maps tend to enable and disable several info_observer_point's as the cart is pushed through the level.
    • Generally, most maps have at least 5 spectator points throughout the map. I wouldn't take Valve's example as law, however. Some maps, like ctf_doublecross and koth_viaduct, only have one spectator camera. This is not usually ideal, don't be afraid to sprinkle the cameras around more liberally.

    Here are some examples of spectator cameras in KotH, CTF, CP, and PL (in that order):

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]


    IN HAMMER

    Now that you have your text file of coordinates and FOVs, hop into Hammer and plop down an entity. Change its class to "info_observer_point" and hit apply.

    Let's first move and angle the entity properly before breaking down its available properties. Pick one of the coordinate and FOV combos from your list to use with this entity. Bear in mind, as @fubarFX mentioned, Source chooses the order of the camera cycling by which ones you create first (lowest ID number), so plan accordingly.

    There is no direct way to move a point entity to a set of coordinates in Hammer. I don't know why this is, but the workaround for Valve's negligence is quite simple:

    1. Move your entity to the origin of the map. This is represented by the blue lines in the 2D viewports and the red, green, and blue lines intersecting in the 3D viewport.
    2. After it has been moved to the origin, open up the transform dialog box using "ctrl+m".
    3. Tick the "move" box and input the coordinates (not the angles) you have selected in your text file.
    4. Once you hit "ok", the info_observer_point should move to the exact location you chose in-game. Check that it is in the right position by the 3 numbers in parenthesis at the bottom of the Hammer window, to the left of the grid size. These are the y z x coordinates of the entity, and they should match what you copied from the console in-game.
    5. Once in the correct position, open the entity's properties and replace the "Pitch Yaw Roll (Y Z X)" parameter's values with the angles you copied from the console. If you have SmartEdit turned off, this parameter will simply be called "angles".

    Now that the camera is in the correct position and orientation, let's take a look at the special properties of info_observer_point.


    [​IMG]

    • Team can be used to restrict a team from using this particular spectator camera. Control point maps sometimes restrict a particular team's second and last control points to only their viewing. Of course, this does not apply to spectators, only dead players. Setting an info_observer_point's "Team" parameter to "Red", for example, will restrict Blu players from using it.
    • Associated Team Entity can restrict the use of the camera to a currently-owned team entity, such as a control point or flag. For example, 5CP Badlands uses this on each of its cameras for every control point. Payload maps often tie this to each checkpoint. Remember that spectators will not be affected by this parameter because they do not own anything. Spectators are homeless.
    • Welcome Point will tell the game to use this camera as the backdrop to the welcome screen if set to "Yes". If you're just pushing out an a1 and want to skip as much detail work as possible, set up at least one info_observer_point with this parameter set to "Yes" so we don't have to stare at the ugly underbelly of your map when we connect to the server. If no info_observer_point's are present in your map, Source will automatically assign one to the origin of your map, which tends to be underneath it. If you have multiple welcome points set, Source will use the entity with the lowest ID (first created) to decide which to use. If none of your info_observer_point's are welcome points, Source will pick the lowest ID that is not team or objective specific to use. Welcome points may not be used with observer points that have the "Team" parameter set to either team.
    • FOV is the field of view of the camera. The default FOV in Hammer is "0", which will actually use the client's fov_desired once in-game. As outlined above, most TF2 players use an FOV of 90, but lower FOVs tend to have a cinematic effect that can look more appropriate in many situations. Most info_observer_point's I have seen use the default value of 0, though some deviate. If you already decided on what FOV to use for this particular camera in-game, just input that value here.

    Generally, I'd recommend checking out decompiled Valve maps when deciding on how to use each of these parameters. Many PL and CP maps use the "Associated Team Entity" heavily to control the flow of the available cameras in the map, though others will combine this with a restricted "Team" setting and still others will add enabling and disabling I/O to the cameras for even more control (such as pl_barnblitz). Just look around.


    CONCLUSION

    Hopefully this guide has helped you learn how to properly set up welcome points and spectator cameras for your map. If not, please contact my secretary @EksCelle and complain to him.

    Also, now that you know how these entities work and have hopefully messed around a bit, check out @Idolon's info_observer_point creation utility, here. This will help streamline the creation process and ease positioning.
     
    • Thanks Thanks x 15
    • Like Like x 8
    Last edited: Jul 15, 2017
  2. TMB

    TMB Banned

    Messages:
    827
    Positive Ratings:
    286
    Nice guide!
     
    • Thanks Thanks x 1
    • Agree Agree x 1
  3. Zurby

    Zurby L2: Junior Member

    Messages:
    76
    Positive Ratings:
    109
    I didn't know this, thanks a lot! Will definitely make good use of it. :)
     
    • Thanks Thanks x 1
  4. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,580
    Positive Ratings:
    1,653
    For completion sake, you should mention that the engine cycles through spec_cams in order of creation and advise people to be mindful of that order. Suppose you're on 5cp, cycling from one 2nd point cam directly to it's identical counterpart feels kinda weird.
     
    • Thanks Thanks x 1
    • Agree Agree x 1
  5. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    616
    Positive Ratings:
    166
    I would add in that for 5CP maps, maybe only have the cameras 2 contestable points enabled. As a point gets locked, so to does its camera get disabled. Likewise as a point becomes unlocked, enable the camera.

    That way the cameras focus on where the battle is currently taking place, not on areas where it isn't.
     
    • Like Like x 1
    • Agree Agree x 1
  6. Idolon

    aa Idolon the worst admin

    Messages:
    1,377
    Positive Ratings:
    3,955
    I made a webpage that somewhat automates this process - you get info from getpos for every camera, put the numbers in some forms, click a button, and have text you can paste into a blank text file to make a .vmf. I haven't tested every feature, but the basic functionality is there. Let me know if you encounter any bugs.

    I've also attached the .html file (in a .zip because of the site's file type restrictions) in case the link ever stops working.
     

    Attached Files:

    • Thanks Thanks x 3
    • Like Like x 1
    Last edited: Nov 23, 2016
  7. sevin

    aa sevin

    Messages:
    943
    Positive Ratings:
    636
    Added.
    Associated Team Entity is what controls that, I think I mentioned that in the post.
    Very cool. Thanks for one upping me. Added to the main post.
     
    Last edited: Aug 10, 2016
  8. Pocket

    aa Pocket When all you have is Hammer...

    Messages:
    4,342
    Positive Ratings:
    2,102
    And unfortunately, I don't think you can change the order by messing with the VMF in Notepad or something. I tried it — copied the IDs to another window, shuffled the order around, blanked the IDs and reentered them in numeric order — and it still ended up with a couple in the wrong order somehow. So if you plan to add these, maybe wait until your layout is so close to done that you don't plan on adding any more, especially if your map is symmetrical.
     
  9. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    616
    Positive Ratings:
    166
    I know it's really just a tiny bug, but is this something @TheJill could add/fix for us?
     
  10. Sergis

    aa Sergis L666: ])oo]v[

    Messages:
    1,866
    Positive Ratings:
    1,130
    i kinda like that effect - switching to view the same layout with different lighting
    i'll even sometimes click back and forth just for that
     
    • Agree Agree x 1
  11. sevin

    aa sevin

    Messages:
    943
    Positive Ratings:
    636
    Did a bit more testing today and I realized that leaving the FOV set to 0 does not actually directly translate to 70 in-game. If you leave FOV at 0, the FOV used will actually be whatever the client's fov_desired is set to in-game, which is usually 90. Also, the welcome point appears to not be affected by whatever FOV you set; it will always use the client's fov_desired, unless you visit the welcome point camera in spectate after you join.

    I also found a second cvar you can use to set FOV: _fov. This cvar can go under 75 FOV, but not over 90.
     
    Last edited: Aug 13, 2016
  12. bazooka

    bazooka L1: Registered

    Messages:
    20
    Positive Ratings:
    15
    FWIW, that's true of the regular fov command as well. Just not the fov_desired command.
     
    • Thanks Thanks x 1
  13. TheCreepAcrossTheStreet

    TheCreepAcrossTheStreet L1: Registered

    Messages:
    22
    Positive Ratings:
    1
    Sick, I didn't know about this before! Thanks!