Presentation is loading. Please wait.

Presentation is loading. Please wait.

Camera angles By Chris Hinkey (cmh209) Standard game camera angle techniques Camera controllers Replay camera angles.

Similar presentations

Presentation on theme: "Camera angles By Chris Hinkey (cmh209) Standard game camera angle techniques Camera controllers Replay camera angles."— Presentation transcript:

1 Camera angles By Chris Hinkey (cmh209) Standard game camera angle techniques Camera controllers Replay camera angles

2 Don’t need to do much if the game is in 2D When your game is 3D and dynamic is when some problems come in

3 Why we need a good camera system If done right cameras will not be noticed If done wrong everyone will notice the slightest flaw Jittery cameras are not good for fun game play If you can not see the hero well it is hard to react successfully Having to fix the camera manually as a user is annoying

4 Requirements of a good camera system Able to change from user input Continuously see a clear view of the desired character. Give special attention to important events Anticipate characters movements as well as possible Have a clear view of the path of the character

5 Problems with doing this Not able to pre-process the environment Not able to hard code where the camera needs to go Avoid obstacles from being in between the camera and the character

6 Avoiding obstructed view How to do this, pros and cons –Raycast collisions –Multi-raycast

7 Attraction points The camera moves to different pre defined points depending on where the character is located Works well for small maps Could possibly cause a jittery camera Doesn't work as well with a dynamic environment

8 Raycast collisions Cast out one ray from the character to the camera Set the camera from any clear path in between the camera and the character This causes sudden camera movements Some ways around this?

9 Multi-raycast Send out four rays from the character around where the camera should go Should the camera move away from object? –If any of the four rays is hit by an object move away from that object Should the distance be shortened? –If a clear path can be obtained zoom in

10 More on Multi-raycasts Smoothing –Used to deal with tunnel situations –Use more zooming in to get around obstacles Camera transitions (switching characters) –a function occurs to calculate the new camera position for the new character.

11 Intelligent Camera Control Typical architectures and the problems A better way to build a camera control system

12 Typical camera architectures Starts with a few monolithic behaviors that only work well for predictable behaviors Then fixes are added for certain cases where the camera is broken This causes a very fragile camera system to code Trade off between fixing a problem and possibly breaking something else This focuses more on the subject not the camera

13 A better way to do things The camera should be thought of as a primary character Should be based on lightweight behaviors to allow easy design process Easy addition of new behaviors Easy way to switch between these behaviors How do we do all this

14 Implementation Camera fragment class –Simple math processor –Camera behavior –Updates camera every frame –Receives camera location matrix and generates the new camera position –Generalized code that can be reused in many projects

15 Camera Fragment class Three update components –position –Height with respect to terrain –Look at and field view (make sure object is in view) These are to be preformed in order

16 Implementation continued Camera Controller class –An interface between the game and the Camera Fragment class –In charge of creation/destroying, ordering, activation and updates to different fragments –Will create fragments and put them in a specified order –During each update the controller will cascade through the fragments and generate a new location –No way to turn fragments on and off

17 Adding some AI There is some lack of flexibility, lets fix that Rules –Add rules that turn fragments on and off –Used within both controller and fragment classes –Fuzzy rules would add a level of flexibility (too close, not too far) –Works better for systems with fewer fragments –Hard to reorder fragments using this technique

18 State Machines Controller class can have a simple Machine having a rule set to traverse through the states Each state can be a set of fragments that are active Allows easy reordering of fragments

19 Other AI Messaging –This is a good way to keep track of game data in the controller class without using a lot of processing time –Used to trigger rule system Scripting –Can abstract out code for messaging, switching and ordering –Helpful for doing replays

20 Camera angles in replays Important for sports games Give the player the ability to see some of the minor details of the game Common problems Different styles

21 Problems Player must be entertained continuously Frustration –Accuracy (use better recording schemes ) –Poor performance –Player must feel in control of the replay Restart, pause, speed control, jump forward and back, and change camera

22 More problems Boredom –Have a fast paced interesting replay –This is hard to do because you need to create the replay on the fly –A rule based AI system can help in this –These rules can be based on film making camera work

23 Different styles Intro Camera –Introduces you to the stage and actors –Starts at a distance and then moves toward the subject –When it get to the subject circle around the subject –Only used at the beginning when everything is stationary

24 First person camera Presents the stage from the subject’s point of view Useful in racing games Important to have a frame of reference on the subject Can be used often but for only short periods of time

25 Follow or Third-person camera Shows part of the scene and the subject from behind Many variations of this camera from different heights and distances Used as a calming section after an action sequence This camera can be used for up to 50% of the replay

26 Matrix camera Pauses some or all the action and then circles around the subject This gives a very dramatic effect Should be used when something spectacular is happening Use this camera very sparingly

27 Circle camera Slowly circles the subject while looking at them Good for a slow portion of the replay Can be used as a transition from side to side of the player

28 Still frame camera As the subject passes, the action is paused at regular intervals simulating photographs Used in conjunction with photographers on the sidelines

29 Camera switching rules Don’t cut to the opposite side of a player it is disorienting Subject should always be in sight Transitions from camera to camera should be fluid Special cameras (matrix) should be used sparingly

30 Camera Switching rules cont… Use follow cameras a lot to serve as breathers between other cameras All cameras should know where to switch to in case they lose sight of the subject Make sure the camera types used are appropriate for the game type

31 Some good tools Switching the subject of each camera Taking screen shots Stop subject while the rest of the scene continues See and change what camera the current camera is going to switch to Tools to allow an artist or designer to fine tune the replays

32 Freak Out - Extreme Freeride Snow boarding sports replay Shows examples of the different kinds of cameras E84M

33 Super Mario Galaxy Good camera implementation A lot of open field areas without many obstacles

34 Legend of Zelda: ocarina of time Boss battle with terrible camera implementation Qi5Oc

Download ppt "Camera angles By Chris Hinkey (cmh209) Standard game camera angle techniques Camera controllers Replay camera angles."

Similar presentations

Ads by Google