Overview and applications Yasir O. Sinada Olivier Steiger.

14
Overview and applications Yasir O. Sinada Olivier Steiger

Transcript of Overview and applications Yasir O. Sinada Olivier Steiger.

Page 1: Overview and applications Yasir O. Sinada Olivier Steiger.

Overview and applications

Yasir O. SinadaOlivier Steiger

Page 2: Overview and applications Yasir O. Sinada Olivier Steiger.

Historical background and characteristics

• OpenGL (“Graphics Library”) was introduced in 1992 by Silicon Graphics• Based on older IRIS GL• Specifications governed by the OpenGL Architecture review board (Compaq, Evans & Sutherland, Hewlett-Packard, IBM, Intel, Intergraph, Microsoft, and Silicon Graphics)

• Current version: 1.2

Characteristics:• Platform independent: can run on consumer electronics, PC’s, workstations, etc.• Backward compatibility required in new versions• Supported by many hardware accelerators => fast

Page 3: Overview and applications Yasir O. Sinada Olivier Steiger.

Architecture and terminology

• Model: whatever we want to render; a model is made up of primitives• Polygon: closed, flat surface bounded by at least 3 line segments. Basic building block in OpenGL• Vertex: corner of a polygon. Polygons are defined by their vertices (coordinates: x, y, z, w)• Matrix transformations: allows to scale, rotate and translate vertices

• Modelview matrix: turns the raw model coordinates into coordinates as viewed from viewpoint• Projection matrix: clips out vertices that are out of the specified viewing volume

• Perspective division: generates the normalized device coordinates using w. Usually, w=1• Viewport transformation: 3D coordinates are turned into 2D framebuffer coordinates (=rasterization)• Rendering: turns the model into a shaded, textured and illuminated scene

Fig.: Processing pipeline

Model-View Matrix

Object Eyecoordinates

Projection Matrix

Clipcoordinates

PerspectiveDivision

NormalizedDevice

coordinatesViewport

TransformationWindowcoordinates

Page 4: Overview and applications Yasir O. Sinada Olivier Steiger.

The ten OpenGL primitive types

All objects have to be made up out of these ten primitives!

Page 5: Overview and applications Yasir O. Sinada Olivier Steiger.

Programming syntax: an example

Source code

Page 6: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: medical sciences

• Virtual endoscopy: internal examination of human body without surgery => painless teaching of endoscopy

• Augmented reality: combine real image with overlaid graphics=> guiding of knife or needle during brain surgery=> overlay of ultrasonic 3D scan and patient

• Surgical simulation: => data glove and head-mounted display allow training of difficult processes without risk

• Finite element simulation of heart defibrillation:=> allows to optimize the size and locations of the needed electrodes as wellas magnitude of defibrillation shocks

Real world

Projector

Page 7: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: medical sciences (II)

Advantages:• Avoids unnecessary interventions• No need for patients (rare diseases)• Assistance for difficult procedures

Problems:• Applications need to run in real time (10-15 frames/sec), BUT:

the model for simulation of heart defibrillation is composed of more than 1.5 million tetrahedral elements with 250000 degrees of freedom => 4 billion floating-point ops for solution

• Resolution needed for diagnostics: 2000x2000 pixels => data sets have sizes about 13.4 GByte

Page 8: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: geology / mining

The use of 3-dimensional models allows• Intuitive visualization of big data sets (measures)• Impact simulation before construction

Page 9: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: industrial design

• Visualization of not yet realized prototypes, which can be located in their future context=> potential clients get a better opinion of the product, can give feedback

• Behavior visualization: thermal graphs of airplanes, pressure distribution in mechanical structures, …=> weak points are easily located and optimizations can be tested on virtual model

Page 10: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: special effects

• Used in motion pictures, advertisement, video games and TV industry.• Today, this is the biggest application field for 3D graphics!• Distinguish between “realistic” 3D (Jurassic park) and “Virtual-3D” (A bug’s life)

Page 11: Overview and applications Yasir O. Sinada Olivier Steiger.

Application: special effects (II)

The high resolution and frame rate (especially for movies) requires powerful equipment=> High cost for FX

Compositing is also more used than in other fields=> many difficulties due to synchronization, color correction, realistic texturing, …

Page 12: Overview and applications Yasir O. Sinada Olivier Steiger.

OpenGL future

Language improvements:• often used extensions (fog coordinates, shared texture color palette, point parameters, …) will get included into core OpenGL• sequences of small functions get grouped into more powerful extensions

Hardware evolution:• as hardware gets cheaper, many software functions will be included into hardware

=> speed improvement• standard video boards support OpenGL (motivated primarily by the game industry…)

New application:• data compression (MPEG-4)• “Virtual reality” (3D navigation)

Page 13: Overview and applications Yasir O. Sinada Olivier Steiger.

More information?

- Ron Fosner. “OpenGL. Programming for Windows 95 and NT.” Addison-Wesley developpers press, 1998

- www.opengl.org: general OpenGL site- www.sgi.com/software/opengl: some information, a lot of advertisement

- Soferman, Blythe and John. “Advanced Graphics Behind Medical Virtual Reality: Evolution of Algorithms, Hardware and Software Interfaces.”

Proceedings of the IEEE, vol. 86, No. 3, March 1998

Page 14: Overview and applications Yasir O. Sinada Olivier Steiger.

Class questions

• Why does OperGL provide only 10 primitives?

The conception of OpenGL goes back to 1992, when machines were slow and hardware extensionsexpensive. Silicon Graphics wanted to provide a graphical language which allows the creation of any kind of objects without requiring a too big computational amount; however, the goal was not a languagefor the efficient creation of graphical objects (circles, cubes, …), which can be realized with other software, but for scenes with lights, textures and animations.In order to do so, they brought up ten fundamental shapes, or primitives, and associated them with manypowerful lightning and matrix operations. The primitives are just the “fundamental alphabet” allowingthe creation of complicated scenery with simple objects. More primitives would result in an increasedlanguage complexity, slowing down the computation in certain cases.