m (Exercise00 "Vectors and Matrices")
 
(61 intermediate revisions by 2 users not shown)
Line 25: Line 25:
 
     Fx = 0-59
 
     Fx = 0-59
  
*[https://docs.google.com/spreadsheets/d/1fh6wGcP1WgMblb_CG4xfqF0od0V6MNCVSOW57bGzzRY/edit?usp=sharing '''VIEW RESULTS''']
+
*[https://docs.google.com/spreadsheets/d/1jbNMBGyIsJ3m6MwfGBKiq7BTLl6scVlAKAIp0qZvlTM/edit?usp=sharing '''VIEW RESULTS''']
* [https://moodle.uniba.sk/fmfi Final Term] by Mooddle Electronic test 13.5 12:20 in M-V)
+
*[https://moodle.uniba.sk/course/view.php?id=2164 Final Term] by Comenius University Moodle Electronic test 17.5 8:00 )
* Before the test exam you can try to solve many [http://www.netgraphics.sk/testy-pocitacovej-grafiky tests] from the graphics page, is you can pass the example test then you have big chance to pass the test exam.  
+
* Before the test exam you can try to solve many tests from the graphics page, is you can pass the example test then you have big chance to pass the test exam.  
  
 
* Schedule
 
* Schedule
** Mon (12:20) - Room M-V (lecture)
+
** Mon (12:20) - Online MS Teams (lecture)
** Str (9:50) - Room I-H3 (seminar)
+
** Str (9:50) - (excercises)
  
 
=== Materials to read ===  
 
=== Materials to read ===  
Line 73: Line 73:
 
* Š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.
 
* Š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 "Shading." ===
 +
* OPENGL Light sources
 +
* Shading Phong model
 +
* First time meeting with Rendering Equation
 +
* Book chapter Shading: [[media:Shading.pdf|shading.pdf]]
 +
 
 +
=== Lecture06 "Light Trasport." ===
 
* Physics behind ray tracing
 
* Physics behind ray tracing
 
* Physical light quantities
 
* Physical light quantities
Line 82: Line 88:
 
* Š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).
 
* Š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." ===
+
=== Lecture07 "Radiosity." ===
 
* Diffuse reflectance function
 
* Diffuse reflectance function
 
* Radiative equilibrium between emission and absorption, escape
 
* Radiative equilibrium between emission and absorption, escape
Line 88: Line 94:
 
* Iterative solution Neuman series
 
* Iterative solution Neuman series
 
* Lecture notes: [[media:cg2_lesson05.pdf|lesson05.pdf]]
 
* Lecture notes: [[media:cg2_lesson05.pdf|lesson05.pdf]]
* Boo chapter Shading: [[media:Shading.pdf|shading.pdf]]
+
* Book chapter Shading: [[media:Shading.pdf|shading.pdf]]
  
=== Lecture07 "BRDF." ===
+
=== Lecture08 "BRDF." ===
 
* Bidirectional Reflectance Distribution Function (BRDF)
 
* Bidirectional Reflectance Distribution Function (BRDF)
 
* Reflection models
 
* Reflection models
Line 96: Line 102:
 
* Shading Phong model, Blin-Phong model
 
* Shading Phong model, Blin-Phong model
 
* 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 [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
+
** 1. Prove that the mirror 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 [https://dai.fmph.uniba.sk/upload/e/eb/Shading.pdf shading] document.
+
** 2. Derive the equation for refracted direction Omega_r from [https://dai.fmph.uniba.sk/upload/e/eb/Shading.pdf shading] document in section 6.3.3.
 
* Physical BRDF
 
* Physical BRDF
 
* Ward Reflection Model
 
* Ward Reflection Model
Line 104: Line 110:
 
* Lecture notes: [[media:cg2_lesson07Phys.pdf|lesson07Phys.pdf]]
 
* Lecture notes: [[media:cg2_lesson07Phys.pdf|lesson07Phys.pdf]]
  
=== Lecture08, Lecture09 "Shadows." ===
+
=== Lecture09, Lecture10 "Shadows." ===
 
* Lecture notes: [[media:cg2_lesson08.pdf|lesson08.pdf]]
 
* 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.
 
* Š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.
  
=== Lecture10Lecture11 "Texturing 1, 2." ===
+
=== Lecture11Lecture12 "Texturing 1, 2." ===
 
* Texture parameterization
 
* Texture parameterization
 
* Procedural methods
 
* Procedural methods
Line 117: Line 123:
 
* Š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.
 
* Š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.
  
=== Lecture12 "Image Based Rendering 1." ===
+
=== Lecture13 "Image Based Rendering 1." ===
 
* Plenopticfunction
 
* Plenopticfunction
 
* Panoramas
 
* Panoramas
Line 124: Line 130:
 
* The Lumigraph
 
* The Lumigraph
 
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
 
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
* Homework: Blinn-Phong enumeration.
+
* '''Homework:''' Blinn-Phong enumeration.
  
=== Lecture13 "Image Based Rendering 2." ===
+
=== Lecture14 "Image Based Rendering 2." ===
 
* Layered Depth Images
 
* Layered Depth Images
 
* View-dependent Texture Mapping
 
* View-dependent Texture Mapping
Line 133: Line 139:
 
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
 
* Lecture notes: [[media:cg2_lesson10.pdf|lesson10.pdf]]
  
=== Lecture14 "Ask me anything." ===
+
=== Lecture15 "Ask me anything." ===
 
* Test problem introduction
 
* Test problem introduction
 
----
 
----
 
= Seminars on Advanced Computer Graphics  =
 
= Seminars on Advanced Computer Graphics  =
  
== Rules / Info ==
+
On wednesdays at 9:50 [https://teams.microsoft.com/l/channel/19%3a940702169208456d80b2bd374bfdc14b%40thread.tacv2/Cvi%25C4%258Denia?groupId=ef1d5f0e-c528-46c9-8b30-3e704e8af8ee&tenantId=ce31478d-6e7a-4ce7-8670-a5b9d51884f9 On Teams]
* 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.
+
* For programming we will use language '''C#''' and '''Visual Studio 2010''' as a development environment. Alternatively, you can use MonoDevelop (Linux / Mac OSX) on your own machine.
+
* Attendance at seminars is '''optional but recommended'''.
+
* Seminars are conducted by
+
** Adam Riečický (adam.riecicky@fmph.uniba.sk, Room M113)
+
* Schedule of seminars is
+
** Wednesday (9:50) - Room I-H3
+
  
== Homeworks ==
+
'''Guide:''' Adam Riečický
* For homework, you shall finish the tasks started on the exercises. Assignment and template will be downloadable from this page.
+
* 2 week period after each seminar, for submitting your finished code. Submissions after a deadline are for 0%.
+
* Minimum of 60% of your final exercise evaluation is required for admission to final term.
+
* Additional activity can be awarded by max 10% of your final evaluation.
+
  
* Homework must be submitted by email to [mailto:adam.riecicky@fmph.uniba.sk adam.riecicky@fmph.uniba.sk].
+
'''Contact:''' adam.riecicky@fmph.uniba.sk
* Your submission email '''must''' have the title in the form 'ACG ExNN' where NN is the number of exercises, eg. ACG Ex05.
+
 
* It is required to submit zipped source code of your homework (preferably the whole solution). Do not send executable files. Homeworks without the source code are for 0%.
+
== Info ==
* Your code should be well '''formatted and commented'''. Titles of functions, classes, variables should be representative for their purpose. Homeworks without appropriate comments are for 0%.
+
Each week a short guided presentation will be given.
 +
 
 +
An assignment for every week will be finishing a template C# project. The deadline for every project is ''' right before the next successive seminar - Wednesday at 9:50'''. The extended deadline is a week after with 0.5x penalization. Solutions to bonus assignment can be submitted anytime during the 2 weeks without the penalization.
 +
 
 +
=== Grading ===
 +
 
 +
* Total points from exercises make half of your final grade!
 +
* Minimum of 50% from exercises required to finish the class successfully
 +
* Late submission is for 0, no discussion
 +
 
 +
=== Project Evaluation Criteria ===
 +
 
 +
* 10 pt => Correct submission, everything works as supposed.
 +
* 6 pt => Partially correct submission, most of the things work as supposed.
 +
* 3 pt => Partially correct submission, at least one core functionality correct.
 +
* 0 pt => Incorrect submission or unsubmitted.
 +
* Penalization 0.5x when submitting in extended deadline (not for bonus).
 +
 
 +
=== Project Submittion ===
 +
 
 +
* Your code should be well '''formatted and commented'''. Titles of functions, classes, variables should be representative of their purpose.
 +
* Submission email must have the '''subject in the form of 'ACG ExNN'''' where NN is the exercise id, eg. ACG Ex05.
 +
* Solution source codes have to be '''archived and named properly 'ExNN_YourName''''
 +
* Do not archive send executable files.
 +
* Send by email to [mailto:adam.riecicky@fmph.uniba.sk  adam.riecicky@fmph.uniba.sk].
  
 
== Exercises ==
 
== Exercises ==
  
=== "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]
Line 172: Line 192:
 
** [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]
 
+
--->
  
 
=== Exercise00 "Vectors and Matrices" ===
 
=== Exercise00 "Vectors and Matrices" ===
 +
'''Deadline (no extended deadline): ''' 3.3.2021 at 23:59
 +
 
'''Asignment:'''
 
'''Asignment:'''
Create a simple application for vectors(4x1) and matrices(4x4).
+
Create a simple application for vector(4x1) and matrix operations(4x4).
Use struct properties, function and/or operators. Create a calculator, check your equations and results.
+
Use struct properties, functions and/or operators. Create a calculator, check your equations and results.
Add implementation to theese files in folder ''./Mathematics/'' : ''Vector4.cs'', ''MathEx.cs'' (if you have a courage, try also ''Matrix44.cs'')
+
Add implementation to theese files in folder ''./Mathematics/'' : ''Vector4.cs'', ''MathEx.cs'', and "Matrix44.cs''
  
For help, view [https://chortle.ccsu.edu/vectorlessons/vectorindex.html this reminder on linear algebra]  
+
'''You can ignore vector operations "/" (vector projection) and "^" (modulation product).'''
 +
 
 +
For a help, see [https://chortle.ccsu.edu/vectorlessons/vectorindex.html this reminder on linear algebra]  
 
*[[media:CG1.Ex01.Sample.zip|Sample]] | [[media:CG1.Ex01.Template.zip‎|Template]]
 
*[[media:CG1.Ex01.Sample.zip|Sample]] | [[media:CG1.Ex01.Template.zip‎|Template]]
  
'''Here will be deadline!''' But not this time... this exercise is not evaluated.
 
  
 
=== Exercise01 "Ray Casting" ===
 
=== Exercise01 "Ray Casting" ===
[https://docs.google.com/presentation/d/1dLsxxzxOqyyd7YyDcsW9G_Knsrbox_TRLJGd-Xjc7RE/edit?usp=sharing Seminar slides]
+
'''Deadline (no extended deadline):''' 10.3.2021 at 23:59
 +
 
 +
[https://docs.google.com/presentation/d/1qfbRX35LpC72wCmBLcaftWsIUqFF7Ej6fBn4NGFoKMc/edit?usp=sharing Seminar slides]
  
 
'''Asignment:'''
 
'''Asignment:'''
Implement a camera class suitable for the ray casting method. As usual, you should use a similar functionality as in the sample application. The application should specifically be able to:
+
Implement basic ray casting and the intersection of ray and plane. Define the camera class and implement a simple ray-tracing procedure.
* 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 the distance from the camera
+
 
* [[media:CG2.Ex01.Sample.zip | Sample]] | [[media:CG2.Ex01.Template.zip | Template]]
 
* [[media:CG2.Ex01.Sample.zip | Sample]] | [[media:CG2.Ex01.Template.zip | Template]]
  
''' Bonus [+2%]:'''  
+
''' Bonus [2 bonus %]:'''  
Create a camera which will rotate around defined point P (target) among a sphere with r = 1. You can use ideas from the Blender camera system and/or two-angle camera in OpenGL. The 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 that will rotate around defined point P (target) among a sphere with r = 1. You can use ideas from the Blender camera system and/or two-angle camera in OpenGL. The camera should use some sort of interactivity (2 angles) and targeted point P should be movable. Bonus camera can be created in a separate 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]
<!--
+
 
* '''Deadline: 4. 3. - 16:30'''
+
  
 
=== Exercise02 "Primitives" ===
 
=== Exercise02 "Primitives" ===
[https://docs.google.com/presentation/d/1lKXov3Aoh0Xi1cwlGFLADLORhevRlc28iwqX-f0QbrI/edit?usp=sharing Seminar Slides]
+
'''Deadline:''' 10.3.2021 at 9:50
 +
'''Extended deadline:''' 17.3.2021 at 9:50
 +
 
 +
[https://docs.google.com/presentation/d/1QqosOvNF8QMCX_AvhbjhgO2Kbc1ehBI6aomLubBKpdQ/edit?usp=sharing Seminar Slides]
  
 
'''Asignment:'''
 
'''Asignment:'''
Improve your tracer by adding a few primitives (ring, sphere, AABB box, triangle)
+
Improve your tracer by adding new primitive object types: box, sphere, and ring.
[http://mrl.nyu.edu/~dzorin/rend05/lecture1a.pdf]
+
[http://geomalgorithms.com/a04-_planes.html#Barycentric-Coordinate-Compute]
+
[http://www.realtimerendering.com/intersections.html]
+
to the sample application.
+
 
* [[media:CG2.Ex02.Sample.zip | Sample]] | [[media:CG2.Ex02.Template.zip | Template]]
 
* [[media:CG2.Ex02.Sample.zip | Sample]] | [[media:CG2.Ex02.Template.zip | Template]]
  
'''Bonus [+1%]:'''  
+
'''Resources:'''
Create also a cylinder and a cone primitives
+
[http://geomalgorithms.com/a04-_planes.html#Barycentric-Coordinate-Compute Planes, triangles, and distances],
 +
[http://www.realtimerendering.com/intersections.html Intersection algorithms]
 +
 
 +
'''Bonus [3 bonus % (1 for each)]:'''  
 +
Create also a triangle, cylinder, and cone primitives and add them to the tracer. Also, create a new scene where you present the primitive(s).
  
'''Deadline: 12. 3. - 16:30'''
 
  
 
=== Exercise03 "Shaders, Shading and Shadows" ===
 
=== Exercise03 "Shaders, Shading and Shadows" ===
 +
'''Deadline:''' 17.3.2021 at 9:50
 +
'''Extended deadline:''' 24.3.2021 at 9:50
 +
 
[https://docs.google.com/presentation/d/1q_n3gjcUHZ8Nr7ma6EJXmE9RJxMHj1bmysQnKQwzb3U/edit?usp=sharing Seminar Slides]
 
[https://docs.google.com/presentation/d/1q_n3gjcUHZ8Nr7ma6EJXmE9RJxMHj1bmysQnKQwzb3U/edit?usp=sharing Seminar Slides]
  
 
'''Asignment:'''
 
'''Asignment:'''
Improve your tracer by implementing checker and Phong shaders, directional 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 implementing Phong and checker shaders, directional light, and hard shadows. Compute normals of each primitive at the point of intersection. As usual, you should use a similar functionality as in the sample application.
 
* [[media:CG2.Ex03.Sample.zip | Sample]] | [[media:CG2.Ex03.Template.zip | Template]]  
 
* [[media:CG2.Ex03.Sample.zip | Sample]] | [[media:CG2.Ex03.Template.zip | Template]]  
  
'''Deadline: 19. 3. - 16:30'''
 
  
=== Exercise04 "Lights & Shadows" ===
+
=== Exercise04 "Light Types" ===
 +
'''Deadline:''' 24.3.2021 at 9:50
 +
'''Extended deadline:''' 31.3.2021 at 9:50
 +
 
 
[https://docs.google.com/presentation/d/1BefIrufgieVVjSyr5R65CKWFwuxBaj2CGhXIx_58CNA/edit?usp=sharing Seminar Slides]
 
[https://docs.google.com/presentation/d/1BefIrufgieVVjSyr5R65CKWFwuxBaj2CGhXIx_58CNA/edit?usp=sharing Seminar Slides]
  
 
'''Asignment:'''
 
'''Asignment:'''
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 spotlight, 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, spot and an area light types. In the case of point and spotlight, 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.
 
* [[media:CG2.Ex04.Sample.zip | Sample]] | [[media:CG2.Ex04.Template.zip | Template]]
 
* [[media:CG2.Ex04.Sample.zip | Sample]] | [[media:CG2.Ex04.Template.zip | Template]]
  
'''[1 bonus %]:'''  
+
'''[2 bonus %]:'''  
Write equation for illumination computed by sample code from seminar slides
+
Write an equation for illumination computed by sample code from seminar slides
  
'''Deadline: 26. 3. - 16:30'''
 
  
=== ExerciseLab "Laboratory Experiment" ===
+
=== Exercise05 "Shaders" ===
Could we imitate materials from the real world?
+
'''Deadline:''' 31.3.2021 at 9:50
[http://rhinotoday.com/wp-content/uploads/2012/03/keyshot-render-paint-sphere.jpg Carpaint],
+
'''Extended deadline:''' 7.4.2021 at 9:50
[http://1.bp.blogspot.com/_TCqLkmUciss/TPMGTwQwteI/AAAAAAAAALI/ZO5RQt60E6k/s1600/Glass_Balls_Color-1280x800.jpg Translucent],
+
Yes, we can, and we will!
+
 
+
'''Asignment:'''
+
Choose a sample of car paint and:  
+
* Measure its ''gloss'' value in different conditions, and color in ''Lab'' converted to ''RGB'' using [http://www.easyrgb.com/index.php?X=CALC Easy RGB] (use illuminant D50)
+
* Write your results in the [https://docs.google.com/document/d/1ZHHtq1GVedfPst84nOqsaOPScjJrps7NfusfwuIe5_8/edit?usp=sharing Measurement Report]
+
* Submit your results as a regular submission by mail
+
 
+
'''Deadline: 9. 4. - 16:30'''
+
  
=== Exercise05 "More Shaders" ===
+
[https://docs.google.com/presentation/d/1nJxdeN_NfT_45Fn7z_d-Vh3sS-NZcYWbRslSPudYKxw/edit?usp=sharing Seminar Slides]
[https://docs.google.com/presentation/d/1tx3eCeAjyHXrsTJxLtMMxqkJ2lyY9JioChyKWI94tVk/edit?usp=sharing Seminar Slides]
+
  
 
'''Asignment:'''
 
'''Asignment:'''
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 tracer by adding a few more shaders: Toon, Gradient, Cook-Torrance, and Oren-Nayar.
 
* [[media:CG2.Ex05.Sample.zip|Sample]] | [[media:CG2.Ex05.Template.zip|Template]]  
 
* [[media:CG2.Ex05.Sample.zip|Sample]] | [[media:CG2.Ex05.Template.zip|Template]]  
* Set Cook-Torrance color to match your measurements from Laboratory exercise.
 
  
 
'''[2 bonus %]:'''  
 
'''[2 bonus %]:'''  
 
Implement [http://cseweb.ucsd.edu/~ravir/6998/papers/p265-ward.pdf Ward Shader] [ [[media:Spheres.PNG|Example]] ].  
 
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
+
* Generate tangent space for each point on the sphere
 
* Remember to keep the same orientation of tangent space at each point
 
* Remember to keep the same orientation of tangent space at each point
* You can replace Phong sphere with a Ward sphere
 
  
'''Deadline: 9. 4. - 16:30'''
 
  
=== Exercise06 "Reflection And Refraction" ===
+
=== Exercise06 "Reflections" ===
[https://docs.google.com/presentation/d/1IPvbsiFnvYhp51V8OobyJy8H-3fvdIzksZqqUUwN2-0/edit?usp=sharing Seminar Slides]
+
'''Deadline:''' 7.4.2021 at 9:50
 +
'''Extended deadline:''' 14.4.2021 at 9:50
 +
 
 +
[https://docs.google.com/presentation/d/1GNhGJqi-ELtQMMUU2RvHqTa_0U2oJQLHEyAh-dvIzoQ/edit?usp=sharing Seminar Slides]
  
 
'''Asignment:'''
 
'''Asignment:'''
Improve your tracer by adding reflections and refractions for rendering mirror and glass objects. As usual, you should use a similar functionality as in the sample application.
+
Improve your tracer by adding reflections for rendering mirror-like materials.
 
* [[media:CG2.Ex06.Sample.zip | Sample]] | [[media:CG2.Ex06.Template.zip | Template]]
 
* [[media:CG2.Ex06.Sample.zip | Sample]] | [[media:CG2.Ex06.Template.zip | Template]]
  
'''[1 bonus %]:'''  
+
 
 +
=== Exercise07 "Transparency" ===
 +
'''Deadline:''' 14.4.2021 at 9:50
 +
'''Extended deadline:''' 21.4.2021 at 9:50
 +
 
 +
[https://docs.google.com/presentation/d/1XxI2xLD8UFpLSICbP5f09biCb8DAaxrM0nmxto2-bL4/edit?usp=sharing Seminar Slides]
 +
 
 +
'''Asignment:'''
 +
Improve your tracer by adding reflections and refractions for rendering glass materials.
 +
* [[media:CG2.Ex06.Sample.zip | Sample]] | [[media:CG2.Ex07.Template.zip | Template]]
 +
 
 +
'''[2 bonus %]:'''  
 
Implement fresnel effect.
 
Implement fresnel effect.
  
'''Deadline: 16. 4. - 16:30'''
 
  
 
=== Exercise08 "Postprocessing" ===
 
=== Exercise08 "Postprocessing" ===
 +
'''Deadline:''' 5.5.2021 at 9:50
 +
'''Extended deadline:''' 12.5.2021 at 9:50
 +
 
[https://docs.google.com/presentation/d/1CxRs7VM0ZEMMq-m4BCklmpTWJyFDQDb_XPunFWeFtMU/edit?usp=sharing Seminar slides]
 
[https://docs.google.com/presentation/d/1CxRs7VM0ZEMMq-m4BCklmpTWJyFDQDb_XPunFWeFtMU/edit?usp=sharing Seminar slides]
  
Improve your raytracer by adding supersampling antialiasing [http://en.wikipedia.org/wiki/Supersampling]. Implement blur. User can scale the intensity of blur [http://www.blackpawn.com/texts/blur/default.html].
+
Finalize your raytracer by adding supersampling antialiasing [http://en.wikipedia.org/wiki/Supersampling]. Implement blur. Users can scale the intensity of blur [http://www.blackpawn.com/texts/blur/default.html].
 
* [[media:CG2.Ex08.Sample.zip | Sample]] | [[media:CG2.Ex08.Template.zip | Template]]
 
* [[media:CG2.Ex08.Sample.zip | Sample]] | [[media:CG2.Ex08.Template.zip | Template]]
  
Line 290: Line 318:
 
Implement DOF. You can use the definition from blur to create a fake DOF. A user can define a point of sharpness and the intensity of the effect.
 
Implement DOF. You can use the definition from blur to create a fake DOF. A user can define a point of sharpness and the intensity of the effect.
  
'''Deadline: 30. 4. - 16:30'''
+
<!--
 +
=== ExerciseLab "Laboratory Experiment" ===
 +
Could we imitate materials from the real world?
 +
[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],
 +
Yes, we can, and we will!
 +
 
 +
'''Asignment:'''
 +
[https://docs.google.com/document/d/1FqxzjfmSg71wpO9b0RnK-pSFYy5lSL_CVjXq-Lpg_hI/edit?usp=sharing LAB assignment document]
 +
* Submit your results as a regular submission by mail
 +
 
 +
 
  
 
<!--=== Exercise09 "Textures" ===
 
<!--=== Exercise09 "Textures" ===

Latest revision as of 12:02, 3 May 2021

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
  • VIEW RESULTS
  • Final Term by Comenius University Moodle Electronic test 17.5 8:00 )
  • Before the test exam you can try to solve many tests from the graphics page, is you can pass the example test then you have big chance to pass the test exam.
  • Schedule
    • Mon (12:20) - Online MS Teams (lecture)
    • Str (9:50) - (excercises)

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 [1]
  • Š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 "Shading."

  • OPENGL Light sources
  • Shading Phong model
  • First time meeting with Rendering Equation
  • Book chapter Shading: shading.pdf

Lecture06 "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).

Lecture07 "Radiosity."

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

Lecture08 "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 mirror BRDF from slides less07 fulfills the BRDF properties: reciprocity, energy conservation, definit space, value space of BRDF
    • 2. Derive the equation for refracted direction Omega_r from shading document in section 6.3.3.
  • Physical BRDF
  • Ward Reflection Model
  • Cook-Torrance model
  • Lecture notes: lesson07Phys.pdf

Lecture09, Lecture10 "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.

Lecture11, Lecture12 "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.

Lecture13 "Image Based Rendering 1."

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

Lecture14 "Image Based Rendering 2."

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

Lecture15 "Ask me anything."

  • Test problem introduction

Seminars on Advanced Computer Graphics

On wednesdays at 9:50 On Teams

Guide: Adam Riečický

Contact: adam.riecicky@fmph.uniba.sk

Info

Each week a short guided presentation will be given.

An assignment for every week will be finishing a template C# project. The deadline for every project is right before the next successive seminar - Wednesday at 9:50. The extended deadline is a week after with 0.5x penalization. Solutions to bonus assignment can be submitted anytime during the 2 weeks without the penalization.

Grading

  • Total points from exercises make half of your final grade!
  • Minimum of 50% from exercises required to finish the class successfully
  • Late submission is for 0, no discussion

Project Evaluation Criteria

  • 10 pt => Correct submission, everything works as supposed.
  • 6 pt => Partially correct submission, most of the things work as supposed.
  • 3 pt => Partially correct submission, at least one core functionality correct.
  • 0 pt => Incorrect submission or unsubmitted.
  • Penalization 0.5x when submitting in extended deadline (not for bonus).

Project Submittion

  • Your code should be well formatted and commented. Titles of functions, classes, variables should be representative of their purpose.
  • Submission email must have the subject in the form of 'ACG ExNN' where NN is the exercise id, eg. ACG Ex05.
  • Solution source codes have to be archived and named properly 'ExNN_YourName'
  • Do not archive send executable files.
  • Send by email to adam.riecicky@fmph.uniba.sk.

Exercises

Exercise00 "Vectors and Matrices"

Deadline (no extended deadline): 3.3.2021 at 23:59

Asignment: Create a simple application for vector(4x1) and matrix operations(4x4). Use struct properties, functions and/or operators. Create a calculator, check your equations and results. Add implementation to theese files in folder ./Mathematics/ : Vector4.cs, MathEx.cs, and "Matrix44.cs

You can ignore vector operations "/" (vector projection) and "^" (modulation product).

For a help, see this reminder on linear algebra


Exercise01 "Ray Casting"

Deadline (no extended deadline): 10.3.2021 at 23:59

Seminar slides

Asignment: Implement basic ray casting and the intersection of ray and plane. Define the camera class and implement a simple ray-tracing procedure.

Bonus [2 bonus %]: Create a camera that will rotate around defined point P (target) among a sphere with r = 1. You can use ideas from the Blender camera system and/or two-angle camera in OpenGL. The camera should use some sort of interactivity (2 angles) and targeted point P should be movable. Bonus camera can be created in a separate solution or you can change the structure in the template to implement two different cameras.


Exercise02 "Primitives"

Deadline: 10.3.2021 at 9:50 Extended deadline: 17.3.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by adding new primitive object types: box, sphere, and ring.

Resources: Planes, triangles, and distances, Intersection algorithms

Bonus [3 bonus % (1 for each)]: Create also a triangle, cylinder, and cone primitives and add them to the tracer. Also, create a new scene where you present the primitive(s).


Exercise03 "Shaders, Shading and Shadows"

Deadline: 17.3.2021 at 9:50 Extended deadline: 24.3.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by implementing Phong and checker shaders, directional light, and hard shadows. Compute normals of each primitive at the point of intersection. As usual, you should use a similar functionality as in the sample application.


Exercise04 "Light Types"

Deadline: 24.3.2021 at 9:50 Extended deadline: 31.3.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by adding a point, spot and an area light types. In the case of point and spotlight, define the light as a point with hard shadows and linear/quadratic light attenuation [2]. Area light could be defined by Lights x Lights point lights. Area light should also be able to produce "soft" shadows.

[2 bonus %]: Write an equation for illumination computed by sample code from seminar slides


Exercise05 "Shaders"

Deadline: 31.3.2021 at 9:50 Extended deadline: 7.4.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by adding a few more shaders: Toon, Gradient, Cook-Torrance, and Oren-Nayar.

[2 bonus %]: Implement Ward Shader [ Example ].

  • Generate tangent space for each point on the sphere
  • Remember to keep the same orientation of tangent space at each point


Exercise06 "Reflections"

Deadline: 7.4.2021 at 9:50 Extended deadline: 14.4.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by adding reflections for rendering mirror-like materials.


Exercise07 "Transparency"

Deadline: 14.4.2021 at 9:50 Extended deadline: 21.4.2021 at 9:50

Seminar Slides

Asignment: Improve your tracer by adding reflections and refractions for rendering glass materials.

[2 bonus %]: Implement fresnel effect.


Exercise08 "Postprocessing"

Deadline: 5.5.2021 at 9:50 Extended deadline: 12.5.2021 at 9:50

Seminar slides

Finalize your raytracer by adding supersampling antialiasing [3]. Implement blur. Users can scale the intensity of blur [4].

[2 bonus %]: Implement DOF. You can use the definition from blur to create a fake DOF. A user can define a point of sharpness and the intensity of the effect.