21
Computer Graphics Theory

Computer Graphics Theory_Rendering

Embed Size (px)

Citation preview

Page 1: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 1/21

Computer Graphics

Page 2: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 2/21

Departm

Shirley, P et al 2010 Chapter 4

Fundamentals of Computer G

Peters, Massachusetts, USA.

Slater, M et al 2002 Computer

Virtual Environments, Pearson

USA.

Dorsey, J et al 2008 Image SaTechniques in Digital Modeling

Appearance, Morgan Kauffma

p248.

 

References

Page 3: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 3/21

Departm

Rendering is the process

of unifying all algorythms

in a scene resulting in an

image.

The creation of the

image is ultimately about

converting an input of

objects in 3d space to a2d image space of pixels.

Rendering

Page 4: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 4/21

Departm

Rendering can be generalised

into two general categories,

each relating to how an object is

converted to pixels.(Shirley, 2010)

Object-Order Rendering.

Image-Based Rendering.

 

Rendering

Page 5: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 5/21

Departm

Raycasting is an early

example of image-based

rendering.

This involves sending out “rays”

from a viewplane grid of pixels.

When a ray intersects with an

object it returns colour values.

This is repeated from the centreof each pixel.

Image-Based Rendering

Page 6: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 6/21

Departm

 

“Object-Order rendering,

each object is consideredin turn, and for each

object all pixels that it

inuences are found and

updated”.

(Shirley 2010)

 

Object-Order Rend

Page 7: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 7/21

Departm

Object-order rendering is also

referred to as rasterisation and

scanline rendering.

Object-Order rendering is

generally less computationally

expensive than image order

rendering.

3d packages combine both object-order

and image-based rendering, using objectbased rendering whenever possible.

Object-Order rendering however is far more

complex to write and less exible than

image-order rendering.

Object-Order Rendering

Page 8: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 8/21

Departm

A ray is shot from the image

for each pixel to an object and

from the intersection point to the

light.

“The light arriving through each

pixel depends on the shape,

incident light and material of the

object visible through the pixel.”(Dorsey, 2008).

Image-Based Rendering

Page 9: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 9/21

Departm

A

view ray

sh

light ray

lig

Image-Based Rendering

Point A is lit whilst Point B is in

shadow.

In Maya having shadows off

is the same as ignoring any

intersections in the light ray

journey from the viewray

intersection to the light.

Page 10: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 10/21

Departm

Image-based renderingis not remarkably new in

concept.

Of course  the artist & 

subjects are replaced bymathematical arguments.

Image-Based Rendering

Albrec

Page 11: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 11/21

Departm

A Centre Of Projection

and a View plane of

pixels.

Correct perspective

naturally follows this

system providing

geometric rules are

followed.

Perspective: a ray shot from Centre of Projection.

Image-Based Rendering: views

Page 12: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 12/21

Departm

A Centre Of Projection

through a View plane

of pixels highlighting

distance-scale

relationship.

Centre of Projection: example of scale over distance.© kim edwards 2010

Image-Based Rendering

Page 13: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 13/21

Departm

Generation of

orthonographic and

oblique views.

A ray is shot from the

centre of each pixel in the

view plane.

 

Image-Based Rendering

Page 14: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 14/21

Departm

(Sl

A more detailed model for

a camera highlighting thepyramidal view volume

that results.

Image-Based Rendering

Page 15: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 15/21

Departm

Aliasing is a common issue

caused by the discrete

sampling of a continuous

subject.

Aliasing “artefacts” are common

across computer graphics.

Many colours may be viewed

through a pixel. Or a curved line

will be insufciently representedby the density of pixels. It is

solved through a range of

mechanisms involving multiple

samples per pixel.(Dorsey, 2008)

Aliasing.

Page 16: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 16/21

Departm

Raytracing extends

raycasting to test for

refection and refraction.

Refection casts another ray

at “mirrored” angle from COP

intersection point on the surfaces

normal.

 This ray will then continue until it

in turn hits other geometry. This

point is tested with light and so

forth.

Image-Based Rendering: raytra

normal

direction

reection

© kim edwards 2010

Page 17: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 17/21

Departm

IOR = 1 IOR = 1.53

Raytracing extends

raycasting to test for

refection and refraction.

Refraction changes the angle of

the ray before collecting a colour

value.

Indexes of Refraction are widelyavailable tables of refraction for a

variety of phennomena.

Air = 0

Glass = 1.53

Image-Based Rendering: raytra

Page 18: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 18/21

Departm

Recursive RaytracingThe addition of reection and

refraction results in high degree

of complexity.

Recursive raytracing describes

the tree of possible ray’s casted

with the addition of reection and

refraction.

Consider this example:2 reective objects

1 reective/transparent object

1 light

Testing for colour on one point of an object.

light ray

light ray ignores IOR

light ray

light ray

reection ray

re

refraction ray

opaque

specular

reection

A

A =

Page 19: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 19/21

Departm

Recursive Raytracing

Typically the number ray’s castcan be adjusted by specifying a

maximum number of relection/ 

refraction rays cast in the tree.

This is necessary to reduce the

large number of calculations

possible (consider two mirrors

facing each other).

This diagram also illustrates for refraction

that the lightray (shadow feeler) for the blue

object ignores the IOR of the intervening red

sphere in it’s calculation.

light ray

light ray ignores IOR

light ray

light ray

reection ray

re

refraction ray

opaque

specular

reection

A

A =

Page 20: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 20/21

Departm

To summarise

Rendering can be categorised

into:

Object-Order Rendering.

eg.scanline

Image-Based Rendering.eg.raytracing

Both convert a 3d scene into 2dimage space.

Both are used in conjunction in

animation software. 

 

Rendering

Kenneth A. Huff,

2001

Page 21: Computer Graphics Theory_Rendering

8/7/2019 Computer Graphics Theory_Rendering

http://slidepdf.com/reader/full/computer-graphics-theoryrendering 21/21

Departm

So far we have considered the

view and light/shadow within an

image-order system.

We have also considered

reection/refraction in isolation

with raytracing.

However the interaction oflight with surfaces and the

consequent appearance is

dened further through shading

models.

Rendering: Shading

Kenneth A. Huff,

2000