Giáo trình thực tại ảo BKHN lession 2 graphics system

39 308 1
Giáo trình thực tại ảo BKHN lession 2 graphics system

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Lession 2 - Graphics System Lê Tấn Hùng Hanoi University of Technology hunglt@it-hut.edu.vn 2 Mô hình Hệ đồ họa  Mô hình hệ thống  Mô hình chức năng  Các chuẩn API hệ đồ hoạ  Grahics Pipeline  GPU 3 Application program Graphics system Graphics hardware Input and output devices Core, GKS, GKS-3D CGI (device interface) CGM (metafile) PHIGS (3D and realtime) X-window PHIGS+ (PEX) IGES OpenGL DirectX Metafiles Operating system Mô hình hệ thống đồ họa 4 Hệ thống đồ hoạ (Graphics System)  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  Phần mềm đồ hoạ hệ thống: – Là tập hợp các lệnh đồ hoạ của hệ thống (graphics output commands), – Thực hiện công việc hiển thị cái gì (what object) và chúng sẽ được hiển thị như thế nào (how). – Phần mềm đồ hoạ hệ thống là phần mềm xây dựng trên cơ sở một thể loại phần cứng nhất định và phụ thuộc vào phần cứng.  Phần cứng đồ hoạ: – Là tập hợp các thiết bị điện tử (CPU, bộ nhớ màn hình) giúp cho việc thực hiện các phần mềm đồ hoạ. 5 concerned with: - hardware - how to display (rasterization) concerned with: - modeling - modeling transf. - color models - material property - lighting property G U I MODELING RENDERING DISPLAYING what is a table, a car,    ( to describe) to the computer Geometric Engine (to capture) the description create 2D image from 2D / 3D models Rendering Engine generate image on screen (to show) the image Raster & Display Engine concerned with : - viewing & projection - drawing & clipping primitives - local illumination & shading - texture mapping - global rendering Thành phần trong chức năng của kỹ thuật đồ hoạ 6 3D Graphics Over World Wide Web SRGP library Pascal / C program X Window System Graphics hardware Image image formats, compression, transfer graphics algorithms colour Drawing packages transformation of objects 3D Graphics projections lighting,shading lines,areas, positions Video WWW Animation WWW VRML 7 Các chuẩn giao tiếp của hệ đồ hoạ  GKS (Graphics Kernel System): chuẩn xác định các hàm đồ hoạ chuẩn, được thiết kế như một tập hợp các công cụ đồ hoạ hai chiều và ba chiều. – GKS Functional Description, ANSI X3.124 - 1985. – GKS - 3D Functional Description, ISO Doc #8805:1988.  CGI (Computer Graphics Interface System): hệ chuẩn cho các phương pháp giao tiếp với các thiết bị ngoại vi.  CGM (Computer Graphics Metafile): xác định các chuẩn cho việc lưu trữ và chuyển đổi hình ảnh.  VRML (Virtual Reality Modeling Language): ngôn ngữ thực tại ảo, một hướng phát triển trong công nghệ hiển thị được đề xuất bởi hãng Silicon Graphics, sau đó đã được chuẩn hóa như một chuẩn công nghiệp.  PHIGS (Programmers Hierarchical Interactive Graphics Standard): xác định các phương pháp chuẩn cho các mô hình thời gian thực và lập trình hướng đối tượng. – PHIGS Functional Description, ANSI X3.144 - 1985. – PHIGS+ Functional Description, 1988, 1992. 8 Non-official industry standards Các chuẩn của hệ đồ hoạ  OPENGL thư viện đồ họa của hãng Silicon Graphics, được xây dựng theo đúng chuẩn của một hệ đồ họa. – SGI’s OpenGL 1993  DIRECTX thư viện đồ hoạ của hãng Microsoft – Direct X/Direct3D 1997 9 OpenGL  Software interface to graphics hardware  Client-server model  250 distinct commands  Object specification + image generation  Simple primitives: points, lines, polygons (pixels, images, bitmaps)  3D rendering  Commands interpreted using client-server model – Client (Application) issues commands – Server (OpenGL) interprets and processes commands – Frame buffer configuration done by the window system 10  Window tasks  User input  Complicated shapes – OpenGL Utility Library (GLU) – Window system support libraries  GLX / WGL / PGL – OpenGL Utility Toolkit (GLUT) – OpenInventor For portability, there are no commands for these. OpenGL-related Libraries [...]... phần phần cứng của hệ đồ hoạ tương tác Chức năng nhiệm vụ  CPU: thực hiện các chương trình ứng dụng Bộ xử lý hiển thị (Display Processor): thực hiện công việc hiển thị dữ liệu đồ hoạ Bộ nhớ hệ thống (System Memory): chứa các chương trình và dữ liệu đang thực hiện Gói phần mềm đồ hoạ (Graphics Package): cung cấp các hàm đồ hoạ cho chương trình ứng dụng Phần mềm ứng dụng (Application Program): phần mềm... Modern GPUs hỗ trợ độ chính xác cao – –   – Mô hình lập trình đặc biệt theo hướng computer graphics Môi trường lập trình chặt chẽ về cú pháp và câu lệnh Kiến trúc mức thấp: – – –  Hỗ trợ 32 bit floating point trên pipeline Bộ nhớ Nhược điểm GPUs được thiết kế chuyên cho video games –  Lập trình trên pixel, vertex, video engines Hỗ trợ lập trình với các ngôn ngũ bậc cao Thường song song Phát triển... Graphics Pipeline Graphics State Application Transform Vertices (3D) CPU  Rasterizer Xformed, Lit Vertices (2D) Video Memory (Textures) Shade Fragments (pre-pixels) GPU Final pixels (Color, Depth) Render-to-texture Tiến trình xử lý đồ họa - graphics pipeline – – Luồng luôn thay đổi độ và chuyển đổi dũ liệu giữa các phần nhiều Nhiều caches, FIFOs, và nhiều vấn đề khác GPU Fundamentals: The Modern Graphics. .. enough  – 12 Only renders the image, doesn’t manage windows, etc No high-level animation, modeling, sound (!), etc Useful rendering effects + high performance Open source and promoted by SGI (& Microsoft, half-heartedly) Graphics API   Two paradigms Integrated graphics and UI toolkits – –  Independent graphics and UI toolkits – – 13 Java portable OpenGL, Direct3D may not be portable Graphics Hardware...  Vi xử lý đồ họa - Graphics Pro Unit  GPU: thành phần xử lý chính trên bo mạch đồ họa với mục đich tăng tốc và phù hợp với các phần mềm đồ họa Đặc điểm chính – – – Programmability Precision Power GFLOPS  multiplies per second NVIDIA NV30, 35, 40 ATI R300, 360, 420 Pentium 4 July 01 Jan 02 July 02 Jan 03 July 03 Jan 04 Đặc điểm của GPU   Ưu điểm Modern GPUs có khả năng lập trình – –  Modern GPUs...DirectX   Direct control of graphics hardware Direct control of input/output devices, and sound Application program …… Windows system 11 Direct X Windows API Direct sound Direct input Direct draw Direct 3D OpenGL Design Goals  SGI’s design goals for OpenGL: – – –  High-performance (hardware-accelerated) graphics API Some hardware independence Natural, terse API with... luôn thay đổi độ và chuyển đổi dũ liệu giữa các phần nhiều Nhiều caches, FIFOs, và nhiều vấn đề khác GPU Fundamentals: The Modern Graphics Pipeline Graphics State Application Vertices (3D) Vertex Vertex Processor Processor Rasterizer Xformed, Lit Vertices (2D) Fragments (pre-pixels) CPU  Programmable vertex processor! GPU  Pixel Fragment Processor Processor Final pixels (Color, Depth) Video Memory... architectures: GPUs  –  Multiple vertex & pixel pipelines Hide memory latency (with more computation) Arithmetic Intensity – – – – GPGPU demands high arithmetic intensity for peak performance Ex: solving systems of linear equations Physically-based simulation on lattices All-pairs shortest paths Data Streams & Kernels  Streams – Collection of records requiring similar computation  –  Vertex positions,... specific pixel Typically more useful than vertex processor – – – More fragment pipelines than vertex pipelines RAM read Direct output CPU-GPU Analogies  CPU programming is familiar –  GPU programming is graphics- centric Analogies can aid understanding CPU-GPU Analogies CPU Stream / Data Array = Memory Read = GPU Texture Texture Sample CPU-GPU Analogies CPU GPU Loop body / kernel / algorithm step = Fragment . High-performance (hardware- accelerated) graphics API – Some hardware independence – Natural, terse API with some built-in extensibility  OpenGL has become a standard (competing with DirectX) because:. Direct3D – may not be portable 13 Graphics Hardware  Các thành phần phần cứng của hệ đồ hoạ tương tác Chức năng nhiệm vụ  CPU: thực hiện các chương trình ứng dụng. B xử lý hiển thị (Display. đồ họa 4 Hệ thống đồ hoạ (Graphics System)  Interface between application software and graphics hardware system  Consists of input subroutines and output subroutines accepting input data

Ngày đăng: 24/10/2014, 01:37

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan