Trang 5 Modeling■ Describing to the computer□What is a table, a car…□Concerned with: Trang 6 Rendering■ Draw the description□Create 2D image from 2D / 3D models□Concerned with:▫viewing
Trang 1Lesson 2
Graphics systems
Trinh Thanh Trung School of ICT, HUST
Trang 21 Graphics pipeline
2 Graphics software
3 Graphics hardware
Trang 3Graphics pipeline
Trang 4Object representation
■ To display an object to the screen…
Displaying Rendering
Modeling
Trang 5■ Describing (to the computer)
□ What is a table, a car…
□ Concerned with:
▫ geometric info, color models, material property, lighting property
Trang 6■ Draw the description
□ Create 2D image from 2D / 3D models
□ Concerned with:
▫ viewing & projection
▫ drawing & clipping primitives
▫ local illumination & shading
▫ texture mapping, global rendering
Trang 9Application stage
■ Entirely done in software by the CPU
■ Load Data: world geometry, user’s input
■ In response to the user’s input, the application stage change the view or scene
Trang 10Geometry stage
■ Applying transformations to the object vertices (scaling, rotating, translating)
■ View transformation (viewing from the camera)
■ Illumination and shading
Trang 11Rasterization stage
■ Converting the continuous representation
(curves and lines) into the discrete representation (pixels)
Trang 12Example scene
Trang 131 Modeling objects
• Define polygons, parametric
curves/surfaces, etc & its own coordinate system
Trang 142 Model transformation
• Applying translation, scaling and
rotation
Trang 153 Perspective projection
• Convert from 3D coordinates to
2D coordinates
Trang 164 Hidden surface removal
• Objects occluded by other objects
must not be drawn
Trang 175 Shading and lighting
• Define the colour of each pixel
Trang 186 Rasterization
• Convert vertex information
into pixel information
• Anti-aliasing
Trang 197 Texture mapping
• Map textures on objects
Trang 208 Others
• Bump-mapping
• Reflections
• Shadows
Trang 21Graphics hardware
Trang 22Graphics hardware overview
Trang 23Graphics hardware components
■ System Memory: consists of programs and
instructions being executed
■ Graphics Package: provides graphics functions for applications
■ Application Program
■ Frame buffer
■ Video Controller: control display device, convert digital data from framebuffer to pixel on screen
Trang 24Graphical Processing Unit
■ An extremely flexible and powerful processor
▫ Only designed for and driven by video games
▫ Underlying architectures are rapidly evolving and largely secret
Trang 25Role in graphics pipeline
■ The role of GPU in graphics pipeline
□ Pipe widths vary
□ Many caches, FIFOs, and so on not shown
■ In modern graphics pipeline
□ Add vertex processor and fragment processor
GPU CPU
Application Transform Rasterizer Shade MemoryVideo
(Textures)
Vertices (3D) Xformed, Lit Vertices
(2D)
Fragments (pre-pixels)
Final pixels (Color, Depth )
Graphics State
Render-to-texture
Trang 26■ Drives video display from a memory buffer
containing a complete frame of data
□ E.g 24 bits per pixel = 8 bits red , 8 bits green , 8 bits
blue
Trang 27■ True-color (24-bit) framebuffer stores one byte for red, green or blue
□ Each pixel can have 2 24 colours
□ X : 0 Xmax 2 colour / 1 bit
□ Y : 0 Ymax 16 colour / 4 bit
Trang 28Graphics display
SONY Trinitron CRT
NEC Hybrid Mask Hitachi EDP Standard Dot-trio
Trang 29CRT display
■ Raster Displays (early 70s)
□ like television, scan all pixels in regular pattern
□ use frame buffer (video RAM) to eliminate sync problems
▫ RAM ¼ MB (256 KB) cost $2 million in 1971
Trang 30Pros and cons of CRT
□Discreet sampling (pixels)
□Practical limit on size (call it 40 inches)
□Bulky
□Finicky (convergence, warp, etc.)
Trang 32Pros and cons of LCD
□Completely flat screen
□Crisp pictures - digital
and uniform colors
Trang 33Plasma display
■ Plasma display
□ Similar in principle to fluorescent light tubes
□ Small gas-filled capsules are excited by electric field, emits UV light
□ UV excites phosphor Phosphor relaxes, emits some other color
Trang 34Pros and cons of Plasma
Pros
□Large viewing angle
□Good for large-format
□Phosphors gradually deplete
□Less bright than CRTs, using more power
Trang 35■ Organic Light-Emitting Diode (OLED) Arrays
□ OLEDs function like regular semiconductor LEDs, but with thin-film polymer construction
▫ Thin-film deposition of organic, light-emitting molecules through vapor sublimation in a vacuum.
▫ Dope emissive layers with fluorescent molecules to create color.
▫ Not grown like a crystal, no high-temperature doping
▫ Thus, easier to create large-area OLEDs
Trang 36Pros and cons of OLED
□Prone to water damage
Trang 37Graphics software
Trang 38Input and
output devices Metafiles
Operating system
Trang 39Graphics software
■ Interface between application software and
graphics hardware system
■ Consists of input subroutines and output
subroutines accepting input data or commands
from a user and converting internal representations into external pictures on screen, respectively
Trang 40Graphics official standards
■ GKS (Graphics Kernel System)
■ GKS Functional Description, ANSI X3.124 - 1985
■ GKS - 3D Functional Description, ISO Doc
#8805:1988
■ CGI (Computer Graphics Interface System)
■ CGM (Computer Graphics Metafile)
■ VRML (Virtual Reality Modeling Language)
■ PHIGS (Programmers Hierarchical Interactive Graphics Standard)
□ PHIGS Functional Description, ANSI X3.144 - 1985.
□ PHIGS+ Functional Description, 1988, 1992
Trang 41Unofficial
Trang 42Any questions?
Trang 43Lecture notes provided by School of Information and
Communication Technology, Hanoi University of Science and
Technology.
Composed by Huynh Quyet Thang, Le Tan Hung, Trinh Thanh
Trung and others
Edited by Trinh Thanh Trung
Special thanks to all the people who made and released these awesome resources for free:
■ Presentation template by SlidesCarnival
■ Photographs by Death to the Stock Photo ( license )
■ Diverse device hand photos by Facebook Design Resources