46
M1205 Interactivity Topic 01: Introduction Spring 2011 SCM-CityU 1

SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

  • View
    215

  • Download
    3

Embed Size (px)

Citation preview

Page 1: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

SM1205 Interactivity

Topic 01: Introduction

Spring 2011 SCM-CityU 1

Page 2: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Self-Introduction

• L1 Instructor – Oscar Au• PhD (HKUST, 2007)• Teaching: interactivity, programming, physical

computing, hardware hacking– SM1204, SM1205, SM2240, SM2608

• Research: computer graphics, user interface• http://sweb.cityu.edu.hk/kincau/

Spring 2011 SCM-CityU 2

Page 3: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Interactivity

• Human-human interaction • Human-object interaction • Human-computer interaction

Spring 2011 SCM-CityU 3

Page 4: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Human-Computer Interaction • Also known as HCI• User interface

– A place where interaction between humans & machines occurs

• Types– Command-line interface – Graphical user interface– Natural user interface

Spring 2011 SCM-CityU 4

User Interface

User Interface

Page 5: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Command-Line Interface

• Keyboard

Spring 2011 SCM-CityU 5

Dos Unix

Page 6: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Graphical User Interface (GUI)

• Mouse & keyboard

Spring 2011 SCM-CityU 6

Page 7: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Natural User Interface (NUI)

• Keyboard? No. Mouse? No.

Spring 2011 SCM-CityU 7

Page 8: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Multi-Touch

• Effortless interaction with digital content through natural hand gestures and touch

Spring 2011 SCM-CityU 8

Page 9: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Multi-Touch

• Microsoft Surface

Spring 2011 SCM-CityU 9

Page 10: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Kinect (wiki)• Controller-free gaming & entertainment experience for

Xbox 360 by Microsoft– Released Nov. 2010

Spring 2011 SCM-CityU 10

Page 11: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Kinect (wiki)

Spring 2011 SCM-CityU 11

Page 12: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Kinect (wiki)

Spring 2011 SCM-CityU 12

Page 13: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

NUI Example: Kinect (wiki)

• Natal sensor – RGB camera – Depth camera– Multi-array microphone

• Capabilities – 3D motion capture, facial recognition, voice

recognition etc. Spring 2011 SCM-CityU 13

Page 14: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

How Microsoft Kinect Works

• Depth camera– Shooting out beams of infrared light – Measuring how long it takes them to reflect off of

objects in the scene and return to an infrared camera

• Video: Look at Kinect using IR goggles • Video: Kinect – The Way Games Work

Spring 2011 SCM-CityU 14

Page 15: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

How Microsoft Kinect Works

Spring 2011 SCM-CityU 15

Page 16: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Microsoft Office Labs Vision 2019

Spring 2011 SCM-CityU 16

Page 17: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Class Schedule

• Development platform: Flash CS5 + AS 3.0

• Tentative topics– Flash fundamentals – AS 3.0 fundamentals – Keyboard & mouse – Interactivity with sound, image, video – Webcam interactivity (color, motion, pattern)

Spring 2011 SCM-CityU 17

Page 18: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Assessment

• Attendance: 10%

• 3 Assignments: 90%– Tentative: A1 (20%), A2 (30%), A3 (40%)

• Curved grading: A+, A, A-, B+, ….

Spring 2011 SCM-CityU 18

Page 19: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Late Policy

• Attendance – Late policy: 5 late minutes per

class• > 5 minutes late

no attendance score for that class

• Assignment & project submission – Late policy: 3 late days in total

• Use them wisely!Spring 2011 SCM-CityU 19

Page 20: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

SM1205 Interactivity

Flash Fundamentals

Spring 2011 SCM-CityU 20

Page 21: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

What is Flash (wiki)?

• Originally by Macromedia, later by Adobe – Latest version: Adobe Flash CS5

• Rich media content platform – Animation, interactivity, image/video, online games

• Youtube, Google Videos, Yahoo Maps, ….

• Support both bitmaps & vector graphics • Programming language: ActionScript 3.0

Spring 2011 SCM-CityU 21

Page 22: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

ActionScript 3.0• Scripting language • Object-oriented language • Popular for

– Web design, – Animation – Multimedia applications – …

• Online language reference

Spring 2011 SCM-CityU 22

Page 23: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Spring 2011 SCM-CityU 23

StageStage

ToolsTools

TimelineTimelineLayerLayer

Panels:Panels:Library + Library + PropertiesProperties

Page 24: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Workflow

Spring 2011 SCM-CityU 24

Files

Publish View

Flash Player

Page 25: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Let’s start a simple example!

Spring 2011 SCM-CityU 25

Page 26: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Document Properties

• Change stage properties & save as Ex01.fla

Spring 2011 SCM-CityU 26

Page 27: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Use Commands

• Test movie– Control > Test Movie (Ctrl + Enter)

• Play (for previewing animation) – Control > Play (Enter)

• Publish – File > Publish (Shift + F12)

Spring 2011 SCM-CityU 27

Page 28: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Shape & Drawing Object

• Shape

Spring 2011 SCM-CityU 28

Page 29: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Shape & Drawing Object

• Drawing object – Make sure object drawing is enabled

Spring 2011 SCM-CityU 29

Page 30: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Layers

Spring 2011 SCM-CityU 30

Layer3

Layer2

Layer1

Page 31: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Symbols and Library

• Symbol: reusable content – Stored in the library– Required for many operations

• E.g., motion tween, access in ActionScript

Spring 2011 SCM-CityU 31

Convertto Symbol Insta

nce

Page 32: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Symbols and Library

• Each instance can have its own properties, effects, and filters

Spring 2011 SCM-CityU 32

Page 33: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Symbols and Library

• But if you change the symbol, every of its instances will be changed correspondingly

Spring 2011 SCM-CityU 33

Page 34: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Tween

• Tween (between) can be assigned to keyframe intervals – Automatically interpolate frames between keyframes

• Motion Tween – Mainly for keyframes with symbol instances

• Shape Tween – Mainly for keyframes with shapes/drawing objects

Spring 2011 SCM-CityU 34

Page 35: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Motion Tween Example

• Step 1: right click a symbol instance at Frame 1 & select Create Motion Tween

Spring 2011 SCM-CityU 35

Page 36: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Motion Tween Example

• Step 2: At Frame 25, change properties of the symbol – E.g., move it to a new place, change its alpha value

Spring 2011 SCM-CityU 36

Page 37: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Motion Editor

• Very powerful but not that intuitive to control

Spring 2011 SCM-CityU 37

Page 38: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

• Predefined motion– Window > Motion Presents

Spring 2011 SCM-CityU 38

Page 39: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Shape Tween Example

• Step 1: Right click a shape or drawing object at Frame 1 & select Create Shape Motion– E.g., a red square

• Step 2: Insert a blank keyframe at Frame 20 & draw some shape, e.g., a circle

Spring 2011 SCM-CityU 39

Page 40: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Recommend Flash Books

Spring 2011 SCM-CityU 40

Page 41: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

SM1205 Interactivity

Programming Fundamentals

Spring 2011 SCM-CityU 41

Page 42: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Talk to the Computer

• Computers & humans speak in different languages

Spring 2011 SCM-CityU 42

English, Mandarin,

Cantonese, …

Page 43: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Talk to the Computer

• Is there any interpreter for us? – Yes: through voice recognition – No: recognition is successful only at the level of

predefined sets of voice commands• E.g., “Xbox, pause”

• Computers do NOT have fuzzy human brains

– Need new languages with stricter grammars/syntaxes, called programming languages

Spring 2011 SCM-CityU 43

Page 44: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Programming Language

• Now humans “speak” in programming languages– E.g., Java, C, C++, Python, Flash ActionScript, …

• But computers still speak in binary

• Still need an interpreter – A special computer program which converts

the code written in a programming language to the binary the computer understands

• Different programming languages need different interpreters

Spring 2011 SCM-CityU 44

Page 45: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Spring 2011 SCM-CityU 45

0101011…

Write

Co

de

Code in Programming Language

Page 46: SM1205 Interactivity Topic 01: Introduction Spring 2011SCM-CityU1

Programming Language• Computers are NOT good at tolerating errors • You must exactly follow the grammars of programming

language – E.g., many programming languages are case-sensitive

Spring 2011 SCM-CityU 46