CG2 2014/en: Rozdiel medzi revíziami

 
(58 medziľahlých úprav od 3 ďalších používateľov nie je zobrazených)
Riadok 1: Riadok 1:
 
[[File:cg2_2014.png]]
 
[[File:cg2_2014.png]]
= Computer Graphics 2 =
+
= Advanced Computer Graphics =
  
 
== What you Need to Pass ==
 
== What you Need to Pass ==
Riadok 25: Riadok 25:
 
** Fx = 0-59
 
** Fx = 0-59
  
* [https://docs.google.com/spreadsheet/ccc?key=0AguOJecPQwoSdGFjc2N0UllGWENnLXhjc2E0bzFYU0E&usp=sharing VIEW RESULTS]
+
* [https://docs.google.com/spreadsheets/d/1k9qGAlKjxJLHS71MDg6L_Mz4wJH4snIfPWXGo2R35Eo/edit?usp=sharing VIEW RESULTS]
* [https://moodle.uniba.sk/fmfi Final Term] by Modddle Ecetronic test (18.5.2015 8:10 in B)
+
* [https://moodle.uniba.sk/fmfi Final Term] by Mooddle Ecetronic test 160.5.2015 8:10 in M-I)
  
 
* Schedule
 
* Schedule
** Mon (8:10) - Room B (lecture)
+
** Mon (8:10) - Room M-I (lecture)
** Wed (16:30) - Room I-H3 (seminar)
+
** Mon (11:30) - Room I-H3 (seminar)
  
  
Riadok 40: Riadok 40:
  
 
----
 
----
 +
=== Lecture00 "Introduction to Computer Graphics" ===
 +
* Computer Graphics Applications
  
=== Lecture01 "Introduction to Computer Graphics" ===
+
=== Lecture01 "Graphics Pipeline" ===
 +
* What is The Graphics Pipeline
 +
* Vertex Shader
 +
* Primitive Assembly
 +
* Tessellation Shaders
 +
* Geometry Shader
 +
* Geometry Postprocessing and Rasterization
 +
* Fragment Shader
 +
* Frame Buffer Operations
 +
* http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/pipeline33/
 +
* Lecture notes: [[media:cg2_lesson00.pdf|lesson00.pdf]]
 +
* Štátnicová téma: Zobrazovací kanál. Grafická pipeline moderného hardvéru, framebuffer, buffer objekty, používané súradnicové priestory, druhy shader programov, druhy optimalizačných techník (view frustum, occlusion, backface culling), príklad shader programov.
  
 
=== Lecture02 "Ray Tracing 1." ===
 
=== Lecture02 "Ray Tracing 1." ===
Riadok 59: Riadok 72:
 
* Lecture notes: [[media:cg2_lesson02.pdf|lesson02.pdf]]
 
* Lecture notes: [[media:cg2_lesson02.pdf|lesson02.pdf]]
 
* Poznámky v Slovenčine k téme [[media:cg2_DatoveStruktury.pdf|Dátové Štruktúry]] a [[media:cg2_Kd-tree.pdf|Kd-tree]].  
 
* Poznámky v Slovenčine k téme [[media:cg2_DatoveStruktury.pdf|Dátové Štruktúry]] a [[media:cg2_Kd-tree.pdf|Kd-tree]].  
* Štátnicová téma: Kanál metódy sledovania lúča. (definícia lúča, popis metódy sledovania lúča, generovanie lúča, pochod po lúči (ray traversal), prienik lúča s trojuholníkom, stromová štruktúra lúčov (ray tree) a jej použitie na výpočet lokálnej farby, problém presnosti priesečníkov)
+
* Štátnicová téma: Kanál metódy sledovania lúča a porovnanie s Radiosity metódou. (definícia lúča, definícia tieňového lúča, popis metódy sledovania lúča, generovanie lúča, pochod po lúči (ray traversal), prienik lúča s trojuholníkom, stromová štruktúra lúčov (ray tree) a jej použitie na výpočet lokálnej farby, problém presnosti priesečníkov). Metóda sledovania lúča na GPU, urýchľovacie techniky.
  
 
=== Lecture05 "Light Trasport." ===
 
=== Lecture05 "Light Trasport." ===
Riadok 68: Riadok 81:
 
* Light transport simulation: Rendering Equation
 
* Light transport simulation: Rendering Equation
 
* Lecture notes: [[media:cg2_lesson05.pdf|lesson05.pdf]]
 
* Lecture notes: [[media:cg2_lesson05.pdf|lesson05.pdf]]
 +
* Štátnicová téma: Fyzikálny osvetlovací model a výpočet farieb renderovacou rovnicou. (definícia radiancie, definícia BRDF a jej vlastnosti, fyzikálne BRDF Cook-Tarrance, definícia priestorového uhlu, napíšte renderovaciu rovnicu a vysvetlite jej členy).
  
 
=== Lecture06 "Radiosity." ===
 
=== Lecture06 "Radiosity." ===
Riadok 84: Riadok 98:
 
* Lecture notes: [[media:cg2_lesson07.pdf|lesson07.pdf]]
 
* Lecture notes: [[media:cg2_lesson07.pdf|lesson07.pdf]]
 
* Homework:  
 
* Homework:  
** 1. Prove that the specular BRDF from slides less07 fulfills the BRDF properties: reciprocity, energy conservation, definit space, value space of BRDF
+
** 1. Prove that the specular BRDF from slides [https://dai.fmph.uniba.sk/upload/1/1d/Cg2_lesson07.pdf less07] fulfills the BRDF properties: reciprocity, energy conservation, definit space, value space of BRDF
** 2. Derive the equation for reflected direction Omega_r from shading document.
+
** 2. Derive the equation for reflected direction Omega_r from [https://dai.fmph.uniba.sk/upload/e/eb/Shading.pdf shading] document.
 +
* Physical BRDF
 +
* Ward Reflection Model
 +
* Cook-Torrance model
 +
* Lecture notes: [[media:cg2_lesson07Phys.pdf|lesson07Phys.pdf]]
 +
 
 +
=== Lecture08 "Shadows." ===
 +
* Lecture notes: [[media:cg2_lesson08.pdf|lesson08.pdf]]
 +
* Štátnicová téma: Tiene, typy tieňov (mäkké, tvrdé, statické, dynamické), typy a popis algoritmov (projekčné, tieňové objemy, tieňové mapy (shadow mapping)), spôsoby implementácie jednotlivých algoritmov, artefakty a ich odstraňovanie, príklad shader programov pre tieňové mapy. Artefakty spôsobené diskretizáciou. Tiene vo Phongovom modeli.
 +
 
 +
=== Lecture09 "Texturing 1, 2." ===
 +
* Texture parameterization
 +
* Procedural methods
 +
* Procedural textures
 +
* Fractal landscapes
 +
* Lecture notes: [[media:cg2_lesson09.pdf|lesson09.pdf]]
 +
* Book chapter (Surface reality techniques): [[media:cg2_lessonBook09.pdf|lessonBoook09.pdf]]
 +
* Štátnicová téma: Lokálne osvetľovacie modely. (tieňovanie, Phongov a Blinn-Phongov osvetlovací model, zložky (ambientna, difúzna, zrkadlová), textúrovanie a druhy textúr, mapovanie a filtrácia textúr, popísať princípy environment, bump, normal mapovania, textúrovací a tangenciálny priestor, príklad shader programov na GPU.
 +
 
 +
=== Lecture10 "Image Based Rendering 1." ===
 +
* Plenopticfunction
 +
* Panoramas
 +
* Concentric Mosaics
 +
* Light Field Rendering
 +
* The Lumigraph
 +
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
 +
* Homework: Blinn-Phong enumeration.
 +
 
 +
=== Lecture11 "Image Based Rendering 2." ===
 +
* Layered Depth Images
 +
* View-dependent Texture Mapping
 +
* Surface Light Fields
 +
* View Morphing
 +
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
 +
 
 +
=== Lecture12 "Ask me anything." ===
 +
* Test problem introduction
 
----
 
----
  
= Seminars on Computer Graphics 2 =
+
= Seminars on Advanced Computer Graphics =
  
 
== Rules / Info ==
 
== Rules / Info ==
 
* On every seminar we will implement selected problems/algorithms related to lessons. We will '''usually - not necessary''' start with a prearranged template downloadable from this site.
 
* On every seminar we will implement selected problems/algorithms related to lessons. We will '''usually - not necessary''' start with a prearranged template downloadable from this site.
 
* As a programming language we will use C#. We will use Visual C# 2010 as development environment. Alternatively you can use MonoDevelop (Linux / Mac OSX) on your own machine.
 
* As a programming language we will use C#. We will use Visual C# 2010 as development environment. Alternatively you can use MonoDevelop (Linux / Mac OSX) on your own machine.
 +
<!--
 
* Attendance at seminars is '''optional but recommended'''.
 
* Attendance at seminars is '''optional but recommended'''.
 
* Seminars are conducted by
 
* Seminars are conducted by
Riadok 98: Riadok 149:
 
* Schedule of seminars is
 
* Schedule of seminars is
 
** Wed (16:30) - Room I-H3
 
** Wed (16:30) - Room I-H3
<!--
 
 
* Other collaborators and authors: Juraj Onderik
 
* Other collaborators and authors: Juraj Onderik
 
* Comment, errata, constructive criticism or suggestion - [https://docs.google.com/spreadsheet/ccc?key=0AhREYgn4NR6AdHgyemtJYWk0REt3SVJXMUdnQW5ockE&usp=sharing Make It Better]
 
* Comment, errata, constructive criticism or suggestion - [https://docs.google.com/spreadsheet/ccc?key=0AhREYgn4NR6AdHgyemtJYWk0REt3SVJXMUdnQW5ockE&usp=sharing Make It Better]
Riadok 109: Riadok 159:
 
* Don't cheat - create instead. Any kind of cheating is punished by '''withholding 30% of your final evaluation''' for all involved students.
 
* Don't cheat - create instead. Any kind of cheating is punished by '''withholding 30% of your final evaluation''' for all involved students.
 
* As a homework, you will program what we could not finish during the exercise. Assignment and template will be downloadable from this site. See exercises.
 
* As a homework, you will program what we could not finish during the exercise. Assignment and template will be downloadable from this site. See exercises.
 +
<!--
 
* Homework must be submitted by email to [mailto:cg2.2015.hw@gmail.com  cg2.2015.hw@gmail.com] every week until the '''next Wednesday 16:30'''.
 
* Homework must be submitted by email to [mailto:cg2.2015.hw@gmail.com  cg2.2015.hw@gmail.com] every week until the '''next Wednesday 16:30'''.
 
* Your submission email '''must''' have title in form 'ExNN' where NN is the number of exercise, eg. Ex05.
 
* Your submission email '''must''' have title in form 'ExNN' where NN is the number of exercise, eg. Ex05.
Riadok 114: Riadok 165:
 
* Your code should be well '''formatted and commented'''. Titles of functions, classes, variables should be representative for their purpose. Homework without appropriate comments is for 0%.
 
* Your code should be well '''formatted and commented'''. Titles of functions, classes, variables should be representative for their purpose. Homework without appropriate comments is for 0%.
 
* There are ~12 homeworks during the semester. This number can change due to holidays, tech. problems etc.
 
* There are ~12 homeworks during the semester. This number can change due to holidays, tech. problems etc.
<!--
 
 
* [https://docs.google.com/spreadsheet/pub?key=0AguOJecPQwoSdFVER3BYMVhINHBnTnRGelVlUGx3eVE&single=true&gid=0&output=html Your Evaluation]
 
* [https://docs.google.com/spreadsheet/pub?key=0AguOJecPQwoSdFVER3BYMVhINHBnTnRGelVlUGx3eVE&single=true&gid=0&output=html Your Evaluation]
  
Riadok 133: Riadok 183:
 
== Exercises ==
 
== Exercises ==
  
=== Exercise00 [18.02.2015] "Introduction" ===
+
=== "Introduction" ===
 
* Motivation?
 
* Motivation?
 
** [http://goo.gl/5YLSxN 1st Octane], [http://goo.gl/J0E8qM 2nd Octane], [http://goo.gl/xVMEIk 3rd Octane]
 
** [http://goo.gl/5YLSxN 1st Octane], [http://goo.gl/J0E8qM 2nd Octane], [http://goo.gl/xVMEIk 3rd Octane]
Riadok 147: Riadok 197:
 
** [http://www.amazon.com/Microsoft-Visual-2010-Step/dp/0735626707 Visual c# 2010], [http://www.amazon.com/4-0-Nutshell-The-Definitive-Reference/dp/0596800959 c# 4.0 in a Nutshell]
 
** [http://www.amazon.com/Microsoft-Visual-2010-Step/dp/0735626707 Visual c# 2010], [http://www.amazon.com/4-0-Nutshell-The-Definitive-Reference/dp/0596800959 c# 4.0 in a Nutshell]
 
** [http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx Visual Shortcuts], [http://www.shortcutworld.com/en/win/SharpDevelop_4.0.html SharpDevelop Short cuts]
 
** [http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx Visual Shortcuts], [http://www.shortcutworld.com/en/win/SharpDevelop_4.0.html SharpDevelop Short cuts]
** Exercise "Vectors and Matrices" - [http://www.dai.fmph.uniba.sk/w/CG1_2013/en CG1]
+
 
 +
=== Exercise00 "Vectors and Matrices" ===
 +
* Create a simple application for vectors(4x1) and matrices(4x4)
 +
* [[media:Ex01.Info.pdf|Info]] | [[media:CG1.Ex01.Sample.zip|Sample]] | [[media:CG1.Ex01.Template.zip‎|Template]]
 +
* [http://www.sosmath.com/matrix/inverse/inverse.html Inverse Matrix] | [http://www.mathwords.com/a/adjoint.htm Adjoint Matrix] | [http://en.wikipedia.org/wiki/Adjugate_matrix Adjoint Matrix Wiki]
 +
<!--
 +
* '''Bonus''' implement unit tests:
 +
** Add drop-down option called '''Unit Test'''
 +
** Create '''2 tests for each arithmetic operation''' in the drop-down menu
 +
** Compare the result calculated by your implementation with a precalculated result
 +
** Count successful tests and output final score to console
 
* [[media:CG2.Ex00.pdf | Seminar slides]]
 
* [[media:CG2.Ex00.pdf | Seminar slides]]
 +
-->
  
=== Exercise01 [25.02.2015] "Ray Casting" ===
+
=== Exercise01 "Ray Casting" ===
 
* [[media:CG2.Ex01.pdf | Seminar slides]]
 
* [[media:CG2.Ex01.pdf | Seminar slides]]
 
* Implement a camera class suitable for the ray casting method. As usual you should use a similar functionality as in the sample application. Application should specifically be able to:
 
* Implement a camera class suitable for the ray casting method. As usual you should use a similar functionality as in the sample application. Application should specifically be able to:
Riadok 157: Riadok 218:
 
** Change the camera's field of view (larger angle = more space to render), see Blender camera.
 
** Change the camera's field of view (larger angle = more space to render), see Blender camera.
 
* Try to change the color of the intersected object due to distance from the camera
 
* Try to change the color of the intersected object due to distance from the camera
* ''''[2 bonus %]:'''  
+
* '''[2 bonus %]:'''  
 
** Create a camera which will rotate around defined point P (target) along a sphere with r = 1. You can use ideas from the Blender camera system and / or two-angle camera in openGL. Camera should use some sort of interactivity (2 angles) and targeted point P should be movable. Bonus camera can be created in a separated solution or you can change the structure in the template to implement two different cameras.
 
** Create a camera which will rotate around defined point P (target) along a sphere with r = 1. You can use ideas from the Blender camera system and / or two-angle camera in openGL. Camera should use some sort of interactivity (2 angles) and targeted point P should be movable. Bonus camera can be created in a separated solution or you can change the structure in the template to implement two different cameras.
 
** [http://youtu.be/1twa3CJOEfA?t=1m49s Example Camera Movement]
 
** [http://youtu.be/1twa3CJOEfA?t=1m49s Example Camera Movement]
 +
* [[media:CG2.Ex01.Sample.zip | Sample]] | [[media:CG2.Ex01.Template.zip | Template]]
 +
<!--
 
* [http://www.sccg.sk/~hudak/CG2/Ex01.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex01.Template.zip Template]
 
* [http://www.sccg.sk/~hudak/CG2/Ex01.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex01.Template.zip Template]
 
* '''Deadline: 4. 3. - 16:30'''
 
* '''Deadline: 4. 3. - 16:30'''
 +
-->
  
=== Exercise02 [4.03.2015] "Primitives" ===
+
=== Exercise02 "Primitives" ===
 
* [[media:CG2.Ex02.pdf | Seminar slides]]
 
* [[media:CG2.Ex02.pdf | Seminar slides]]
 
* Improve your tracer by adding a few primitives (ring, sphere, AABB box, triangle) [http://mrl.nyu.edu/~dzorin/rend05/lecture1a.pdf]  [http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-9-ray-triangle-intersection/barycentric-coordinates/] [http://geomalgorithms.com/a04-_planes.html#Barycentric-Coordinate-Compute] [http://www.cs.virginia.edu/~gfx/Courses/2003/ImageSynthesis/papers/Acceleration/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf]. Each object should be movable. As usual you should use a similar functionality as in the sample application.
 
* Improve your tracer by adding a few primitives (ring, sphere, AABB box, triangle) [http://mrl.nyu.edu/~dzorin/rend05/lecture1a.pdf]  [http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-9-ray-triangle-intersection/barycentric-coordinates/] [http://geomalgorithms.com/a04-_planes.html#Barycentric-Coordinate-Compute] [http://www.cs.virginia.edu/~gfx/Courses/2003/ImageSynthesis/papers/Acceleration/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf]. Each object should be movable. As usual you should use a similar functionality as in the sample application.
* ''''[1 bonus %]:'''  
+
* '''[1 bonus %]:'''  
 
** Create also a cylinder and a cone primitives
 
** Create also a cylinder and a cone primitives
* [http://www.sccg.sk/~hudak/CG2/Ex02.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex02.Template.zip Template]
+
[[media:CG2.Ex02.Sample.zip | Sample]] | [[media:CG2.Ex02.Template.zip | Template]]
* '''Deadline: 11. 3. - 16:30'''
+
<!--* [http://www.sccg.sk/~hudak/CG2/Ex02.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex02.Template.zip Template]-->
 +
<!-- '''Deadline: 11. 3. - 16:30''' -->
  
=== Exercise03 [11.03.2015] "Shader & Shading & Shadow" ===
+
=== Exercise03 "Shader & Shading & Shadow" ===
 
* [[media:CG2.Ex03.pdf | Seminar slides]]
 
* [[media:CG2.Ex03.pdf | Seminar slides]]
 
* Improve your tracer by adding shaders, shadows and lights. Implement checker and phong shader, sun light and hard shadows. Compute normals to each primitive in the point of intersection. As usual you should use a similar functionality as in the sample application.
 
* Improve your tracer by adding shaders, shadows and lights. Implement checker and phong shader, sun light and hard shadows. Compute normals to each primitive in the point of intersection. As usual you should use a similar functionality as in the sample application.
* [http://www.sccg.sk/~hudak/CG2/Ex03.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex03.Template.zip Template]
+
[[media:CG2.Ex03.Sample.zip | Sample]] | [[media:CG2.Ex03.Template.zip | Template]]
* '''Deadline: 18. 3. - 16:30'''
+
<!--* [http://www.sccg.sk/~hudak/CG2/Ex03.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex03.Template.zip Template]-->
 +
<!-- * '''Deadline: 18. 3. - 16:30''' -->
  
=== Exercise04 [18.03.2015] "Lights & Shadows" ===
+
=== Exercise04 "Lights & Shadows" ===
 
* [[media:CG2.Ex04.pdf | Seminar slides]]
 
* [[media:CG2.Ex04.pdf | Seminar slides]]
 
* Improve your tracer by adding a point light, spot light [http://wiki.blender.org/index.php/Doc:2.6/Manual/Lighting/Lamps/Spot] and an area light. In the case of point and spot light, define the light as a point with hard shadows and linear/quadratic light attenuation [http://wiki.blender.org/index.php/Doc:2.6/Manual/Lighting/Lights/Light_Attenuation]. Area light could be defined by Lights x Lights point lights. Area light should also be able to produce soft shadows.
 
* Improve your tracer by adding a point light, spot light [http://wiki.blender.org/index.php/Doc:2.6/Manual/Lighting/Lamps/Spot] and an area light. In the case of point and spot light, define the light as a point with hard shadows and linear/quadratic light attenuation [http://wiki.blender.org/index.php/Doc:2.6/Manual/Lighting/Lights/Light_Attenuation]. Area light could be defined by Lights x Lights point lights. Area light should also be able to produce soft shadows.
* ''''[1 bonus %]:'''  
+
* '''[1 bonus %]:'''  
 
** Write equation for illumination computed by sample code from seminar slides
 
** Write equation for illumination computed by sample code from seminar slides
* [http://www.sccg.sk/~hudak/CG2/Ex04.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex04.Template.zip Template]
+
[[media:CG2.Ex04.Sample.zip | Sample]] | [[media:CG2.Ex04.Template.zip | Template]]
* '''Deadline: 25. 3. - 16:25'''
+
<!--* [http://www.sccg.sk/~hudak/CG2/Ex04.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex04.Template.zip Template]-->
 +
<!-- * '''Deadline: 25. 3. - 16:25''' -->
  
=== ExerciseLab [25.03.2015] "Laboratory Experiment" ===
+
 +
 
 +
 
 +
=== Exercise05 "More About Shaders" ===
 +
* [[media:CG2.Ex05.pdf | Seminar slides]]
 +
* Improve your tracer by adding a few more shaders: Toon / Cell, Cook-Torrance, Oren-Nayar, Gradient. As usual you should use a similar functionality as in the sample application.
 +
* Set Cook-Torrance color to match your measurements from Laboratory exercise.
 +
* '''[2 bonus %]:'''
 +
** Implement [http://cseweb.ucsd.edu/~ravir/6998/papers/p265-ward.pdf Ward Shader] [ [[media:Spheres.PNG|Example]] ]
 +
** You should generate tangent space for each point on the sphere
 +
** Remember to keep the same orientation of tangent space at each point
 +
** You can replace Phong sphere with a Ward sphere
 +
* [[media:CG2.Ex05.Sample.zip|Sample]] | [[media:CG2.Ex05.Template.zip|Template]]
 +
<!--* '''Deadline: 15. 4. - 16:25'''-->
 +
 
 +
<!-- === FreeTime [08.04.2015] There is no seminar this week === -->
 +
 
 +
=== Exercise06 "Even More About Shaders" ===
 +
* [[media:CG2.Ex06.pdf | Seminar slides]]
 +
* Improve your tracer by adding reflections and refractions to render mirror and glass objects. As usual you should use a similar functionality as in the sample application.
 +
* ''''[1 bonus %]:'''
 +
** Implement fresnel effect
 +
[[media:CG2.Ex06.Sample.zip | Sample]] | [[media:CG2.Ex06.Template.zip | Template]]
 +
<!--* [http://www.sccg.sk/~hudak/CG2/Ex06.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex06.Template.zip Template]-->
 +
<!--* '''Deadline: 29. 4. - 16:25'''-->
 +
 
 +
=== ExerciseLab "Laboratory Experiment" ===
 
* Could we imitate materials from the real world?
 
* Could we imitate materials from the real world?
 
** [http://img291.imageshack.us/img291/4066/failani.png Anisotropic], [http://rhinotoday.com/wp-content/uploads/2012/03/keyshot-render-paint-sphere.jpg Carpaint], [http://1.bp.blogspot.com/_TCqLkmUciss/TPMGTwQwteI/AAAAAAAAALI/ZO5RQt60E6k/s1600/Glass_Balls_Color-1280x800.jpg Translucent], [http://graphics.ucsd.edu/~henrik/papers/photon_diffusion/milk_photon_diffusion.jpg Semi-translucent]
 
** [http://img291.imageshack.us/img291/4066/failani.png Anisotropic], [http://rhinotoday.com/wp-content/uploads/2012/03/keyshot-render-paint-sphere.jpg Carpaint], [http://1.bp.blogspot.com/_TCqLkmUciss/TPMGTwQwteI/AAAAAAAAALI/ZO5RQt60E6k/s1600/Glass_Balls_Color-1280x800.jpg Translucent], [http://graphics.ucsd.edu/~henrik/papers/photon_diffusion/milk_photon_diffusion.jpg Semi-translucent]
 
* Yes we can and we will. Choose a sample paint and  
 
* Yes we can and we will. Choose a sample paint and  
** Measure its '''color in Lab''' and Convert to '''RGB''' - [http://www.easyrgb.com/index.php?X=CALC Easy RGB]
+
** Measure its '''color in Lab''' and Convert to '''RGB''' - [http://www.easyrgb.com/index.php?X=CALC Easy RGB] (use illuminant D50)
 
** Measure '''gloss value''' in different conditions
 
** Measure '''gloss value''' in different conditions
 
* Write your results: Template
 
* Write your results: Template
Riadok 195: Riadok 288:
 
** Guidelines are in the [http://www.sccg.sk/~hudak/CG2/CG2.Ex10.Template.doc template]
 
** Guidelines are in the [http://www.sccg.sk/~hudak/CG2/CG2.Ex10.Template.doc template]
 
** Submit your results as a regular submission by mail
 
** Submit your results as a regular submission by mail
 +
<!---->
  
=== Exercise05 [01.04.2015] "More About Shaders" ===
+
=== Exercise08 "Postprocessing" ===
* [[media:CG2.Ex05.pdf | Seminar slides]]
+
* [[media:CG2.Ex08.pdf | Seminar slides]]
* Improve your tracer by adding a few more shaders: Toon / Cell, Cook-Torrance, Oren-Nayar, Gradient. As usual you should use a similar functionality as in the sample application.
+
* Improve your raytracer by adding supersampling SSAA / FSAA [http://en.wikipedia.org/wiki/Supersampling].
* Set Cook-Torrance color to match your measurements from Laboratory exercise.
+
* Implement blur. User can scale the intensity of blur [http://www.blackpawn.com/texts/blur/default.html]
* ''''[1 bonus %]:'''  
+
* '''[2 bonus %]:'''  
** Implement chicken shader
+
** Implement DOF. You can use definition from blur to create a fake DOF. User can define a point of sharpness and the intensity of the effect.
* [[media:CG2.Ex05.Sample.zip|Sample]] | [[media:CG2.Ex05.Template.zip|Template]]
+
[[media:CG2.Ex08.Sample.zip | Sample]] | [[media:CG2.Ex08.Template.zip | Template]]
* '''Deadline: 15. 4. - 16:25'''
+
[http://www.sccg.sk/~hudak/CG2/Ex08.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex08.Template.zip Template]
 +
<!--* '''Deadline: 6. 5. - 16:25'''-->
 +
 
 +
=== Exercise09 [06.05.2015] "Textures" ===
 +
* [[media:CG2.Ex09.pdf‎ | Seminar slides]]
 +
<!-- * The time has come to use textures in your ray tracer [http://dev.quixel.se/megascans] [http://www.crazybump.com/]
 +
* Implement 3 kinds of texture mapping: plane, sphere [http://4.bp.blogspot.com/-X5yJU7L87b4/Tuph1yIE64I/AAAAAAAAAOg/n36HVurEtxs/s1600/adadad.png] and normal mapping [http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/]
 +
* Tutorial
 +
** Define class Sampler and its descendants: class ColorSampler(only color) and class TextureSampler(also texture). Texture sampler should use some sort of sampling (clamp) and some sort of filtering (nearest neighbor)
 +
** Define class TextureMapping and its descendants: class PlaneMapping, class SphereMapping and class NormalMapping
 +
** Improve phong shader to include sample point from the texture
 +
* Your results should be similar to the given sample
 +
* '''[1 bonus %]:'''
 +
** Implement repeat and mirror texture sampling and bilinear texture filtering
 +
<!--* [[media:CG2.Ex09.Sample.zip | Sample]] | [[media:CG2.Ex09.Template.zip | Template]]-->
 +
<!--* [http://www.sccg.sk/~hudak/CG2/Ex09.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex09.Template.zip Template] -->
 
<!--
 
<!--
 +
* '''Deadline for laboratory exercise: 13. 5. - 16:30'''
 +
** No other assignment this week
 +
-->
 +
 +
=== AMA "Ask Me Anything" ===
 +
* Send your questions in advance to homework email
 +
 +
=== Final Term "Final Term" ===
 +
* Final test in moodle
 +
* Oral exam afterwards for successful students
 +
<!--
 +
=== [20.05.2015] "Final Term" ===
 +
 
=== ExerciseChicken [01.04.2015] "The One About Chickens" ===
 
=== ExerciseChicken [01.04.2015] "The One About Chickens" ===
 
* [[media:CG2.ExChicken.pdf‎ | Chicken slides]]
 
* [[media:CG2.ExChicken.pdf‎ | Chicken slides]]
 
* Improve your chickener by adding a few more shaders: Chicken, Cooked-Chicken, Chicken-Nyan. As usual you should use a similar functionality as in the sample application.
 
* Improve your chickener by adding a few more shaders: Chicken, Cooked-Chicken, Chicken-Nyan. As usual you should use a similar functionality as in the sample application.
 
 
  
 
=== Exercise05 [02.04.2014] "More About Shaders" ===
 
=== Exercise05 [02.04.2014] "More About Shaders" ===
Riadok 216: Riadok 336:
 
** Create a voronoi shader
 
** Create a voronoi shader
 
* [http://www.sccg.sk/~hudak/CG2/Ex05.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex05.Template.zip Template]
 
* [http://www.sccg.sk/~hudak/CG2/Ex05.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex05.Template.zip Template]
 
=== Exercise06 [09.04.2014] "Even More About Shaders" ===
 
* Improve your tracer by adding reflections and refractions to render mirror and glass objects. As usual you should use a similar functionality as in the sample application.
 
* ''''[1 bonus %]:'''
 
** Implement fresnel effect
 
* [http://www.sccg.sk/~hudak/CG2/Ex06.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex06.Template.zip Template]
 
  
 
=== Exercise07 [16.04.2014] "The One About Acceleration" ===
 
=== Exercise07 [16.04.2014] "The One About Acceleration" ===
Riadok 231: Riadok 345:
 
** Improve acceleration with KD Trees and SAH. Use it in 3D ray tracer for rendering mesh. Implement mesh loader and load the mesh from external source (e.g. stanford bunny - .obj format). You can use the standard mesh definition - everyting is a triangle.
 
** Improve acceleration with KD Trees and SAH. Use it in 3D ray tracer for rendering mesh. Implement mesh loader and load the mesh from external source (e.g. stanford bunny - .obj format). You can use the standard mesh definition - everyting is a triangle.
 
** '''Special bonus deadline:''' 17.5. - 23:59
 
** '''Special bonus deadline:''' 17.5. - 23:59
 
=== Exercise08 [30.04.2014] "Postprocessing" ===
 
* Improve your raytracer by adding supersampling SSAA / FSAA [http://en.wikipedia.org/wiki/Supersampling].
 
* Implement blur. User can scale the intensity of blur [http://www.blackpawn.com/texts/blur/default.html]
 
* '''[2 bonus %]:'''
 
** Implement DOF. You can use definition from blur to create a fake DOF. User can define a point of sharpness and the intensity of the effect.
 
* [http://www.sccg.sk/~hudak/CG2/Ex08.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex08.Template.zip Template]
 
* '''Deadline:''' 7.5. - 17:20
 
 
=== Exercise09 [07.05.2014] "Textures" ===
 
* The time has come to use textures in your ray tracer [http://dev.quixel.se/megascans] [http://www.crazybump.com/]
 
* Implement 3 kinds of texture mapping: plane, sphere [http://4.bp.blogspot.com/-X5yJU7L87b4/Tuph1yIE64I/AAAAAAAAAOg/n36HVurEtxs/s1600/adadad.png] and normal mapping [http://wiki.polycount.com/NormalMap/]
 
* Tutorial
 
** Define class Sampler and its descendants: class ColorSampler(only color) and class TextureSampler(also texture). Texture sampler should use some sort of sampling (clamp) and some sort of filtering (nearest neighbor)
 
** Define class TextureMapping and its descendants: class PlaneMapping, class SphereMapping and class NormalMapping
 
** Improve phong shader to include sample point from the texture
 
* Your results should be similar to the given sample
 
* '''[1 bonus %]:'''
 
** Implement repeat and mirror texture sampling and bilinear texture filtering (classic deadline)
 
 
* '''[3 special bonus %]:'''  
 
* '''[3 special bonus %]:'''  
 
** Implement mesh loader and load the mesh from external source (e.g. stanford bunny - .obj format). You can use the standard mesh definition - everyting is a triangle. Implement UV mapping (uv coordinates from .obj format) and smooth shading on mesh.
 
** Implement mesh loader and load the mesh from external source (e.g. stanford bunny - .obj format). You can use the standard mesh definition - everyting is a triangle. Implement UV mapping (uv coordinates from .obj format) and smooth shading on mesh.
 
** '''Special bonus deadline:''' 17.5. - 23:59
 
** '''Special bonus deadline:''' 17.5. - 23:59
* [http://www.sccg.sk/~hudak/CG2/Ex09.Sample.zip Sample] | [http://www.sccg.sk/~hudak/CG2/Ex09.Template.zip Template]
 
  
 
=== [21.05.2014] "Final Term" ===
 
=== [21.05.2014] "Final Term" ===
 +
-->

Aktuálna revízia z 11:17, 9. máj 2016

Cg2 2014.png

Advanced Computer Graphics

What you Need to Pass

  • Attend lessons. One missed +0 points. 2 missed 0 points, 3 missed 0 points, 4 and more is Fx.
  • Project and exercise (mandatory, 10+50 points).
  • Solve all homework problems (mandatory each one >=30%, 10 points)
  • Pass final term (mandatory, 20 points) You will need to solve several problems discussed during lessons.
  • Pass oral/written exam: (mandatory, +20 points)
  • Summary
    • Attendance = 0 or -100 (Fx)
    • Exercise = +50..0
    • Bonus = +10..0 (optional)
    • Homework = +10..4 or +4..0 (Fx)
    • Final term = +20..0
    • Oral/written exam = +20..0
  • Grades
    • A = 92-100
    • B = 84-91
    • C = 76-83
    • D = 68-75
    • E = 60-67
    • Fx = 0-59
  • Schedule
    • Mon (8:10) - Room M-I (lecture)
    • Mon (11:30) - Room I-H3 (seminar)


Materials to read


Lecture00 "Introduction to Computer Graphics"

  • Computer Graphics Applications

Lecture01 "Graphics Pipeline"

  • What is The Graphics Pipeline
  • Vertex Shader
  • Primitive Assembly
  • Tessellation Shaders
  • Geometry Shader
  • Geometry Postprocessing and Rasterization
  • Fragment Shader
  • Frame Buffer Operations
  • http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/pipeline33/
  • Lecture notes: lesson00.pdf
  • Štátnicová téma: Zobrazovací kanál. Grafická pipeline moderného hardvéru, framebuffer, buffer objekty, používané súradnicové priestory, druhy shader programov, druhy optimalizačných techník (view frustum, occlusion, backface culling), príklad shader programov.

Lecture02 "Ray Tracing 1."

Lecture03 "Ray Tracing 2."

Lecture04 "Ray Tracing 3."

  • Ray Tracing Acceleration
  • Data structure: grids, BVH, Kd-tree, Directional Partitioning
  • Dynamic Scenes
  • Beam and Cone Tracing
  • Packet Tracing
  • Lecture notes: lesson02.pdf
  • Poznámky v Slovenčine k téme Dátové Štruktúry a Kd-tree.
  • Štátnicová téma: Kanál metódy sledovania lúča a porovnanie s Radiosity metódou. (definícia lúča, definícia tieňového lúča, popis metódy sledovania lúča, generovanie lúča, pochod po lúči (ray traversal), prienik lúča s trojuholníkom, stromová štruktúra lúčov (ray tree) a jej použitie na výpočet lokálnej farby, problém presnosti priesečníkov). Metóda sledovania lúča na GPU, urýchľovacie techniky.

Lecture05 "Light Trasport."

  • Physics behind ray tracing
  • Physical light quantities
  • Visual perception of light
  • Light sources
  • Light transport simulation: Rendering Equation
  • Lecture notes: lesson05.pdf
  • Štátnicová téma: Fyzikálny osvetlovací model a výpočet farieb renderovacou rovnicou. (definícia radiancie, definícia BRDF a jej vlastnosti, fyzikálne BRDF Cook-Tarrance, definícia priestorového uhlu, napíšte renderovaciu rovnicu a vysvetlite jej členy).

Lecture06 "Radiosity."

  • Diffuse reflectance function
  • Radiative equilibrium between emission and absorption, escape
  • System of linear equations
  • Iterative solution Neuman series
  • Lecture notes: lesson05.pdf
  • Boo chapter Shading: shading.pdf

Lecture07 "BRDF."

  • Bidirectional Reflectance Distribution Function (BRDF)
  • Reflection models
  • Projection onto spherical basis functions
  • Shading Phong model, Blin-Phong model
  • Lecture notes: lesson07.pdf
  • Homework:
    • 1. Prove that the specular BRDF from slides less07 fulfills the BRDF properties: reciprocity, energy conservation, definit space, value space of BRDF
    • 2. Derive the equation for reflected direction Omega_r from shading document.
  • Physical BRDF
  • Ward Reflection Model
  • Cook-Torrance model
  • Lecture notes: lesson07Phys.pdf

Lecture08 "Shadows."

  • Lecture notes: lesson08.pdf
  • Štátnicová téma: Tiene, typy tieňov (mäkké, tvrdé, statické, dynamické), typy a popis algoritmov (projekčné, tieňové objemy, tieňové mapy (shadow mapping)), spôsoby implementácie jednotlivých algoritmov, artefakty a ich odstraňovanie, príklad shader programov pre tieňové mapy. Artefakty spôsobené diskretizáciou. Tiene vo Phongovom modeli.

Lecture09 "Texturing 1, 2."

  • Texture parameterization
  • Procedural methods
  • Procedural textures
  • Fractal landscapes
  • Lecture notes: lesson09.pdf
  • Book chapter (Surface reality techniques): lessonBoook09.pdf
  • Štátnicová téma: Lokálne osvetľovacie modely. (tieňovanie, Phongov a Blinn-Phongov osvetlovací model, zložky (ambientna, difúzna, zrkadlová), textúrovanie a druhy textúr, mapovanie a filtrácia textúr, popísať princípy environment, bump, normal mapovania, textúrovací a tangenciálny priestor, príklad shader programov na GPU.

Lecture10 "Image Based Rendering 1."

  • Plenopticfunction
  • Panoramas
  • Concentric Mosaics
  • Light Field Rendering
  • The Lumigraph
  • Lecture notes: lesson10.pdf
  • Homework: Blinn-Phong enumeration.

Lecture11 "Image Based Rendering 2."

  • Layered Depth Images
  • View-dependent Texture Mapping
  • Surface Light Fields
  • View Morphing
  • Lecture notes: lesson10.pdf

Lecture12 "Ask me anything."

  • Test problem introduction

Seminars on Advanced Computer Graphics

Rules / Info

  • On every seminar we will implement selected problems/algorithms related to lessons. We will usually - not necessary start with a prearranged template downloadable from this site.
  • As a programming language we will use C#. We will use Visual C# 2010 as development environment. Alternatively you can use MonoDevelop (Linux / Mac OSX) on your own machine.

Homeworks

  • You can get max 100% per homework. Submission after deadline is for 0%.
  • There is a min 60% of your final evaluation required for admission to final term.
  • Additional activity can be awarder by max 10% of your final evaluation.
  • Don't cheat - create instead. Any kind of cheating is punished by withholding 30% of your final evaluation for all involved students.
  • As a homework, you will program what we could not finish during the exercise. Assignment and template will be downloadable from this site. See exercises.

Exercises

"Introduction"

Exercise00 "Vectors and Matrices"

Exercise01 "Ray Casting"

  • Seminar slides
  • Implement a camera class suitable for the ray casting method. As usual you should use a similar functionality as in the sample application. Application should specifically be able to:
    • Render the scene (objects are movable).
    • Move the camera in a 3D space.
    • Change the camera's field of view (larger angle = more space to render), see Blender camera.
  • Try to change the color of the intersected object due to distance from the camera
  • [2 bonus %]:
    • Create a camera which will rotate around defined point P (target) along a sphere with r = 1. You can use ideas from the Blender camera system and / or two-angle camera in openGL. Camera should use some sort of interactivity (2 angles) and targeted point P should be movable. Bonus camera can be created in a separated solution or you can change the structure in the template to implement two different cameras.
    • Example Camera Movement
  • Sample | Template

Exercise02 "Primitives"

  • Seminar slides
  • Improve your tracer by adding a few primitives (ring, sphere, AABB box, triangle) [1] [2] [3] [4]. Each object should be movable. As usual you should use a similar functionality as in the sample application.
  • [1 bonus %]:
    • Create also a cylinder and a cone primitives

Sample | Template

Exercise03 "Shader & Shading & Shadow"

  • Seminar slides
  • Improve your tracer by adding shaders, shadows and lights. Implement checker and phong shader, sun light and hard shadows. Compute normals to each primitive in the point of intersection. As usual you should use a similar functionality as in the sample application.

Sample | Template

Exercise04 "Lights & Shadows"

  • Seminar slides
  • Improve your tracer by adding a point light, spot light [5] and an area light. In the case of point and spot light, define the light as a point with hard shadows and linear/quadratic light attenuation [6]. Area light could be defined by Lights x Lights point lights. Area light should also be able to produce soft shadows.
  • [1 bonus %]:
    • Write equation for illumination computed by sample code from seminar slides
 Sample |  Template



Exercise05 "More About Shaders"

  • Seminar slides
  • Improve your tracer by adding a few more shaders: Toon / Cell, Cook-Torrance, Oren-Nayar, Gradient. As usual you should use a similar functionality as in the sample application.
  • Set Cook-Torrance color to match your measurements from Laboratory exercise.
  • [2 bonus %]:
    • Implement Ward Shader [ Example ]
    • You should generate tangent space for each point on the sphere
    • Remember to keep the same orientation of tangent space at each point
    • You can replace Phong sphere with a Ward sphere
* Sample | Template 


Exercise06 "Even More About Shaders"

  • Seminar slides
  • Improve your tracer by adding reflections and refractions to render mirror and glass objects. As usual you should use a similar functionality as in the sample application.
  • '[1 bonus %]:
    • Implement fresnel effect
 Sample |  Template

ExerciseLab "Laboratory Experiment"

  • Could we imitate materials from the real world?
  • Yes we can and we will. Choose a sample paint and
    • Measure its color in Lab and Convert to RGB - Easy RGB (use illuminant D50)
    • Measure gloss value in different conditions
  • Write your results: Template
    • Fill out online form with selected results (during the seminar)
    • Guidelines are in the template
    • Submit your results as a regular submission by mail

Exercise08 "Postprocessing"

  • Seminar slides
  • Improve your raytracer by adding supersampling SSAA / FSAA [7].
  • Implement blur. User can scale the intensity of blur [8]
  • [2 bonus %]:
    • Implement DOF. You can use definition from blur to create a fake DOF. User can define a point of sharpness and the intensity of the effect.

Sample | Template

Sample | Template

Exercise09 [06.05.2015] "Textures"

AMA "Ask Me Anything"

  • Send your questions in advance to homework email

Final Term "Final Term"

  • Final test in moodle
  • Oral exam afterwards for successful students