28
LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 Chapter 9 - Interaction in 3D • Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D Widgets • Examples 1

Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

Embed Size (px)

Citation preview

Page 1: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Chapter 9 - Interaction in 3D

• Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D Widgets • Examples

1

Page 2: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

The 3D rendering pipeline (our version for this class)

2

3D models in model coordinates

3D models in world coordinates

2D Polygons in camera coordinates

Pixels in image coordinates

Scene graph Camera Rasterization

Animation, Interaction

Lights

Page 3: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

3D Mouse “3Dconnexion SpaceNavigator”

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

2D, 3D, and Interaction• Interface based on 2D rectangular image

– Rendering pipeline ends in 2D (raster) image – Most positional input devices (mouse, tablets, touch screens) designed for 2D

• Many interactions affect 3D world (scene graph) – Mapping of 2D-based interaction into 3D world

• Special interaction devices for 3D remain rarely used – Game controllers may change the situation

3

Nintendo Wiimote

Page 4: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Chapter 9 - Interaction in 3D

• Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D widgets • Examples

4

Page 5: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Navigation in a 3D scene• Two possible perspectives (and mental models): • Move around or turn a 3D object (inspect)

– camera or object actively controlled • Move within a 3D world (walk/fly)

– way of moving often borrowed from real world (walk, fly, drive, ...) – camera often associated with an “avatar”

5

http://castle-engine.sourceforge.net/view3dscene.php

Page 6: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Walk Mode• Well known from many ego shooter

games • Use mouse or (cursor) keys to

– move forward or backward – turn left or right

• Ground level needs to be defined • Up always stays up • „Gravity“ keeps avatar to the ground • Additional actions may be defined

(Jump, ...) • User can get lost or trapped • Often used in conjunction with

navigation aids6

http://revistagames.files.wordpress.com/2009/12/doom11.jpg

http://cache.kotaku.com/assets/resources/2007/05/tomb_raider_wii_500.jpg

Page 7: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Fly Mode• Just like walk, but get rid of gravity • Additional key or mouse mappings

for up/down • Can still be reasonably constrained

– up stays up – gravity eventually pulls you down

• Can be fully unconstrained – additional mapping for roll left/right – scene can become all mixed up

• Provides better overview – just fly up high to see all terrain

7

http://www.blogcdn.com/socialsoftware.weblogsinc.com/media/2006/01/second_life_web.jpg

Page 8: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Examine Mode• Object to be examined is at the center of an

invisible bounding sphere • Mouse click touches the sphere and • Mouse move drags its surface around !

• No constraints, up doesn’t stay up • Can easily get lost and turn world upside down • Motion can be constrained to one axis

– less danger to get disoriented – danger of a „gimbal lock“ state

8

http://docs.autodesk.com/3DSMAX/13/ENU/Autodesk 3ds Max 2011 Help/images/MED/Zelda-Ref/ill/ill_boundingsphere.png

Quiz: There is one place on earth, from which you can go 10 Km south, 10 Km east and 10 Km north and you arrive at the same point. Where is this?

Page 9: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Scene in Hand - Camera in Hand• In Examine mode there are two interface metaphors

– they result in exactly opposite motions !

• Scene in hand – moving the mouse left turns the scene left !

• Camera in hand – moving the mouse left moves the camera left – this causes the scene to turn right !

• Read up: – [Ware & Osborne 1995: Exploration and Virtual Camera Control in Virtual Three Dimensional Environments]

9

Page 10: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Navigation Aids• Maps

– provide overview and orientation – can provide additional info (objects, enemies) !

• Compass – shows heading info – helps keeping track of orientation in a maze

10http://www.wizards.com/dnd/images/rhod_maps/95695.jpg

Page 11: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Fixed Viewpoint Transitions• Define multiple viewpoints (cameras) in scene • Move from one viewpoint to another

– animate camera movement – camera „cut“

• Always land in a safe and known state • Use in conjunction with other navigation

– provides a „safe anchor“

11

http://fisherka.csolutionshosting.net/astronote/Clarkxref/img/HelpViewMenuActivated.jpg

Page 12: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Chapter 9 - Interaction in 3D

• Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D Widgets • Examples

12

Page 13: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Picking• Given a mouse position, which object in the 3D scene is hit by it?

– potentially several – We may want all to select from them, or just the first !

• Expensive: Intersect ray with all objects (as in raytracing) • Cheaper: OpenGL picking by modified rendering

– see next slide • Very cheap: color coding

– Define unique color for each object (independent of actually rendered color) – Render with these special colors on back buffer (invisible to user) – Derive object identity from color of pixel – Assumes double buffering. Do not swap front and back buffer here!

• http://www.lighthouse3d.com/opengl/picking/

13

Page 14: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

OpenGL Picking• Uses a special rendering mode (GL_SELECT)

– Rendering only internally for picking, not actually shown on display! • Can deliver all objects at a certain (2D specified) position

– Using a pick buffer to store found objects – Objects can be assigned unique IDs (numbers) for this – Otherwise just minimum and maximum depth are recorded

• Uses a pick window – Small viewing volume around the mouse

• Basic sequence: – Prepare pick buffer and object IDs – Get window coordinates of mouse – Enter selection mode – Define pick window and render all objects/Polygons in that smaller volume – Exit selection mode and identify objects rendered in pick window

14

Page 15: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Direct Hand Manipulation (3D Cursor)• Move a cursor (or hand) in 3D space with input device

– 3DOF space mouse directly – regular mouse with modes

• Select object by moving the 3D cursor directly to its position !

• Efficient object retrieval via octrees • Problem: object may be out of reach

15

Page 16: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Ray and Beam casting• Technique for selecting objects out of reach !

• Given an immersive 3D world (HMD, data glove, ...) – compute a ray or beam from the hand into the

scene – find the first intersecting object – susceptible to Jitter (think of a laser pointer) !

• read up: – [Mark R. Mine, ´95: Virtual Environment Interaction

Techniques] – ftp://ftp.cs.unc.edu/pub/technical-reports/95-018.ps.Z

16

http://w3-mmt.inf.tu-dresden.de/english/projekte/CONTIGRA/Realisierung/Widget_Classification/images/spotlight.jpg

Page 17: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

• Select an object in the scene using the techniques above

• Unconstrained motion would need 3 DOF input !

• Constrain motion to 1 or 2 dimensions !

• Example in VRML: – Cylinder sensor: object rotates about 1 axis (1 DOF) – PlaneSensor: object moves in a plane (2 DOF)

17

Manipulation with Constrained Motions

Page 18: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Chapter 9 - Interaction in 3D

• Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D Widgets • Examples

18

Page 19: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

3D Widgets• Tools which are mostly part of the 3D scene themselves • Used for object selection, manipulation and navigation/inspection • Many examples at Raimund Dachselt‘s collection

– http://www.3d-components.org/

19

Page 20: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

World in Miniature - WIM• Miniature copy of the entire 3D world

– can be manipulated in the hand – acts as a representation of the big world – feels like a 3D map !

• Interaction techniques using a WIM: – Quickly changing the point of view – Object selection over a distance – Object manipulation !

• read up: – [Stoakley et al. 1995: Virtual reality on a WIM: interactive worlds in miniature] – http://www.cs.cmu.edu/~stage3/publications/95/conferences/chi/paper.html

20

Page 21: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Silk Cursor• Use a semi-transparent volume as a 3D cursor • Controlled in 3 degrees of freedom

– translation along 3 axes • Judge depth ordering by the partial occlusion effect • Used to select objects out of reach !

• read up: – Shumin Zhai, William Buxton, Paul Milgram 1996:The Partial-

Occlusion Effect: Utilizing Semitransparency in 3D Human-Computer Interaction

– http://etclab.mie.utoronto.ca/people/shumin_dir/SILK/silk.html

21

Page 22: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Image Plane Interaction• Used with HMDs • Find finger positions in the image • Cast a ray into the scene, and

intersect it with objects • Several techniques proposed:

– head crusher – sticky finger – lifting palm – framing hands !

• Read up: – [Pierce et al. 1997: Image Plane Interaction

Techniques In 3D Immersive Environments] – http://www.cs.cmu.edu/~stage3/publications/97/conferences/3DSymposium/HeadCrusher/

22

Page 23: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Chapter 9 - Interaction in 3D

• Input Methods for 3D Graphics • Navigation in a 3D Scene • Object Selection and Manipulation • 3D widgets • Examples

23

Page 24: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

PerspectiveTable• Gemeinsames Projekt RWTH Aachen & LMU München

– Aktuelle Forschungsarbeit • Basiert auf zwei Arbeitsplatz-Prototypen, die große horizontale und

vertikale Touch Displays kombinieren

24

Curve

LMU München

BendDesk

RWTH Aachen

Page 25: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Telekooperation über zwei Tischpulte

25

Page 26: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Genüber als Avatar repräsentiert• Fertiges System:

26

Page 27: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Skelettanimation gesteuert durch Tiefenkamera

27

Page 28: Chapter 9 - Interaction in 3D · PDF fileChapter 9 - Interaction in 3D ... • Additional key or mouse mappings for up/down • Can still be ... • Can easily get lost and turn world

LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 9 !

Arbeitsbereiche und Metaphern

28

Hintergrund

Vordergrund