Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

21
Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL

Transcript of Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

Page 1: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

Ashira KhereJake ThompsonShiro Sakurai

CAMERA CONTROL

Page 2: Ashira Khere Jake Thompson Shiro 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.

Page 3: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 4: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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

Page 5: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

First Person Camera

Page 6: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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°

Page 7: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 8: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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:

Page 9: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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°)

Page 10: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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

Page 11: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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

Page 12: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 13: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 14: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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

Page 15: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 16: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 17: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

Place camerasPlace cameras using contents creation tool,

much like a movie director would do.

Page 18: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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

Page 19: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 20: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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.

Page 21: Ashira Khere Jake Thompson Shiro Sakurai CAMERA CONTROL.

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