What are Computer Graphics Basically anything that is on you Monitor – This includes the text that you will see Text isn’t Advanced Graphics But…. Understanding the way text is rendered is part of understanding the graphics system
What are Advanced Graphics used for? Design Simulation Animation User Interfaces Aero anyone? GAMES Movies
The Basic Graphic System Input Device Processor Memory Output Device
Completing the Basic Graphic System Frame Buffer GPU Multiple Inputs
Rasterisation Pretty Picture goes here
The 3D Space Although Graphics exist in 2D we will focus on 3D – 2D uses many of the same concepts, just with a lot less complexities (in some areas) For a 3D scene we need: – An Object – A Viewpoint
Okay, so realistically you need some lighting too! This is where much of the complexities of 3D rendering emerge Light
Troublesome Light Radiosity Ray Casting Ray Tracing Monte Carlo Ray Tracing Photon Mapping Caustics
More Detail on Rendering a View Camera Location View Direction Orientation Field of View (FoV) Aspect Ratio Clipping Box / Plane
How the Hardware Does the Rendering Transformations Projections Clipping Into a Frame Buffer Pixel Operations are then applied
Programming basics Coordinate Systems World Coordinates – Vertex Points Screen Coordinates – X,Y Pixels (Sometimes Z as well!)
OpenGL Primitives So our World is built out of Polygons – Types of supported Polygons Points Lines Polygons Curves Surfaces
What should your Polygon be? Simple Convex Flat Y?
OpenGL Objects glBegin(…..) glEnd(); GL_POINTS// Points GL_LINES// segments GL_LINE_STRIP// PolyLines GL_LINE_LOOP // PolyLines
OpenGL Objects Continued GL_POLYGON GL_QUADS GL_QUAD_STRIP GL_TRIANGLES GL_TRIANGLE_STRIP GL_TRIANGLE_FAN
Triangles are your Friend Any user defined objects will need Convextivity testing. – Depending on the test results you may need to tessellate their objects
A Quick Example of their uses
Lab Class outline Creating DirectX / OpenGL Projects Rendering a few simple polygons
OpenGL Programming The Basics You need – A Basic Windows Program Framework – A Window Handle – Hardware Device Context – Hardware Render Context – Rendering Code
Things to come Lecture 3: – User Input basics