130 likes | 146 Vues
CSE 872 Advanced Computer Graphics. Charles B. Owen (Instructor) 1138 E. B., 353-6488 MW 12:30-1:50pm in Kresge Art Center 041. Introduction. Introduction to the class Structure, rules, etc. Where do we stand? What you should know coming in or get caught up on!. Course Content.
E N D
CSE 872 Advanced Computer Graphics • Charles B. Owen (Instructor) • 1138 E. B., 353-6488 • MW 12:30-1:50pm in Kresge Art Center 041
Introduction • Introduction to the class • Structure, rules, etc. • Where do we stand? • What you should know coming in or get caught up on!
Course Content • Basic and advanced modeling • Scan conversion for photorealistic rendering • Ray tracing and related methods • Radiosity and hybrid methods • Particle-based methods • Physical modeling • Water and fire • Curves, splines, NURBS
Course Content • Quaterians for computer graphics • Computational geometry • Non-photorealistic methods • Volume rendering and constructive solid geometry • Gaming and simulation • Level of detail • Augmented reality techniques
Course Content: Anything else? • Real time using hardware • Pixel shaders • Virtual reality • Animation techniques • Motion capture • Post-production
Course Structure • See the syllabus
Course Materials • Textbooks • Advanced Animation and Rendering Techniques, Alan Watt, Mark Watt. ISBN: 0-201-54412-1 • OpenGL Programming Guide, Fifth Edition, Shreiner, Woo, Neider, and Davis, Addison Wesley, ISBN 0-321-33573-2. (Optional) • WWW • http://www.cse.msu.edu/~cse872 • And on angel (angel.msu.edu)
Course Structure… • Paper review/presentation • Explorations • Project 1 • Project 2 • Project 3 • Class Participation
Where do we stand? • What do we know about: • Configuring projection matrices • Configuring modelview matrices • Culling, depth testing • Lighting • Materials • What happens when you do glVertex?
void CChildView::OnGLDraw(CDC *pDC) { glClearColor(0.0f, 0.0f, 0.0f, 0.0f) ; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Set up the camera glMatrixMode(GL_PROJECTION); glLoadIdentity(); // Determine the screen size so we can determine the aspect ratio int width, height; GetSize(width, height); // Set the camera parameters gluPerspective(25., // Vertical field of view in degrees. GLdouble(width) / GLdouble(height), // The aspect ratio. 10., // Near clipping 200.); // Far clipping // Set the camera location glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(20., 10., 50., // eye x,y,z 0., 0., 0., // center x,y,z 0., 1., 0.); // Up direction
// Enable depth test glEnable(GL_DEPTH_TEST); // Cull backfacing polygons glCullFace(GL_BACK); glEnable(GL_CULL_FACE); // Enable lighting glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); GLfloat lightpos[] = {.5, 1, 1, 0.}; // GLfloat lightpos[] = {10., 10., 10., 1.}; glLightfv(GL_LIGHT0, GL_POSITION, lightpos);
glPushMatrix(); GLfloat white[] = {0.8f, 0.8f, 0.8f, 1.0f}; GLfloat cyan[] = {0.f, .8f, .8f, 1.f}; glMaterialfv(GL_FRONT, GL_DIFFUSE, cyan); glMaterialfv(GL_FRONT, GL_SPECULAR, white); GLfloat shininess[] = {100}; glMaterialfv(GL_FRONT, GL_SHININESS, shininess); glRotated(m_spinangle, 1, .5, .7); Box(5, 5, 5); glPopMatrix(); glFlush();
void CChildView::Box(GLdouble p_x, GLdouble p_y, GLdouble p_z) { GLdouble a[] = {0., 0., p_z}; GLdouble e[] = {0., 0., 0.}; GLdouble b[] = {p_x, 0., p_z}; GLdouble f[] = {p_x, 0., 0.}; GLdouble c[] = {p_x, p_y, p_z}; GLdouble g[] = {p_x, p_y, 0.}; GLdouble d[] = {0., p_y, p_z}; GLdouble h[] = {0., p_y, 0.}; // Front glBegin(GL_QUADS); glNormal3d(0, 0, 1); glVertex3dv(a); glVertex3dv(b); glVertex3dv(c); glVertex3dv(d); glEnd(); // Right glBegin(GL_QUADS); glNormal3d(1, 0, 0); glVertex3dv(c); glVertex3dv(b); glVertex3dv(f); glVertex3dv(g); glEnd();