Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks...

30
Image Synthesis Rabie A. Ramadan, PhD 4

Transcript of Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks...

Page 1: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

Image Synthesis

Rabie A. Ramadan, PhD

4

Page 2: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

2

Review Questions

Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

Modeling Rendering

Page 3: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

3

Q2: What is modeling?

The description of an object that is going to be used by the graphics system. E.g mathematical model.

Page 4: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

4

Q2: Models must be created for every object in a scene (True/False) ?

True

Page 5: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

5

Q3: OPenGL provides explicit support for creating object models (True/False)

false

Page 6: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

6

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

Page 7: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

7

One of the Modeling task is to provide accurate rendering of a model’s appearance or surface shading

(true/false) ?

true

Page 8: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

8

Why do we need the Tessellation process?

To simplify the image synthesis operation.

Page 9: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

9

What is the most common Tessellation geometric ?

Tringle

Page 10: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

10

What a “normal” in image synthesis ?

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.

Page 11: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

11

Selecting the vectors depends on the type of polygon (true/false) ?

true

Page 12: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

12

Name the following stripping?

Triangle strip winding

Page 13: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

13

Name the following stripping?

Triangle fan winding

Page 14: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

14

The triangle fans are primitive (true/false)

False

The triangle strip is the more versatile primitive.

The triangle fans are ideal for large convex polygons

Page 15: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

15

What is the main goal of a triangle stripping?

The goal here is to minimize the number of total strips and try to avoid “orphan” triangles (also known as singleton strips)

Page 16: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

16

Name the following algorithm ?

• 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

Greedy Tri-stripping

Page 17: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

17

Complete

OpenGL represents vertex coordinates, texture coordinates, normal vectors, and colors generically as ………………..

Tuples can be thought of as ………-component vectors.

Tuples4

Page 18: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

18

Describe how the data is represented in OpenGL ?

OpenGL represents transforms as 4 × 4 matrices, plane equations as 4-component tuples,

Page 19: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

19

The following is the transformation pipeline , describe each block?

Page 20: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

20

Suggest another Anatomy of a rendering pipeline?

World space

Viewing space

3D screen space

2D display space

Local space

Page 21: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

21

What are the main functions of CPU and GPU?

Two players:

• The CPU, your processor and friend

• The GPU (Graphical Processing Unit) or equivalent software

The CPU passes streams of vertices and of data to the GPU.

• The GPU processes the vertices according to the state that has been set; here, that state is “every four vertices is one quadrilateral polygon”.

• The GPU takes in streams of vertices, colors, texture coordinates and other data; constructs polygons and other primitives; then draws the primitives to the screen pixel-by-pixel.

• This process is called the rendering pipeline.

Page 22: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

22

matrix multiplication is associative but not commutative. Explain?

Remember: matrix multiplication is associative but not commutative.• ABC = A(BC) = (AB)C ≠ ACB ≠ BCA

Page 23: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

23

OpenGL uses matrix stacks to store stacks of matrices. Explain?

OpenGL uses matrix stacks to store stacks of matrices, where the topmost matrix is (usually) the product of all matrices below.• This allows you to build a local frame of reference—

local space—and apply transforms within that space.

Page 24: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

24

GL has three matrix stacks:which are ……., ……,……

GL has three matrix stacks:• Modelview – positioning things relative to other things• Projection – camera transforms• Texture – texture-mapping transformations

Page 25: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

25

Define the function of glPushMatrix() and glPopMatrix()in OpenGL?

If you want to make local changes that only have limited effect, you use glPushMatrix() to push a new copy of your current matrix onto the top of the stack; then you modify it freely and, when done, call glPopMatrix().

Page 26: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

26

What is the expected output of this code ?

glBegin(GL.GL_QUADS); glVertex3f(-1, -1, 0);

glVertex3f( 1, -1, 0);glVertex3f( 1, 1, 0);glVertex3f(-1, 1, 0);

glEnd();

Page 27: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

27

How does OpenGL use these 3D coordinates?

When OpenGL wants to draw a triangle, it converts the three vertices into pixel coordinates and draws a "2D" triangle using those coordinates.

The user's "eye" is always at the origin and looking in the negative z direction.

Page 28: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

28

What is the expected function of this code?

Page 29: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

29

The number of samples per unit length in each direction defines the………..

The process of converting a continuous function into a series of discrete values is called …….

Reconstructing an undersampled sine wave results in a different sine wave of a lower frequency. This low-frequency version is called an ………

Sampling sample rate

Alias

Page 30: Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?

30

What is your analysis to the following figure ?

considering an intensity function that has the similar values at two sample points P1 and P3, but between these points P2 the intensity varies significantly

The result is that the reconstructed function doesn’t reproduce the original function very well (Under sampling )