computer graphics using direct 3d introduction. 2 what are we doing here? simply, learning how to...
TRANSCRIPT
Computer Graphics Computer Graphics Using Direct 3DUsing Direct 3D
IntroductionIntroduction
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
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]
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
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.
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.
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.
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.
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.
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.
12
Rules (Cont.)
Unlike the labs, attending the sessions is NOT required.
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]
14
Background (Cont.)
Object CoordinatesMaterial Description Camera Coordinates Lights...
Rendering
Image
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.
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
17
Background (Cont.)
• In our study of Direct3D we are concerned with rasterization technique which is used by current graphics cards.
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.
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
20
Any Questions ??