Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Synthesis Rabie A. Ramadan, PhD 1. 2 About my self Rabie A. Ramadan My website and publications

Similar presentations


Presentation on theme: "Image Synthesis Rabie A. Ramadan, PhD 1. 2 About my self Rabie A. Ramadan My website and publications"— Presentation transcript:

1 Image Synthesis Rabie A. Ramadan, PhD 1

2 2 About my self Rabie A. Ramadan My website and publications http://www.rabieramadan.org

3 3 Class Rules I am not here to punish you Trust yourself and do your best I want you to learn and compete with others working on the same field I want you to be confident when you speak with others

4 Class Rules You can bring anything to drink but NO FOOD PLEASE When you come in, DO NOT knock on the door When you want to leave, do not tell me  Just leave but you will be counted as absent I do not take attendance every class but sometimes I do

5 5 Class Rules Attendance is a vey important Assignments must be delivered on time All assignments are individual assignments unless it is clearly stated that you can work on groups. Assignments or part of them that are copied (including the programming assignments) will not be counted towards your grades.

6 6 Class Information Textbook

7 7 Class Information Website http://www.rabieramadan.org/classes/2011/image/

8 OpenGl and Image Synthesis Two principal tasks are required to create an image of a three-dimensional scene: Modeling Rendering.

9 OpenGl and Image Synthesis Modeling : The description of an object that is going to be used by the graphics system. E.g mathematical model. Models must be created for every object in a scene; Accurately capture the geometric shape and appearance of the object.

10 OpenGl and Image Synthesis Rendering: Takes models as input and generates pixel values for the final image. OpenGL: Principally concerned with object rendering; it does not provide explicit support for creating object models

11 What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image primitives Window system independent Operating system independent

12 OpenGL Basics Rendering Typically execution of OpenGL commands Converting geometric/mathematical object descriptions into frame buffer values OpenGL can render: Geometric primitives Lines, points, polygons, etc… Bitmaps and Images Images and geometry linked through texture mapping Graphics Pipeline

13 Polygonal Representation A simple object, such as a box, can be represented using a polygon for each face in the object. Modeling task consists of : Determining the 3D coordinates of each vertex in each polygon that makes up a model. To provide accurate rendering of a model’s appearance or surface shading, the modeler may also have to determine color values, and texture coordinates for the model’s vertices and faces.

14 Decomposition and Tessellation Tessellation The process of decomposing a complex surface. A sphere  simpler primitives such as triangles. OpenGL does not specify a decomposition algorithm

15 Tessellation latitude-longitude tessellation for a sphere Octahedron easily splits into four triangles

16 Shading Normals Normals are perpendicular the surface, You can find the normal at a particular point on a surface by First Finding the flat plane that just touches the surface at that point. The normal is the vector that’s perpendicular to that plane.

17 Shading Normals

18 Smooth Shading Example for more than one polygon

19 Shading Normals Selecting the vectors depends on the type of polygon.

20 Triangle Stripping To speedup OpenGL and save space, polygons are divided into triangles strips. Decide whether the first triangle should have a clockwise or counterclockwise winding Triangle strip winding.

21 Triangle Stripping Triangle fan winding

22 Triangle Stripping OpenGL does not have a way to specify generalized triangle strips. The user must choose between GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN The triangle strip is the more versatile primitive. The triangle fans are ideal for large convex polygons

23 Triangle Stripping For regular meshes, triangle strips should be lined up side by side. The goal here is to minimize the number of total strips and try to avoid “orphan” triangles (also known as singleton strips)

24 Greedy Tri-stripping A simple method of converting a model into triangle strips. For OpenGL, A better algorithm is to choose a polygon, convert it to triangles, then move to the polygon which has an edge that is shared with the last edge of the previous polygon. A given starting polygon and starting edge determines the strip path. The strip grows until it runs off the edge of the model or reaches a polygon that is already part of another strip

25 Example “Greedy” triangle strip generation.

26 C# Code How to install OpenGL http://www.videotutorialsrock.com/opengl_ tutorial/get_opengl_setup_windows/video.p hp http://www.videotutorialsrock.com/opengl_ tutorial/get_opengl_setup_windows/video.p hp


Download ppt "Image Synthesis Rabie A. Ramadan, PhD 1. 2 About my self Rabie A. Ramadan My website and publications"

Similar presentations


Ads by Google