1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic...

25
1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View

Transcript of 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic...

Page 1: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

1of25

Assignment

OrthographicWireframeElevation

OrthographicWireframe

Plan

OrthographicWireframeEnd-Elevation

PerspectiveView

Page 2: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

2of25

Assignment (cont…)

Your application must include the following:– Four different views of a scene:

• An orthographic wireframe elevation of the scene which does not change

• An orthographic wireframe plan of the scene which does not change

• An orthographic wireframe end-elevation of the scene which does not change

• A perspective view of the scene in which the user should be able to move the camera

– A scene composed of at least the following:• 1 teapot• Ten different objects• One animating object

Page 3: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

3of25

Assignment (cont…)

– At least one light source– At least one bitmap textured surface– Controls (using whatever modality you see fit,

e.g. keyboard, mouse etc) that allow a user to:

• Turn on and off the lights in the scene• Navigate around the perspective view of the

scene• Reset the view of the scene to the initial position

– A representation in each of the orthographic views of the camera position used in the 3-D perspective view

– Correct resizing of the window

Page 4: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

4of25

Assignment (cont…)

– JAZZ! A considerable portion of the marks (20%) for this assignment will be awarded for doing something interesting in the application beyond what is given as the minimum requirements. Examples might include:

• Using models designed in 3DS max/Milkshape/Maya

• Adding interesting effects such as particle systems

• Adding clever use of lighting – for example have the light source appear to be the lamp in the scene in figure 1

• Add a sky box

Page 5: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

5of25

Assignment (cont…)

Assignment submission deadline: 8th December, 2006

Submission of the assignment will be through WebCT

Any Questions?

Page 6: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

6of25

CGames

The 9th International Conference on Computer Games: AI, Animation, Mobile, Educational & Serious Games will be held at DIT from the 22nd – 24th of November

All DIT students are allowed attend all sessions free of charge – graphics labs/lectures will be rearranged to accommodate this – more to follow

For more: www.comp.dit.ie/cgames

Page 7: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

Course Website: http://www.comp.dit.ie/bmacnamee

Computer Graphics 10:3D Object

Representations

Page 8: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

8of25

Contents

In today’s lecture we are going to start to look at how objects are modelled in 3D

– Polyhedra– Quadric surfaces– Sweep representations– Constructive solid geometry methods

Page 9: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

9of25

Polyhedra

Objects are simply a set of surface polygons that enclose an object interior

Simplest and fastest way to render objects

Often referred to as standard graphics objects

In many cases packages allow us to define objects as curved surfaces etc but actually convert these to polygon meshes for display

To define polyhedra we simply define the vertices of the polygons required

Page 10: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

10of25

Polyhedra (cont…)Im

ages

tak

en f

rom

Hea

rn &

Bak

er,

“Com

pute

r G

raph

ics

with

Ope

nGL”

(20

04)

Page 11: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

11of25

Quadric Surfaces

A frequently used class of objects are quadric surfaces

These are 3D surfaces described using quadratic equations

Quadric surfaces include:– Spheres– Ellipsoids– Tori– Paraboloids– Hyperboloids

Page 12: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

12of25

Quadric Surfaces - Spheres

A spherical surface with radius r centred on the origin is defined as the set of points (x, y, z) that satisfy the equation

This can also be done in parametric form using latitude and longitude angles

2222 rzyx

sin

sincos

coscos

rz

ry

rx

22

Page 13: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

13of25

Quadric Surfaces – Spheres (cont…)

y axis

z axis

x axis

P ( x, y, z )

θ

φ

r

Page 14: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

14of25

Sweep Representations

Sweep representations are useful for constructing 3 dimensional objects that possess translational, rotational or other symmetries

Objects are specified as a 2 dimensional shape and a sweep that moves that shape through a region of space

Page 15: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

15of25

Sweep Representations - ExamplesIm

ages

tak

en f

rom

Hea

rn &

Bak

er,

“Com

pute

r G

raph

ics

with

Ope

nGL”

(20

04)

Page 16: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

16of25

Constructive Solid Geometry Methods

Constructive Solid Geometry (CSG) performs solid modelling by generating a new object from two three dimensional objects using a set operation

Valid set operations include – Union– Intersection– Difference

Page 17: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

17of25

Constructive Solid Geometry Methods (cont…)

Imag

es t

aken

fro

m H

earn

& B

aker

, “C

ompu

ter

Gra

phic

s w

ith O

penG

L” (

2004

)

Difference

Intersection

Page 18: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

18of25

Constructive Solid Geometry Methods (cont…)

CSG usually starts with a small set of primitives such as blocks, pyramids, spheres and conesTwo objects re initially created and combined using some set operation to create a new objectThis object can then be combined with another primitive to make another new objectThis process continues until modelling complete

Page 19: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

19of25

Constructive Solid Geometry Methods (cont…)

CSG Object

oper1

obj1 obj2

oper3

obj4 oper2

obj2 obj3

CSG models are usually represented

as CSG trees

Page 20: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

20of25

Constructive Solid Geometry Methods (cont…)

Page 21: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

21of25

Ray-Casting

Ray-casting is typically used to implement CSG operators when objects are described with boundary representations

Ray casting is applied by determining the objects that are intersected by a set of parallel lines emanating from the xy plane along the z axis

The xy plane is referred to as the firing plane

Page 22: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

22of25

Ray-Casting (cont…)Im

ages

tak

en f

rom

Hea

rn &

Bak

er,

“Com

pute

r G

raph

ics

with

Ope

nGL”

(20

04)

Page 23: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

23of25

Ray-Casting (cont…)

Surface intersections along each ray are calculated and these are sorted according to distance from the firing plane

The surface limits for the composite object are then determined by the specified set operation

Page 24: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

24of25

Ray Casting ExampleIm

ages

tak

en f

rom

Hea

rn &

Bak

er,

“Com

pute

r G

raph

ics

with

Ope

nGL”

(20

04)

Page 25: 1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.

25of25

Summary

In today’s lecture we began to look at how objects are modelled in 3DPolyhedra are by far the most common modelling technique, but there are many othersOften more exotic modelling techniques are used in a modelling phase, but the resultant models are converted to polyhedra before renderingNext time we will look at more modelling techniques