27
BATTLECAM™: A Dynamic Camera System for Real- Time Strategy Games Yangli Hector Yee Graphics Programmer, Petroglyph [email protected] Elie Arabian Lead Artist, Petroglyph [email protected]

BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

  • Upload
    jael

  • View
    51

  • Download
    0

Embed Size (px)

DESCRIPTION

BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games. Yangli Hector Yee Graphics Programmer, Petroglyph [email protected] Elie Arabian Lead Artist, Petroglyph [email protected]. Overview. Background Theory Implementation Hacks Cinematic Shots - PowerPoint PPT Presentation

Citation preview

Page 1: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

BATTLECAM™: A Dynamic Camera System for Real-Time

Strategy Games

Yangli Hector YeeGraphics Programmer, Petroglyph

[email protected]

Elie ArabianLead Artist, Petroglyph

[email protected]

Page 2: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Overview Background Theory Implementation Hacks Cinematic Shots Question & Answers

Page 3: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Background – History RTS Bird’s Eye (Dune 2) First Person (Dungeon Keeper) Scripted Actor & Camera (Warcraft

3) Unscripted Actor, Unscripted

Camera (Star Wars – Empire at War)

Page 4: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Background - Problem Make a ‘movie’ from an RTS battle

Actors can move during shot Actors can die during shot Players can move actors Objects can move into camera

Page 5: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Background - Solution Pick most interesting object Construct shot Play shot Fallback on death Pick next object Hijack existing camera scripting

Page 6: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Theory – Visual Attention How to pick ‘interesting object’ Bottom Up: Stimulus

Intensity (black on white) Motion (moving stuff) Color (red on green) Orientation (circle in stripes)

Top Down: Goals Game Objectives Current User Selection

Page 7: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Theory – Bottom Up Attn.Image

OrientationColor SpatialFrequencyIntensity Motion

Feature Maps

OrientationColor SpatialFrequencyIntensity Motion

Conspicuity Maps

Saliency Map

Reference : Itti L, Koch C. “A Saliency-Based Search Mechanism for Overt and Covert Shifts of Visual Attention.” Vision Research, pp. 263, Vol 40(10 - 12), 2000

Page 8: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Center Surround Mechanism

Lateral Inhibition

IntensityFeature Maps

IntensityConspicuity Maps

Page 9: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Lateral InhibitionOne signal vs similar signals

Page 10: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Lateral InhibitionPurpose : Promote areas with

significantly conspicuous features while suppressing those that are non-conspicuous.

N(A) N(B) N(C)A B C

(Before Inhibition) (After Inhibition)

Page 11: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Implementation Game Logic Driven

Images too expensive No screen space stuff Access to game logic info

Page 12: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Implementation – Data Game logic data (stimulus)

Size Attack power Location Health

Game logic data (goal driven) Current selection Visibility

Page 13: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Computing Saliency E.g. Saliency_Speed for object(i)

Saliency_speed(i) = (speed(i) – min_speed)/ (max_speed – min_speed)

Normalized 0 to 1Three Normalization modes

Large is importantSmall is imporantCloseness to mean is important

Page 14: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Normalization Modes Large is important

Saliency_val(i) = (val(i) – min_val) / (max_val – min_val)

Small is important Saliency_val(i) = 1 – (val(i) – min_val) / (max_val

– min_val) Close to mean is important

Saliency_val(i) = 1 – (val(i) – avg_val) / (max_val – min_val)

Page 15: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Normalization settings Large is important

Size Attack power Targets Speed

Small is important Health

Close to mean is important X, Y coordinate

Page 16: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Lateral Inhibition Conspicuity value = saliency_val *

(max_saliency_val – min_saliency_val)

Signals with great difference between max and min get boosted

N(A) N(B) N(C)A B C

Page 17: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Importance Importance (i) = Sum of conspicuity_vals * weights Weight values

Size 1.0 Power 1.0 X 0.5 Y 0.5 Health 1.0 Targets 1.5 Speed 1.0

Sort list by importance

Page 18: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Summary Compute normalized saliency Perform lateral inhibition Weighted sum Sort by importance

Page 19: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Picking interesting object Pick current selected Pick current object’s target 50% of

the time Make interesting object list From list pick top 5 randomly. Reject

if it was same type as the previous object looked at.

Page 20: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Constructing Cinematics Local Space

Transform object space cinematic into world Local Space without rotation frame

Use translation only World space using reference objects

For artist driven cinematic constructed in world space

Transform to local space

Page 21: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Local Space Cameras

Page 22: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Flyby camera shot

Page 23: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Circle camera shot

Page 24: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Chase camera shot

Page 25: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Hardpoint camera shot

Page 26: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Frigate/Target camera shot

Page 27: BATTLECAM™: A Dynamic Camera System for Real-Time Strategy Games

Demo & Q&A Thanks to

Jim Richmond for camera system Kevin Prangley for illustrations Petroglyph staff for support

Contact Info Hector at petroglyphgames dot com