HW for Computer Graphics

Slides:



Advertisements
Similar presentations
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Building Models modified by Ray Wisman Ed Angel Professor of Computer Science,
Advertisements

1 Building Models. 2 Objectives Introduce simple data structures for building polygonal models ­Vertex lists ­Edge lists OpenGL vertex arrays.
GLSL Basics Discussion Lecture for CS 418 Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
 The success of GL lead to OpenGL (1992), a platform-independent API that was  Easy to use  Close enough to the hardware to get excellent performance.
As well as colors, normals, and other vertex data PUSHIN’ GEO TO THE GPU JEFF CHASTINE 1.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
GLSL I May 28, 2007 (Adapted from Ed Angel’s lecture slides)
Open Graphics Library (OpenGL)
GEOMETRY SHADER. Breakdown  Basics  Review – graphics pipeline and shaders  What can the geometry shader do?  Working with the geometry shader  GLSL.
2D graphics 3D graphics Segoe UI Fonts, text analysis, layout Image & video decoding GPGPU Too.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics Ed Angel Professor Emeritus of Computer.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 CS4610/7610: Introduction to Computer Graphics.
1 Graphics CSCI 343, Fall 2015 Lecture 4 More on WebGL.
Lecture by: Martin Deschamps CSE 4431
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
Representation. Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames for.
OPENGL INTRODUCTION 林宏祥 2014/10/06. 此投影片已被稍微簡化過,跟今日課堂上的內容不太一樣。 如果想要看更詳細說明的人,請參考每頁投影片下面的『備忘稿』
OpenGL Shader Language Vertex and Fragment Shading Programs.
1 Welcome Alireza Moghaddam Humber College Lecture 1 Game 540 Alireza Moghaddam
Shading in OpenGL Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E.
CSE 381 – Advanced Game Programming GLSL. Rendering Revisited.
OpenGL 3.3 Unleashed! Faculty of Mathematics and Physics Charles University in Prague 24 th Februrary 2015 / 3 rd March 2015 Workshop 1 – OpenGL 3.3 Tutorial.
Geometric Objects and Transformations. Graphics Pipeline How can we render a triangle? High-level description: – Represent the 3D geometry – Transform.
Week 3 Lecture 4: Part 2: GLSL I Based on Interactive Computer Graphics (Angel) - Chapter 9.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 2 nd November 2015 Workshop 3 – Path-finding Workshop 3 – Path-finding.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 19 th October 2015 Workshop 2 – Path-finding.
Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Computer Graphics I, Fall 2010 Building Models.
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive.
MP3.. Start at the very beginning. Almost. Either start from nothing yourself, or use the empty template for this MP. Run through the provided files are.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
C# Made Easy! Faculty of Mathematics and Physics Charles University in Prague 4 th May 2015 Workshop 11 – Functional Testing.
CS 480/680 Computer Graphics Programming with Open GL Part 2: Complete Programs Dr. Frederick C Harris, Jr. Fall 2011.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Introduction to Computer Graphics Dr Usman Saeed Assistant Professor Faculty of Computing.
Introduction to Computer Graphics
Pushin’ Geo to the GPU As well as colors, normals, and other vertex data Made by Jeff Chastine, Modified by Chao Mei Jeff Chastine.
Shaders, part 2 alexandri zavodny.
Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009
- Introduction - Graphics Pipeline
Photorealistic Rendering vs. Interactive 3D Graphics
Real-Time Rendering Buffers in OpenGL 3.3
We’ll be spending a few minutes talking about Quiz 2 on Sections that you’ll be taking the next class session, before you work on Practice Quiz.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
HW for Computer Graphics
Day 05 Shader Basics.
Chapter VI OpenGL ES and Shader
HW for Computer Graphics
Introduction to Computer Graphics
HW for Computer Graphics
HW for Computer Graphics
Programming with OpenGL Part 2: Complete Programs
Programming with OpenGL Part 3: Shaders
Programming with OpenGL Part 2: Complete Programs
Mickaël Sereno Shaders Mickaël Sereno 25/04/2019 Mickaël Sereno -
03 | Creating, Texturing and Moving Objects
CS 480/680 Computer Graphics GLSL Overview.
Computer Graphics (under.) Sep., 2017
Computer Graphics Shading in OpenGL
Recapitulation of Lecture 13
Home work 2 Jie.
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
Presentation transcript:

HW for Computer Graphics Faculty of Mathematics and Physics Charles University in Prague 7th April 2015 / 14th April 2015 OpenGL 3.3 Unleashed! HW for Computer Graphics Workshop 4 – OpenGL 3.3 Tutorial – Part 4

Workshop 3 Outline Workshop Terms Resources (permanent slide) Assignments

Workshop Terms Score-based Grading Workshop Number Tuesdays [C.ODD] Topic Assignment Scoring Bonus deadline In-time bonus   1 24.2.2015 OpenGL 3.3 Tutorial 1 Sierpinsky Triangle 4 9.3.2015 23:59 2 Animated S. Triangle 5 Cube Madness 6 10.3.2015 OpenGL 3.3 Tutorial 2 Camera Rotation 23.3.2015 23:59 Standard Shading Light Adjustments Model Animation 3 24.3.2015 OpenGL 3.3 Tutorial 3 Textured Cube 6.3.2015 23:59 VBO Indexing 10 7.4.2015 OpenGL 3.3 Tutorial 4 Normal Mapping 20.4.2015 23:59 Render To Texture 21.4.2015 5.5.2015 7 19.5.2015 SUM 65 22 Total workshops Max Practice Score 87 Check the full version HERE!

Resources Permanent Slide Lectures web http://cgg.mff.cuni.cz/~pepca/lectures/npgr019.current.cz.php Workshops web http://pogamut.cuni.cz/pogamut-devel/doku.php?id=hardware_for_computer_graphics_2014-15_summer_term OpenGL 3.3 Tutorials http://www.opengl-tutorial.org/ OpenGL 3.3 Reference https://www.opengl.org/sdk/docs/man3/ GLSL 3.3 Specification https://www.opengl.org/registry/doc/GLSLangSpec.3.30.6.pdf OpenGL Superbible Book http://www.openglsuperbible.com/ http://www.openglsuperbible.com/previous-editions/

Assignment 04.1 Normal Mapping Follow the tutorial 13 http://www.opengl-tutorial.org/ Alternatively http://ogldev.atspace.co.uk/www/tutorial26/tutorial26.html Use Tutorial 13 code as your base and: Check VertexShader and the computation of TBN matrix … Every VS is computing one. Provide TBN matrix computation in C++ instead of computing it inside VS What is the difference for the performance? 5 (+2) points

Assignment 04.1 Matrix Buffer (for mat4) You will need to create and fill matrix buffer http://www.informit.com/articles/article.aspx?p=2033340&seqNum=5 VS: // model_matrix will be used as a per-instance transformation matrix. // Note that a mat4 consumes 4 consecutive locations // so this will actually sit in locations, 3, 4, 5, and 6. layout (location = 3) in mat4 model_matrix; C++: // Likewise, we can do the same with the model matrix. // Note that a matrix input to the vertex shader consumes N consecutive input // locations, where N is the number of columns in the matrix. So... // we have four vertex attributes to set up. glBindBuffer(GL_ARRAY_BUFFER, model_matrix_buffer); // Loop over each column of the matrix... for (int i = 0; i < 4; i++) { // Set up the vertex attribute glVertexAttribPointer( matrix_loc + i, // Location 4, GL_FLOAT, GL_FALSE, // vec4 sizeof(mat4), // Stride (void *)(sizeof(vec4) * i) ); // Start offset // Enable it glEnableVertexAttribArray(matrix_loc + i); }

Assignment 04.2 Render To Texture Follow the tutorial 14 http://www.opengl-tutorial.org/ Use Tutorial 14 code as your base and: Switch camera to “rotation” mode Render the Suzanne from two viewpoints (use two textures for that) Create own custom GFX FS (e.g. Wavy picture) Output Suzanne 4x to the window (2 viewpoints x 2 GFXs) 10 (+2) points

Assignment 04.x Send me an email! Email: gemrot@gamedev.cuni.cz Subject: HWGR – 2015 – Assignment 04.1 / 04.2 Content: Assignment code (zipped tutorial project folder) Screenshot(s) If you have trouble sending zip with “executable”, just rename x.zip into x.zi_ ;-) to fool the almighty Google Award: Up to 15 (+ 4) points Use correct email subject or face -2 penalty per mail!

Questions? I sense a soul in search of answers… Sadly, I’m far from OpenGL-experienced-guy But I will try to help you with any serious problem you might encounter during the workshops so don’t hesitate to contact me! Jakub Gemrot gemrot@gamedev.cuni.cz