computer graphics using direct 3d introduction. 2 what are we doing here? simply, learning how to...

20
Computer Graphics Computer Graphics Using Direct 3D Using Direct 3D Introduction Introduction

Upload: edgar-pope

Post on 02-Jan-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

Computer Graphics Computer Graphics Using Direct 3DUsing Direct 3D

IntroductionIntroduction

Page 2: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

2

What are we doing here?

Simply, learning how to make the computer draw

Page 3: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

3

What are we doing here?

• Three levels– From scratch (Basic algorithms,

math, ... etc)– Using graphics hardware via some API

(Direct3D, OpenGL)– Using a higher-level graphics engine

Page 4: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

4

What are we doing here?

• Three levels– From scratch (Basic algorithms,

math, ... etc) [Lectures]– Using graphics hardware via some

API (Direct3D, OpenGL) [Sessions and Labs]

– Using a higher-level graphics engine [1 session]

Page 5: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

5

Notes on the course

• We will use Direct3D as our graphics API (Why ?)

• Our reference for Direct3D is: “Introduction to 3D Game Programming with DirectX 9.0” by Frank D. Luna

Page 6: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

6

Notes on the course (cont.)

• This course is just a small “kick start” i.e. don't expect you'll be able to make “Crysis” by the end of the semester.

Page 7: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

7

Notes on the course (cont.)

• The course is ONLY concerned with graphics programming.

• Usage of existing graphical content authoring programs (e.g. 3D Studio Max) is not of our concern.

Page 8: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

Objectives• By the end of the course you

should be able to– Use Direct3D basic features.– Read & understand graphics articles

that describe effects using Direct3D or OpenGL.

– Develop your own effects that use Direct3D or OpenGL features.

Page 9: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

9

Project

You will be required to work in groups to develop a 3D game using Direct3D. Delivery date and details of the project will be announced later.

Page 10: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

10

Rules

NEVER copy or use your friend’s code or you will face a crisis (not the game).

The assignments are individual based unless otherwise mentioned.

Page 11: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

11

Rules (Cont.)

Section and lab assignments are bonus unless otherwise mentioned.

Office hours will be announced later. Stick to the announced hours and avoid the “Did Eng. XYZ come today ?” habit. It does annoy TAs.

Page 12: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

12

Rules (Cont.)

Unlike the labs, attending the sessions is NOT required.

Page 13: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

13

Background

• Rendering is the process of generating an image from a model, by means of computer programs. The model is a description of three dimensional objects in a strictly defined language or data structure [Wikipedia]

Page 14: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

14

Background (Cont.)

Object CoordinatesMaterial Description Camera Coordinates Lights...

Rendering

Image

Page 15: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

15

Background (Cont.)

• A number of different rendering techniques exist.

• In ray casting, for example, we color each pixel by tracing a ray from the camera through that pixel and determining the surface it hits.

Page 16: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

16

Background (Cont.)

An image rendered using ray tracing, a more sophisticated technique than

ray casting that produces photorealistic images.(Image from wikipedia) Illustration of ray casting

Page 17: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

17

Background (Cont.)

• In our study of Direct3D we are concerned with rasterization technique which is used by current graphics cards.

Page 18: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

18

Background (Cont.)

• We will study the stages of Direct3D rendering process and how to use Direct3D to render scenes involving complex objects, textures, and lights.

Page 19: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

Syllabus• Lab 1: Introduction to Win32 Programming

• Session 2 : Basics

• Session 3 : Getting D3D to Work

• Lab 2: D3D Initialization

• Session 4 : Drawing and Colors

• Lab 3: Drawing, Colors and Meshes

• Lab 4: Lights, Textures and Meshes II

• Session 5 : Misc. Tricks

• Session 6 : Stenciling

• Session 7 : Shaders

• Session 8 : Graphics Engines

Page 20: Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw

20

Any Questions ??