lecture 4: graphics hardware 1 principles of interactive graphics cmscd2012 dr david england,...
TRANSCRIPT
JMU Lecture 4: Graphics Hardware 1
Principles of Interactive Graphics CMSCD2012
Dr David England, Room 711, ex 2271 [email protected]
http://java.cms.livjm.ac.uk/homepage/staff/cmsdengl/Teaching/cmscd2012/
Handout: PC Graphics Cards
JMU Lecture 4: Graphics Hardware 2
Today’s Lecture and Lab
Review of Tutorial: Transforms - check out the solutions sheet on the L: drive or web page
This Week: Graphics Hardware -
Handout from PCW PC Graphics Cards
No tutorial: Begin Coursework 1
JMU Lecture 4: Graphics Hardware 3
Graphics Hardware
Display: CRT Monitors - desktop and mobile LCD Monitors Framebuffers Interface between graphics card and monitor
Input: Mouse Joystick Tracker balls Position trackers
User Interface Issues
JMU Lecture 4: Graphics Hardware 4
Graphics Display Overview
Figure 1.36, Page 24 shows the common architecture for graphics display.
A frame buffer holds the digital information which makes up the full screen image
A scan controller converts information from the frame buffer and controls the scanning of electrons across the screen to draw the image.
Cathode Ray Tubes (CRT) are the commonest form of display and draw the image using 1 (mono) or 3 (red-green-blue) cathode rays (supports RGB colour model)
JMU Lecture 4: Graphics Hardware 5
Graphics Output Framebuffer ….
The scan controller draws pixels from left-to-right and top-to-bottom across the display
The complete screen is re-drawn at a given refresh rate e.g. 60Hz, 75Hz, 80Hz
The framebuffer is an area of RAM which maybe part of the system memory (older PC’s and some laptops) dedicated video memory on the motherboard or more
likely on a separate card (e.g. PCI or AGP slot cards) The size of the framebuffer dictates the maximum resolution
of the screen image and the maximum number of colours max_size (bytes) = (width x height x colour depth) / 8
JMU Lecture 4: Graphics Hardware 6
Modern PC graphics cards
Current PC graphics cards may have 16, 32 or 64Mbytes of video memory
This memory can hold one or more screen images plus textures
Programs can swap between screen images for animation this is how glutSwapBuffers() works
The card (e.g. GeForce2) may have hardware for Transform calculations Lighting calculations Moving areas of memory in the framebuffer Applying textures
These reduce load on the main system CPU
JMU Lecture 4: Graphics Hardware 7
Larger graphics systems
The VPro graphics system on Silicon Graphics NT/LINUX machines supports OpenGL in hardware
Larger Silicon Graphics machines have Multiple Graphical Processors Separate texture memory (64M - 1Gbytes) Very large framebuffers (80M -320Mbytes) Multiple main processors
Such machines are typically used for: Flight simulation, architectural planning, accident
investigation, weather forecasting, vehicle prototyping Typically used in projection systems using a CAVE or HMD
JMU Lecture 4: Graphics Hardware 8
Other display technologies
The other main display technology is LCD screen. Data can be taken directly from the framebuffer thus avoiding
the need for scanning and refresh LCD’s (and CRT’s) are also used in virtual reality technology
Stereo-glasses - where the left and right lens of the glasses are turned on and off in synchronisation with the presentation of left/right images on a monitor
Head-Mounted displays - which use prisms and/or lens to project an image from small LCD or CRT screens The image maybe mono or stereo
JMU Lecture 4: Graphics Hardware 9
2D Input Technologies
The mouse has been around since 1968 and has evolved into One (Apple), Two (PC) and Three (UNIX) buttons Ball and optical movement sensors wired and wireless operation
The basic drawbacks of the mouse are Controlled by the arm and wrist muscles - not fine control Needs space to operate Errors in selecting buttons Is a relative positioning device - which is useful in some
applications but not others History of the mouse http://www.nostalgia.itgo.com/Hardware/enMouse
.html
JMU Lecture 4: Graphics Hardware 10
Other 2D Input Technologies
Pen and graphics tablet-based devices Allow fine detail control using finger muscles Can (with tablet) allow absolute positioning Useful in design and engineering applications
Tracker balls and tracker pads take up less space and useful for mobile applications Can be difficult to control for small movements
JMU Lecture 4: Graphics Hardware 11
Fitt’s law states that the time taken to select an object is proportional to its size and distance from your hand
All 2D input devices have a control:display (C:D) movement ratio
These two factors effect the choice of input device for applications
Screen size 44cmMouse movement 3cm
44:3 C:D ratio
JMU Lecture 4: Graphics Hardware 12
3D Input Technologies
3D input devices are less common as they are more expensive can be hard to learn to use can be error prone and difficult to set up
Labtec Space ball - allows movement in 3 dimensionshttp://www.labtec.com/3d/intro/
Position trackers - e.g. Polhemus fastrak Usually operate by creating a magnetic field sensors mounted on head, hand or elsewhere record
movement in field Can be distorted by metalic objectshttp://www.polhemus.com/ourprod.htm
JMU Lecture 4: Graphics Hardware 13
3D Input Technologies ...
Cybergloves and cybersuits contain sensors which measure the bend of body joints used with position trackers to record the full range of
movement Very expensive maybe need to be calibrated for each user Can become less accurate with usehttp://www.virtex.com/products/hw_products/cyberglove.html
In general the lag between the processing of 3D input data and the updating of the display may lead to discomfort
The Sony Glasstron, for example, times out after 2 hours use, as a safety measure
JMU Lecture 4: Graphics Hardware 14
Coursework 1
Write a C++ program using OpenGL that presents a scene described in the coursework spec
Each scene will include a basic set of graphical components as specified below
Plagiarised work will receive no marks. Plagiarism includes copying material from the Internet
JMU Lecture 4: Graphics Hardware 15
Coursework 1 guidelines
1. Scene 1 Ship’s control bridge A dial indicating speed A GPS position dial in latitude and longitude An compass indication of current direction in degrees An artificial horizon – showing pitch and yaw of the ship A simple forward view out of the bridge window 2. Scene 2 Chef’s kitchen A gas-fired cooking hob A sink A set of work tops arrange around the kitchen walls A set of storage cupboards A central island with sink and work surface
JMU Lecture 4: Graphics Hardware 16
Coursework 1 guidelines …
Marks
1. Design document 30%2. C++ Code accuracy, layout and readability 20%3. C++ Code good use of OpenGL 20%4. Extra features 10%
interaction, animation, 3d effects5. Demonstration 20%
How well the program meets the coursework spec Are the objects recognisable and to scale?
Are colours and shapes used appropriately?
JMU Lecture 4: Graphics Hardware 17
Coursework 1 guidelines …
Use the code in L:\CD2012 as a starting point (circles, text, transforms etc.)
The design report should properly explain how you went about constructing the scene
The display function should not be a long list of glVertex() calls
Split the drawing of the scene into different functions
Any questions - ask the module leader.