Computer Graphics - Input & Interaction-

Slides:



Advertisements
Similar presentations
Computer Graphics - Graphics Programming -
Advertisements

SEMINAR ON VIRTUAL REALITY 25-Mar-17
OpenGL CMSC340 3D Character Design & Animation. What is OpenGL? A low-level graphics library specification designed for use with the C and C++ provides…
In put Devices and Media In order for a computer to do anything it must be told what to do.
1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
Virtual Reality Design Virtual reality systems are designed to produce in the participant the cognitive effects of feeling immersed in the environment.
Chapter 3: Input and Interaction Instructor: Shih-Shinh Huang 1.
Virtual Reality. What is virtual reality? a way to visualise, manipulate, and interact with a virtual environment visualise the computer generates visual,
InteractionHofstra University1 Graphics Programming Input and Interaction.
31/1/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 3: Introduction.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 GLUT Callback Functions.
Based on slides created by Edward Angel
CSC461 Lecture 9: GLUT Callbacks Objectives Introduce double buffering for smooth animations Programming event input with GLUT.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
Introduction to Virtual Environments CISE 6930/4930
Introduction to Virtual Environments CIS 4930/6930
2.03B Common Types and Interface Devices and Systems of Virtual Reality 2.03 Explore virtual reality.
Welcome to the world of G.V.Ram Mohan Reddy G.V.Ram Mohan Reddy.
 Introduction  Devices  Technology – Hardware & Software  Architecture  Applications.
   Input Devices Main Memory Backing Storage PROCESSOR
Welcome to CGMB574 Virtual Reality Computer Graphics and Multimedia Department.
11.10 Human Computer Interface www. ICT-Teacher.com.
Fundamentals of Computer Graphics Part 3 prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.: Interactive.
Virtual Reality David Johnson. What is Virtual Reality?
School of Computer Science University of Seoul. 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input.
1Computer Graphics Input and Interaction Lecture 8 John Shearer Culture Lab – space 2
CAP 4703 Computer Graphic Methods Prof. Roy Levow Lecture 3.
Lecture 3 OpenGL.
1 Input and Interaction. 2 Input Devices Physical input devices Keyboard devices and pointing devices Logical input devices.
Computer Graphics I, Fall 2010 Input and Interaction.
COMPUTER GRAPHICS Hochiminh city University of Technology Faculty of Computer Science and Engineering CHAPTER 01: Graphics System.
Welcome to 14:332:476 Virtual Reality Spring 2008 Grigore C. Burdea Ph.D. Director, Human–Machine Interface Laboratory, CAIP Center, Rutgers University.
CS 480/680 Computer Graphics Programming with Open GL Part 7: Input and Interaction Dr. Frederick C Harris, Jr. Fall 2011.
VIRTUAL REALITY Sagar.Khadabadi. Introduction The very first idea of it was presented by Ivan Sutherland in 1965: “make that (virtual) world in the window.
Virtual Reality Lecture2. Some VR Systems & Applications 고려대학교 그래픽스 연구실.
GENESIS OF VIRTUAL REALITY  The term ‘Virtual reality’ (VR) was initially coined by Jaron Lanier, founder of VPL Research (1989)..
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of 1-1 HCI Human Computer Interaction Week 9.
1 Introduction to Virtual Environments User Interfaces and Usability Fall 09 John Quarles
Interactive Computer Graphics CS 418 MP1: Dancing I TA: Zhicheng Yan Sushma S Kini Mary Pietrowicz Slides Taken from: “An Interactive Introduction to OpenGL.
Introduction to OpenGL and GLUT. What’s OpenGL? An Application Programming Interface (API) A low-level graphics programming API – Contains over 250 functions.
2.03 Explore virtual reality design and use.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
HCI 입문 Graphics Korea University HCI System 2005 년 2 학기 김 창 헌.
1 Input and Interaction. 2 Objectives Introduce the basic input devices ­Physical Devices ­Logical Devices ­Input Modes Event-driven input Introduce double.
Augmented Reality Authorized By: Miss.Trupti Pardeshi. NDMVP, Comp Dept. Augmented Reality 1/ 23.
1 Graphics CSCI 343, Fall 2015 Lecture 6 Viewing, Animation, User Interface.
University of New Mexico
GLUT functions glutInit allows application to get command line arguments and initializes system gluInitDisplayMode requests properties for the window.
Haris Ali (15) Abdul Ghafoor (01) Kashif Zafar (27)
Made By: Pallavi Chhikara
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Input and Interaction Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
31/1/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 2: Introduction.
Virtual Reality - by Arpit Gupta. Introduction  Virtual reality is an artificial environment that is created with software and presented to the user.
COMP413: Computer Graphics Overview of Graphics Systems Chapter 1.
Virtual Reality Prepared By Name - Abhilash Mund Regd.No Branch - Comp.sc & engg.
Introducing virtual REALITY
Review GLUT Callback Functions
Introduction to Virtual Environments & Virtual Reality
Computer Graphics Lecture 33
CSC461 Lecture 8: Input Devices
Introduction to Computer Graphics with WebGL
Virtual Reality.
Isaac Gang University of Mary Hardin-Baylor
Input and Interaction Ed Angel
University of New Mexico
Input and Interaction Ed Angel
Basic OpenGL programming, Geometric objects & User Interaction
Input and Interaction Ed Angel Professor Emeritus of Computer Science,
Presentation transcript:

Computer Graphics - Input & Interaction- Hanyang University Jong-Il Park

Objectives Introduce the basic input devices Event-driven input Physical Devices Logical Devices Input Modes Event-driven input Double buffering for smooth animations Programming event input with GLUT Virtual reality: interaction + reality

Project Sketchpad Ivan Sutherland (MIT 1963) established the basic interactive paradigm that characterizes interactive computer graphics: User sees an object on the display User points to (picks) the object with an input device (light pen, mouse, trackball) Object changes (moves, rotates, morphs) Repeat

Graphical Input Devices can be described either by Modes Physical properties Mouse Keyboard Trackball Logical properties What is returned to program via API A position An object identifier Modes How and when input is obtained Request or event

Physical Devices mouse trackball light pen data tablet joy stick space ball

Incremental (Relative) Devices Devices such as the data tablet return a position directly to the operating system Devices such as the mouse, trackball, and joy stick return incremental inputs (or velocities) to the operating system Must integrate these inputs to obtain an absolute position Rotation of cylinders in mouse Roll of trackball Difficult to obtain absolute position Can get variable sensitivity

Logical Devices Consider the C and C++ code What is the input device? C++: cin >> x; C: scanf (“%d”, &x); What is the input device? Can’t tell from the code Could be keyboard, file, output from another program The code provides logical input A number (an int) is returned to the program regardless of the physical device

Input Modes Input devices contain a trigger which can be used to send a signal to the operating system Button on mouse Pressing or releasing a key When triggered, input devices return information (their measure) to the system Mouse returns position information Keyboard returns ASCII code

Request Mode Input provided to program only when user triggers the device Typical of keyboard input Can erase (backspace), edit, correct until enter (return) key (the trigger) is depressed Eg. scanf()

Event Mode Most systems have more than one input device, each of which can be triggered at an arbitrary time by a user Each trigger generates an event whose measure is put in an event queue which can be examined by the user program

Event Types Window: resize, expose, iconify Mouse: click one or more buttons Motion: move mouse Keyboard: press or release a key Idle: nonevent Define what should be done if no other event is in queue

Callbacks Programming interface for event-driven input Define a callback function for each type of event the graphics system recognizes This user-supplied function is executed when the event occurs GLUT example: glutMouseFunc(mymouse)

GLUT callbacks GLUT recognizes a subset of the events recognized by any particular window system (Windows, X, Macintosh) glutDisplayFunc glutMouseFunc glutReshapeFunc glutKeyboardFunc glutIdleFunc glutMotionFunc, glutPassiveMotionFunc

GLUT Event Loop Recall that the last line in main.c for a program using GLUT must be glutMainLoop(); which puts the program in an infinite event loop In each pass through the event loop, GLUT looks at the events in the queue for each event in the queue, GLUT executes the appropriate callback function if one is defined if no callback is defined for the event, the event is ignored

The display callback The display callback is executed whenever GLUT determines that the window should be refreshed, for example When the window is first opened When the window is reshaped When a window is exposed When the user program decides it wants to change the display In main.c glutDisplayFunc(mydisplay) identifies the function to be executed Every GLUT program must have a display callback

Posting redisplays Many events may invoke the display callback function Can lead to multiple executions of the display callback on a single pass through the event loop We can avoid this problem by instead using glutPostRedisplay(); which sets a flag. GLUT checks to see if the flag is set at the end of the event loop If set then the display callback function is executed

Animating a Display When we redraw the display through the display callback, we usually start by clearing the window glClear() then draw the altered display Problem: the drawing of information in the frame buffer is decoupled from the display of its contents Graphics systems use dual ported memory Hence we can see partially drawn display See the program single_double.c for an example with a rotating cube

Double Buffering Instead of one color buffer, we use two Front Buffer: one that is displayed but not written to Back Buffer: one that is written to but not displayed Program then requests a double buffer in main.c glutInitDisplayMode(GL_RGB | GL_DOUBLE) At the end of the display callback buffers are swapped void mydisplay() { glClear(GL_COLOR_BUFFER_BIT|….) . /* draw graphics here */ glutSwapBuffers() }

Using the idle callback The idle callback is executed whenever there are no events in the event queue glutIdleFunc(myidle) Useful for animations void myidle() { /* change something */ t += dt glutPostRedisplay(); } Void mydisplay() { glClear(); /* draw something that depends on t */ glutSwapBuffers();

Using globals The form of all GLUT callbacks is fixed void mydisplay() void mymouse(GLint button, GLint state, GLint x, GLint y) Must use globals to pass information to callbacks float t; /*global */ void mydisplay() { /* draw something that depends on t }

Virtual Reality? Head-mounted Display (HMD)

Virtual Reality? BOOM (Binocular Omni-Orientation Monitor)

Virtual Reality? CAVE (Cave Automatic Virtual Environment)

Virtual Reality? Shared Virtual Environment

Virtual Reality Virtual 실제로는 존재하지 않지만, 본질적으로 존재하는 것과 동등한 효과를 가지는 것 실제 일어난 일, 현실감 Virtual Reality 실제로는 존재하지 않지만, 실제로 존재하는 것과 동등한 사실이나 사건

Def. VR What is Virtual Reality? “A high-end user interface that involves real-time simulation and interaction through multiple sensorial channels.” (vision, sound, touch, smell, taste)

VR의 3 요소 Presence Interaction Autonomy 사실적 reality, 몰입적 reality by D.Zelter (1992)

Three “I”s of VR Burdea, 1993. Immersion I 3 Interaction Imagination

Similar concepts (I) Virtual reality (1989, J.Lanier, VPL) “계산기에 의해 합성된 인공적 세계” Artificial reality(Mid-’70, M.Krueger) VIDEOPLACE: 실제처럼 느끼면서 컴퓨터가 만든 세계에 참여하여 상호작용하는 것 Cyberspace(1983, William Gibson) “a single artificial reality that could be experienced simultaneously by thousands of people worldwide”

Similar concepts (II) Telepresence or Tele-existence 우주공간, 심해 등 그대로는 체험하기 불가능한 곳의 상황을 현실감 넘치게 제시 현실의 복제라는 점에서 VR과 차별화됨 Augmented reality - virtual objects in real world Augmented virtuality - real objects in virtual world Mixed reality 기타: synthetic reality, virtual environment, virtual world, artificial life

Augmented Reality (ARTEMIS, U.Toronto)

Augmented Virtuality (www.cyberworldcorp.com)

MR Includes… AV real virtual AR

Reality vs. Virtuality Reality = Unmodelled Virtuality = Modelled Reality-Virtuality Continuum Real Environment Virtual Environment Extent of World Knowledge Continuum World Unmodelled World Completely Modelled

History of VR(I) Sensorama Simulator (Morton Heilig, 1962) head-mounted television( “ , 1960) Head-Mounted Display(Ivan Sutherland, 1966) Scene generator(Evans and Sutherland) simple scene about 200-400 polygons at 20 scenes/sec (1973) METAPLAY(1970) ,VIDEOPLACE(1974, Myron Krueger) Flight simulators etc. by military(70s to early 80s)

Sensorama Simulator Heilig, US Patent #3,050,870, 1962

Ivan Sutherland’s HMD (1966+)

Videoplace by M.Krueger

History of VR(II) VIVED(Virtual Visual Environment Display) project (NASA) LCD(Liquid Crystal Display)-based HMD (1981) Polhemus noncontact tracker – user’s head tracking Sensing glove (Fisher, 1985) VIVED -> VIEW(Virtual Interface Environment Workstation) 3D virtual sound source (Fisher and Wenzel, 1988) image wireframe rendering with flat shaded surface

History of VR(III) VPL, 1st commercial company selling VR products (1987) DataGloves EyePhones - 1st HMD “Vision”, 1st integrated commercial VR workstation (Division Ltd., UK, 1991) “WorldToolKit”, 1st VR development software (Sense8, 1992) Mixed Reality (ATR, 1994) Plenoptic modeling and image-based rendering (McMillan and Bishop, 1995) Virtualized Reality (CMU, 1996)

The VPL DataGlove (1987)

NASA VIEW system (1989)

History of VR(IV) VRML(Virtual Reality Modeling Language) VRML 2.0 (1996), VRML97: dynamic scene animation Currently Java 3D API, VRTP(VR Transfer Protocol) … Mixed reality applications

Recent Technologies in VR (I) Computer vision and computer graphics Image-based rendering Large scale visualization mosaic Robust geometric registration Motion/depth-keying Occlusion Image segmentation

Recent Technologies in VR (II) Devices See-through HMD (ST-HMD) Optical, Video ST-HMD Wearable equipments New tracking sensors for outdoor

Recent Technologies in VR (III) New interfaces Gesture recognition Tangible interface Haptic devices Hybrid interfaces

Applications of VR (I) Mobile Collaborative Commercial Outdoor navigation with wearable equipments Military training, sightseeing Collaborative Simultaneous and interactive multi-users Shared virtual environment Commercial Broadcasting: character service Entertainment Film industry

Applications of VR (II) Various simulator Flight, car driving Military training Building, factory, City modeling Medical application Human body 3D modeling (CT, MR) Tele-surgery Limitations of future VR Technology, interface, social acceptance

Relation of VR, CG, and CV VR

Major Issues in MR Accurate registration between virtual and real world Realistic display(vision, sound, touch, smell, taste) All should be in REAL-TIME Analysis Time(TA) Synthesis Time(TS) Feedback Time(= TA + TS) Should be small enough Should not annoy human’s feeling of reality

Critical Enabling Technology Accurate and fast registration between RW and VW !!! In more detail, a good tracker Fast Light and small Low power-consumption Accurate Immune to interference

? Where Are We Heading? Art Psychology Human science CG/CV Computers Mechanics Sensors HCI