Smart Graphics: Graphics and Communication

48
LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11 Smart Graphics: Graphics and Communication Lecture „Smart Graphics” Andreas Butz 26.10.2010 1

Transcript of Smart Graphics: Graphics and Communication

Page 1: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Smart Graphics: Graphics and Communication

Lecture „Smart Graphics”Andreas Butz26.10.2010

1

Page 2: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Graphik und Kommunikation• Eine „Grammatik“ für Diagramme

–Syntax–Semantik

• Rhetoric Structure Theory–Grundidee–Anwendung auf multimediale Präsentationen

• Generisches Modell eines SG systems• Praktisches Beispiel: Generierung von 3D-

Animationen• Dabei insbesondere: hierarchische Planung

2

Page 3: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Eine Grammatik für Diagramme: APT [Mackinlay 1986]

3

Page 4: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Ausgangsdaten

4

Page 5: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Diagramme als visuelle Sprache• Graphische Elemente (Punkte, Linien, ..) sind die „Worte“• Mehrere Elemente werden zu „Sätzen“ kombiniert

(Syntax)• Worte und Sätze haben Bedeutungen (Semantik)• Visualisierung = Generierung eines Satzes, der genau die

beabsichtigten Inhalte ausdrückt

5

Page 6: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Formale Beschreibung eines Diagrams

6

Page 7: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Zugehörige graphische Ausgabe

7

Page 8: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Alternative graphische Umsetzung

8

Page 9: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Gegenbeispiel

9

Page 10: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Rhetoric Structure Theory [Mann & Thompson, 1988]

• Beschreibung der hierarchischen Struktur eines Textes

• Unterteilung des Textes in logische Einheiten, z.B. Teilsätze

• Relationen zwischen diesen Einheiten –Nukleus – Relation – Satellit

• Insgesamt 23 Relationen–Preparation, elaboration, background, purpose,…

• Schemata für typische Kombinationen• Fast jeder Text kann durch einen RST-Baum

beschrieben werden

10

Page 11: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

RST - Beispiel

11

Page 12: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

RST Multimedia Planung in WIP[Andre & Rist 1997]

• Verallgemeinerung von RST auf Multimediale Inhalte–Text, Bilder, Animationen, (Zeigegesten)

• Planung multimedialer Dokumente als hierarchischer Planungsprozess–Beginne mit der Wurzel des RST-Baumes–Unterteile in logische Einheiten–Lege Medium für jede Einheit fest–Generiere jeweilige Einheit (Text, Bild, Animation)

12

Page 13: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

WIP Architektur

13

Page 14: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

WIP Generierungsbeispiel

14

Page 15: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Some typical elements of SG systems

• Strong simplification and generalization• Often only some elements present

Domainknowledge

Designknowledge Reasoning,

Planning, Inferencing,

Optimization,…

Rendering,Output,

Presentation,…

Reflectionof results

Display

inputUser model,Preferences

15

Page 16: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Concrete example: filmmaking• Task: create a 3D animation for the

explanation of a technical device• Starting point: communicative goal

–Example: show where the switch X is• Intended result: 3D animation

–E.g., showing where switch X is

16

Page 17: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11 17

Page 18: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Concrete example: filmmaking• Example system CATHI [Butz, 97]

Geometry of objects and

actions

Rules of filmmaking

Hierarchical planning of

an animation script

Rendering of images from the

script

Timing,Lighting

Display

inputUserpreferences

18

Page 19: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Knowledge representation• Representations can only capture part of the reality

– Which aspects do we need to model?– At which level of detail do we need to model them?– Do we need qualitative or quantitative knowledge?– How do we want to process the knowledge?

• Different kinds of knowledge must be represented– Domain knowledge– Design knowledge– Knowledge about the user

Domainknowledge

Designknowledge User model,

Preferences

19

Page 20: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Domain Knowledge• Knowl. about things in the problem domain, e.g.,

–Road network in a geographic database–Personal picture or music collection with metadata–Text and picture blocks for a magazine page

• Exchangeable if clearly separated from the rest–E.g., visualizations of different music collections–Route instructions in different cities

Domainknowledge

20

Page 21: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Domain Knowledge• In the filmmaking example:

–Geometries of objects + bounding boxes–Surfaces/colors of objects–Object groups and hierarchy–Preferred viewing directions of objects/groups–Trajectories of movements

Domainknowledge

up back

right

downfrontleft

open

21

Page 22: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Design Knowledge• Knowledge how to structure graph. presentations, e.g.,

– Rules of grid-based layout– Rules about the composition of an image– Rules about the composition of diagrams

• In the filmmaking example:– Formal „grammar“ of the film language– Rules about temporal and spatial compositions of shots

• Must be formal enough to be used by a machine!• When exchanged, changes visual style

Designknowledge

22

Page 23: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Example from CATHI:a formal grammar of the film language

• Rules for decomposing sequences into subsequences

• Reusable in different situations• Querying calculations in the 3D model• Details later

23

Page 24: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

User model / preferences• Knowledge about the user

–Properties, such as level of expertise–Preferences, given implicitly or explicitly –Current context of the user–Also: capabilities of the output medium

• Examples–Previously bought items–Personal viewing preferences–Current resolution of the

output screen

User model,Preferences

24

Page 25: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

User preferences in CATHI

Stylistic preferences of the user

Graphical capabilities of the user‘s machine

(back in 1997!)

25

Page 26: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Reasoning• Algorithms for:

–Further refining the domain knowledge –Application of design knowledge

• Output of the reasoning process:–Complete structural description of the presentation

• Examples:–Route calculation on a road network–Layout of labels in a map–Layout of text blocks on a page–Specification of diagram elements

• Often the core of a SG system

Reasoning,Planning,

Inferencing,Optimization,

26

Page 27: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Example: animation scripts

27

Page 28: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Parallel Decomposition

steady-shot

keep-camera

keep-viewang.

(defrule steady-shot (duration) (parallel (keep-camera duration) (keep-viewangle duration)))

t

28

Page 29: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Sequential Decomposition

(defrule blink-object (object duration) (sequential (invisible object (* 0.25 duration)) (visible object (* 0.25 duration)) (invisible object (* 0.25 duration)) (visible object (* 0.25 duration))))

t

inv. vis. inv. vis.

blink-object

29

Page 30: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Incremental Decomposition

localize-object

steady-shot zoom-in

t

(defrule localize-object (object duration) (incremental (steady-shot (* 0.2 duration)) (zoom-in object (* 0.4 duration)) (blinking-shot object (* 0.4 duration))))

blinking-shot

30

Page 31: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Why incremental generation?

Script generation Rendering Display

Script generation Rendering

Display

Rendering

Display

Script generation

31

Page 32: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Current generation context

Camera position and settings

Base lightingEffect lights

Timing of the generation and presentation

Object positions and properties

32

Page 33: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Conditional Decomposition

(defrule highlight-object (object duration) (if (feature color) (blink-object-color object duration) (blink-object-opacity object duration)))

highlight-object

t

blink-object-color

t

blink-object-opacity

33

Page 34: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Translation of elementary sequences

(defrule adjust-viewangle (from to duration) `(:adjust-viewangle :from ,from :to ,to :duration ,duration))

adjust-viewangle

(:adjust-viewangle :from 45 :to 20 :duration 5)

34

Page 35: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Generierung eines Skripts

localize-object

steady-shot

keep-camera

keep-viewang.

k-c

k-v

zoom-in

keep-camera

zoom-viewangle

keep-camera

zoom-viewangle

blinking-shot

keep-camera

blink-object

keep-viewang.

inv. vis. inv. vis.t

keep-camerakeep-viewangle

i iv v

35

Page 36: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Animation scripts in CATHI

36

Page 37: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Geometrical calculations• Calculations in the 3D model

– Camera positions–Object positions and movements–Obstructing objects–Exploded views–Metagraphical arrows

37

Page 38: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Computing camera positions

Intended viewing direction:(front, front, left, up)

Up back

right

downfront

left

38

Page 39: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Finding obstructing objects

39

Page 40: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Positioning metagraphical arrows

40

Page 41: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Rendering• Turn structural description into actual graphics• Rule: no presentation without representation!

–Structure of the output is internally represented–Each pixel has a “Meaning”–Presentation structure follows logical structure–User interactions can easily be interpreted

• Can be exchangeable for different output media• Can be quite powerful

–See NPR techniquesRendering,

Output,Presentation,

41

Page 42: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Rendering in CATHI• Translation of animation scripts into

different animation languages

• Real time output to Geomview– Just shaded polygons– Ambient, distant and point lights– Fast rendering enables AFL

• Batch output to Renderman– Textures and materials– Spot lights– Depth of field– Nice transparency

42

Page 43: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Reflection• Analysis of the generated presentation

– Either on the structure level– Or after rendering

• Influence back on the reasoning process• Anticipation Feedback Loop (AFL)• Can find errors in output• Self-monitoring• Very natural for humans

– Bike riding– Speaking Reasoning,

Planning, Inferencing,

Optimization,…

Rendering,Output,

Presentation,…

Reflectionof results

43

Page 44: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Example: Reflection on a structure level

• Temporal adaptivity of CATHI‘s generation process

• Choose simpler decomposition if time is scarce

44

Page 45: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Example: Reflection after rendering

45

Page 46: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

In- and Output• Output can be just graphical or coordinated with

other media–Coordination by „higher authority“–Integration of other media in the planning process

• Input can be explicit or implicit–Checking boxes, setting user profile–Previous interactions with the system–Learned profile

• In CATHI: just checkboxesDisplay

input

46

Page 47: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Integration of CATHI into WIP

Presentationplanning

Text

Graphics

Gestures

3D-Animation

Layout

47

Page 48: Smart Graphics: Graphics and Communication

LMU München – Medieninformatik – Butz – Smart Graphics – WS2010/11

Some example generations of CATHI

Adaptation to different capabilities of the output medium

48