Post on 30-Mar-2015
Ashira KhereJake ThompsonShiro Sakurai
CAMERA CONTROL
Camera ControlCameras provide useful interfaces to play
games.Allows communication of visual goals so
that players know what happens in the game.
Gives audience certain impression of a subject or its surroundings.
Like motion picture, camera techniques can enhance the audience’s experience.
Camera ControlMost of current computer games use a fixed
point of view or a first person’s view.Easy to design and control, however, offering
only one view for the player to see the scene.3rd person adventure games have moveable
cameras.These cameras are fixed on the main character
at a distance that encompasses most of the actions.
Main Problem:Game developers are not in control of character
placement, so the camera is poorly implemented, and usually dragged behind the character.
First Person Cameracamera's position is fixed relative to (the
inside/front of) the player's transparent headif you render a second view of the player as a
reflection in a mirror, remember to make the head opaque again
view vector always points out of the front of the player's skull
up vector should be permanently fixed to point out of the top of the player's skullif player can walk on walls or ceilings, this
makes sure the camera automatically rolls appropriately
First Person Camera
FPC Controlsleft and right don't turn the camera, they turn the player
in place, and the camera follows because it is fixedif left/right did turn the camera, then moving "forward"
goes in a different direction than the facing
up and down change the angle measure between the player character's skull and their spinethe range of the angle
shouldn't be wider than 180°
FPC Controlszoom in and out by resizing the dimensions of
the projection window: smaller for zooming in, larger for zooming outif you don't put caps on either end of the zoom
range, then zooming in too far will flip the window horizontally and vertically, and zooming out too far will make the window clip through walls/floors/ceilings
never try to implement zooming by varying 'dnear': anything that walks between the camera and the player will be invisible, and the player will be able to zoom through walls
up/down/left/right can be bound to the mouse (a.k.a. free look or mouselook), to an analog stick, to buttons (the least ideal choice), etc.
Third Person Camera & Controlhalo camera controls: camera moves in a
circle around a point above the player's headtwo length measures and one angle measurein general considered not as good as:
Third Person Camera & Controlspherical camera controls:
camera can be anywhere in space that's a fixed distance from the lookat point (hence the word "sphere")one length measure and
two angle measuresleft/right move the camera's
longitude around a "circle of latitude", up/down change the latitude (ranges between +90° and -90°)
Third Person Camera & Controlone of the drawbacks inherent in 3rd-
person cameras is handling camera/wall collision. Allowing the camera to simply pass with impunity interferes with suspension of disbelief, and making the camera bounce off leads to the all-too-common problem of the camera "getting trapped," i.e. the player must fight against the camera controls to be able to see what they want
Second Person Camerafrom enemy's point of view, looking at the
playerhas been used as a gimmick in a few game
boss fightsperhaps not a good idea for general use:
player has no camera control, moving behind cover occludes player's view of self, enemy moving around the room may disorient the player
Cinematography in GamesCinematography is the art of film making.
The action in the game is followed not by one camera, but by a team of cameramen who watch the action and always try to show it from the best angle.
Cinematography can be used for:Adding dramatic emphasis wherever necessaryClarify unclear events in a game’s plotEnsure that the player does not become
disorientedEvoke emotional responses in the same way as
a motion picture does.
Camera typesFixed cameras
fixed to the ground using a tripod or stable basecan use tilting, panning, or zooming
Dolly camerasmoving cameras placed on top of wheeled
structuresCrane cameras
perched on top of large arms so they can perform wide arcs on the set
some cranes can be mounted on top of dolliesSteadycams
portable camera that is usually attached to the chest of an operator.
Type of ShotDramatic shot focus on character and his
attitudeextreme close-upmedium close-upfull close-upwide close-upclose shotmedium close shot
Informational shotmedium shotmedium full shotfull shotlong shot
Implementation OverviewCinematography camera controls can be
implement following steps:
Define abstract camera class.Implement specific camera types delivered
from abstract camera class.Place cameras into the scene using Implement a real-time AI module to select
the best camera and shot.The real-time camera AI module is executed
once every few game cycle and the results should be interpolated.
Implementing Camera Types
class Camera {public: virtual float getDistance(Position target); virtual void render();};
class FixedCamera : public Camera {private: Position location;public: virtual float getDistance(Position target) { return target.distance(location); } virtual void render();};
class DollyCamera : public Camera {private: Path rail;public: virtual float getDistance(Position target) { . } virtual void render();};
class CraneCamera : public Camera {private: float armSize; Position location:public: virtual float getDistance(Position target) { . . } virtual void render(); }
class Steadycam public Camera {private: Position curPosition;public: virtual float getDistance(Position target) { . . } virtual void render();};
Define abstract camera class.Implement specific camera types derivered
from abstract camera class.
Place camerasPlace cameras using contents creation tool,
much like a movie director would do.
Selecting the Best ShotBasic Rules
The camera should show everything relevant to the scene.
The camera should be placed so obstruction between relevant information does not occur.
The camera should be aimed at a point of interest in the scene.
Mathematical ApproachSelecting camera targetSelecting relevant informationSelecting view angles
Agent Based Approach
Selecting Camera TargetNeed to consider case-by-case situations.
General caseTarget player
Approaching MonsterLine between player and Monster
Group Situation (conversation between several peer)
Center of the scene to make sure everyone can fit on the screen.
Camera moving and even switching between different cameras should be kept to a strict minimum.
Select Relevant InformationFind relevant information
The main characterOther characters in the vicinityPickable items closer than a setObjects relevant to the gameplay, such as an obstacle
Compute adequate camera frustum so everything fit in view volume
Select View AngleCompute the best view direction as the one
that generates fewer occlusion in the scene.
Agent Based ApproachCinematography camera is easily be
implemented by a rule-driven camera agent.
When npc is closer and npc is enemy Select destination = npc Select origin = overhead from playerOtherwise select destination = ahead of player select origin = overhead from player
If the position of the player is not covered by the current selected camera
select a camera which covers current position
Move camera to closest position
Set camera target to the player