interactive computer graphics cs 418 – spring 2015 ta: zhicheng yan, sushma s kini, mary...
TRANSCRIPT
![Page 1: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/1.jpg)
Interactive Computer Graphics
CS 418 – Spring 2015
![Page 2: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/2.jpg)
Agenda for today
Communication Channels & Resources
Set up Programming Environment! We will be showing some code
snippets in class so bring your laptop if you want to follow along
![Page 3: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/3.jpg)
Piazza
Post questions that might be beneficial to everyone
www.piazza.com
Don’t wait until the night before the MP/HW is due Send your questions and ask for help soon!
![Page 4: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/4.jpg)
TA Info
TAs: Zhicheng Yan. Office Hour: Fri 4-5pm SC
3238A Email: zyan3 at illinois.edu
Mary Pietrowicz. Ofc. Hour: Wed 2:30-3:30 SC 0207 Email: [email protected]
Sushma Kini. Office Hour: Thurs 3-4pm SC 0207 Email: [email protected]
![Page 5: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/5.jpg)
Resources
• Google, StackOverflow, Lighthouse 3D……• Tutorials– http://nehe.gamedev.net/– http://www.lighthouse3d.com/opengl/– http://www.xmission.com/~nate/opengl.html
• Books– OpenGL Programming Guide (OpenGL Red Book)
• Libraries:– DevIL (OpenIL): http://openil.sourceforge.net/– CXImage:
http://www.codeproject.com/KB/graphics/cximage.aspx
![Page 6: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/6.jpg)
Student Graphics @ Illinois
UIUC Student Chapter of ACM SIGGRAPH http://www.acm.uiuc.edu/siggraph/ Short Films, Video Games, Graphics
Research
GameBuilders http://www.acm.uiuc.edu/gamebuilders/ Video Games
![Page 7: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/7.jpg)
Compile on Windows
Microsoft Visual Studio (2008 and later)
OpenGL (already provided) GLUT:
http://www.opengl.org/resources/libraries/glut/ http://user.xmission.com/~nate/glut.html
Put files in the default search path OR Link through the project settings
Use the HelloWorld project on discussion page
![Page 8: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/8.jpg)
Troubleshooting
• Check if you use the default stdfax.h precompiled header option in your project, and forget to include "stdafx.h“ or “stdlib.h” in your code.
• Check if the compiler is complaining about linking error. Try to add glut32.lib, glu32.lib, and opengl32.lib in your link dependency.
![Page 9: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/9.jpg)
Compile on Linux
Get the developer packages OpenGL▪ Nvidia or Mesa version etc.
Glut▪ freeGlut
Ensure that install directories are in your compiler path
Compile with the appropriate flags (–lglut)
http://www.videotutorialsrock.com/opengl_tutorial/get_opengl_setup_linux/video.php
![Page 10: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/10.jpg)
Compile on OSX
Use Xcode… http://lnx.cx/docs/opengl-in-xcode/
![Page 11: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/11.jpg)
Q&A
![Page 12: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/12.jpg)
Tips for success
• Start Early• Compile/Debug often• Use a debugger
(http://www.gremedy.com/)• Ask questions early• Use libgfx by Michael Garland:
http://mgarland.org/software/libgfx.html• Start Early• Start Early
![Page 13: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/13.jpg)
OpenGL Function Format
![Page 14: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/14.jpg)
Drawing Polygons (Class example)
glBegin(GL_TRIANGLE_STRIP);glVertex3f(0,0,0);glVertex3f(.5,1,0);glVertex3f(1,0,0);glVertex3f(1.5,.8,0);glVertex3f(2,0,0);glVertex3f(3,1,0);
glEnd();
v1
v2
v3
v4
v5
v6
![Page 15: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/15.jpg)
Meshes
![Page 16: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/16.jpg)
Mesh Types
Explicit mesh description List of polygonal faces (w/ duplicates) “Polygon soup”
Indexed Mesh Description List of vertices List of polygons Space efficient
![Page 17: Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali](https://reader033.vdocuments.us/reader033/viewer/2022051215/56649eac5503460f94bb2398/html5/thumbnails/17.jpg)
Mesh Formats
Obj (we use in this class) Contains definitions of 1 or more named
3D objects ASCII No compression
MTLA Simple Obj Viewer Can be used to
check how the given mesh looks like: MeshLab