Sei sulla pagina 1di 6

3/19/2019

Computer Graphics Challenges


• Suppose we can create a precise computer
representation of the 3D world
Rendering Pipeline • Questions:
– How can we generate realistic 2D?
– What are the best way to model 3D world?
Erickson Nascimento
– How to render such model?
erickson@dcc.ufmg.br
www.dcc.ufmg.br/~erickson

1 2

Rendering Rendering
• Synthesizing an image given Light

– objects
– virtual cameras
– light sources Objects
• Techniques
– rasterization Image
Virtual
– ray casting Camera

3 4

1
3/19/2019

I/O in the rendering pipeline I/O in the rendering pipeline

• Input:
– Geometric model (normal, color, texture
coordinates, pose)
– Lighting model (direction, position, intensity)
– Virtual Camera (focal length, pose, etc.)
– Raster viewport (pixel size, etc.)
• Output:
– Colors/intesities (image)

5 6

Object representation

• 3D objects can be represented • List of vertices and attributes


by primitives like – X, Y, Z (3D coordinates)
– vertices (i.e., points) – R, G, B (color)
– lines – u, v (texture coordinates)
Object – polygons (e.g., triangles) • Geometric information
representation • Primitives are processed to – Positions, normals, curvature
generate a 2D image
• List of triangles
– How are the triangles connected (Topological
information) ?

7 8

2
3/19/2019

Manifold Why do we use triangles?


• Manifold • Minimal planar primitives
– Every edge has exactly two incident triangles • Piecewise linear representation
• Manifold with boundaries • Easy to implement in hardware
– Every edge has one or two incident triangles • Easy to interpolate attributes
– Convex Linear Interpolation

9 10

Rendering Pipeline
Big picture
• Input
– Soup of 3D triangles
– Camera and illumination configuration
Modeling Illumination
Viewing
Transformation Clipping
• Output
Transformations (Shading)
(Perspective) – 2D image
• Each triangle is sent through it in the pipeline
Projection to
Rasterization Visibility
Screen Space

11 12

3
3/19/2019

Modeling
Transformations Modeling Transformations
• Object space: 3D models defined in
their own coordinate system object
space • World space: transforms orient
– Designing objects and not the models within a common
worrying about scene coordinate frame
– Library of objects

13 14

Illumination (Shading)
• Vertices shaded according to material Viewing Transformation
properties, surface properties (normal) and
light sources • Project world space to eye space
• Local lighting model • Projection models
– Diffuse – Perspective
– Ambient – Orthographic
– Phong

15 16

4
3/19/2019

Clipping Clipping
• Portions of the object outside the view • Eliminate portions of
objects outside the
volume (view frustum) are removed viewing frustum
• Avoid degeneracies
– Don’t draw stuff behind
the eye
– Avoid division by 0 and
overflow
• Efficiency
– Do not waste time on
objects outside the image
boundary

17 18

Projection to Screen Space Projection to Screen Space


• The objects are projected to the 2D image
place

19 20

5
3/19/2019

From object space to screen space Rasterization


• Scan Conversion
– Interpolate values (color, depth, etc.) and draw
the objects
– Our primitives are continuous, but the screen is
discrete

21 22

Rendering Pipeline

23

Potrebbero piacerti anche