Current Status

- Tutorials : 213
- Projects : 22
- Materials : 58
- Resources : 19
- Maps : 4



With a little help from....

- TrebTreb          (Site)
- Stadric             (Site)
- Steve Newman (Site)
- Sepulverture
- Zogger
- Boomstick123
- Scoobs
- Avego
- Anders
- Andreason
- Bornstein
- Danial
- Wise
- nudel
- YoMother
- Senji
- Gronblad
- Manefesto
- Drax
- Meathead
- Raidenator
- Zyx
- Sp00n             (Site)
- Mynameisme
- Chrome
- Bud Doug Lee
- #1 Duck
- Flynn
- #1 Duck
- Lord Ned
- Terrenteller
- Nicadeamas
- Dinonid
- Jamie Lee
- Nero
- Maloof?
- Namelezz!
 
Tutorials
Important entities referenced in this tutorial.
Click on the entity for more info from the Valve Developer Site.


point_camera | func_button | func_monitor | func_rot_button | logic_relay | logic_timer


47. Three Switchable, Rotating Cameras


An intermediate tutorial, it will try to give as much step by step as possible, but assumes you have Basic knowledge like making a room, placing entities and texturing.



This is an extension of the tutorial on cameras. Many people ask how to set up several cameras linked to one screen which can be cycled through via a button, as in the prison levels in Halflife2; this tutorial aims to illustrate that. It shows how to set up three cameras on one monitor. At the monitor there is a button which when the player presses it, changes the view from one camera to another.

  1. There are no details in this tutorial on constructing the rooms for this, I will just cover the basic requirements for getting this to work. The VMF at the bottom of the page comprises four rooms; three populated with NPC's and various props and a camera in each. The fourth room has the monitor. If you just want to get the principles, download the VMF and look at it with the tutorial.

  2. The principle is the same no matter how many cameras you have, a func_button is set up next to the monitor/screen, which triggers three separate logic_relay entities. When triggered these turn on and off the individual point_camera entities. The cameras also rotate (by means of func_rot_button entities) giving a 90 degree scan of each room. This is controlled by a logic_timer and I will deal with this at the end of the static setup.

    THE CAMERAS

  3. Since the point_camera entity is invisible in the game, you need a brush or model based one. There are two combine cameras in the world models. I made a brush based one, which you can get in the prefabs section (there are two in fact) or in the vmf. There is a rather good model on 'Mappping-area.com' (Link on my 'Materials' page) or you can make your own !

  4. Place three of these cameras wherever you want them, obviously pointing towards whatever you want showing on the screen. Mine are hanging from the ceiling in the corners of the rooms angled slightly downwards.

  5. For the static version (camera doesn't move) make each of them a func_brush (Press CTRL+T select func_brush from the drop down)
    (I'll deal with the rotating camera version later)

  6. Open the Properties and give each of them a Name rotcam1 rotcam2 rotcam3


  7. Click on the Entity tool, and in the same locations, place each of three point_camera entities. Pointing in the same direction as the cameras you placed and at the same angle.







  8. Open the Properties of each and give them a
    Name         cam 1 cam 2 cam3
    Parent         rotcam1 etc
    FOV Field of view, mine are set to 60 (experiment?)

    THE MONITOR

  9. In the fourth room make a brush with the nodraw texture on 64w x 64h x 2 units deep.

  10. Press CTRL+T and make it a func_monitor

  11. Open the Face Edit tool and browse to dev/dev_tvmonitor1a put this texture on the front face of the func_monitor If you want to use another monitor have a look here for the different types.



  12. Open the Properties and give the monitor a
    Name             mon1
    Camera Name         cam1

  13. Make a brush with an appropriate button texture on, whatever size you want for the button, make sure the player can see the monitor while he is pressing the button.

  14. Press CTRL+T and make it a Func_button

  15. Open the Properties and give it a
    Name         monitor_change_button
    Sounds         Choose from the drop down (In the VMF I have used a separate sound triggered by the logic_relay entities)

  16. In the Flags tab make sure Don't Move and Use Activates are checked.

    Logic_relays

  17. Place three logic_relays in the map.

  18. Open the Properties and give them each a
    Name                 lr1 lr2 lr3
    Start disabled         No

    Putting it together

  19. Open the Properties of the first logic_relay click on the Outputs and Add :

    Turns cam1 on

    Puts the image from cam1 onto the monitor

    Turns itself off

    Turns logic_relay 2 on.

    Triggers logic_relay 2.

  20. Open the Properties of the second logic_relay click on the Outputs and Add :

    Turns camera 2 on

    Sets the monitor to display camera 2

    Turns itself off

    Turns logic_relay 3 on

    Triggers logic_relay 3

  21. Open the Properties of logic_relay 3, open the Outputs and Add:

    Turns camera 3 on

    Sets the monitor to display camera 3

    turns itself off



    Triggers logic_relay 1, and so the cycle starts again.

  22. Open the Properties of the func_button open the Outputs and Add:


    starts logic_relay 1
    starts logic_relay 2

    starts logic_relay 3

  23. Compile and run the map

    ROTATING CAMERAS

    The above set up switches between three static cameras, lets look at how to make them rotate.

  24. If your cameras are brush based, then change the three func_brushes to func_rot_button

  25. Open the Properties
    Speed             10
    Distance(deg)         90 (can be anything between 60 and 90 - experiment)

  26. In the Flags tab make sure Toggle is checked

    If your cameras are models, then they will be prop_dynamic entities, and you will have to parent them to a separately made, named, brush (with nodraw texture on ) which you make a func_rot_button


  27. Place a logic_timer in the map.

  28. Open the Properties
    Name                 timer
    Use random time         No
    Refire Interval         3 (The timer will fire every three seconds)

  29. Open the Properties of the Logic_timer and in the Outputs Add:

    starts physical camera 1 rotating

    starts physical camera 2 rotating

    starts physical camera 3 rotating

  30. Compile and run the map



Click to Comment on this tutorial or Click to Complain

The next tutorial is "48 AI_Goal _Lead" and can be found here.


Return to the top of the page