(Excercise03 "OBJECT LOADING”)
(Excercise09 "Compute Shaders”)
 
(61 intermediate revisions by the same user not shown)
Riadok 4: Riadok 4:
  
 
This course ...
 
This course ...
* Will focus on visualization of 3D scenes [http://madebyevan.com/webgl-water/] [http://helloracer.com/webgl/]
+
* Will focus on visualization of 3D scenes [http://madebyevan.com/webgl-water/]
 
* Will show you what are the current topics
 
* Will show you what are the current topics
 
* Will improve your skills in
 
* Will improve your skills in
Riadok 13: Riadok 13:
 
== What you Need to Pass ==
 
== What you Need to Pass ==
  
* Show your project (50% min. 25%).
+
* Show your project (70% min. 35%).
 
**Project specification template: [[media:RTGProjektSpecifikacia.doc|RTGProjektSpecifikacia.doc]]
 
**Project specification template: [[media:RTGProjektSpecifikacia.doc|RTGProjektSpecifikacia.doc]]
 
**For video recording you can use: https://obsproject.com/
 
**For video recording you can use: https://obsproject.com/
* Pass oral exam: (50%, min. 25%).
+
* Pass oral exam: (30%, min.15%).
  
  
Riadok 47: Riadok 47:
 
* GLSL – vertex, fragment
 
* GLSL – vertex, fragment
 
* Passing variables
 
* Passing variables
 +
* Unified architecture [https://docs.imgtec.com/PowerVR_Architecture/topics/powervr_architecture_unified_and_non_unified_shader_architectures.html]
 
* Lecture notes: [[media:Lecture1.pdf|Lecture1.pdf]]
 
* Lecture notes: [[media:Lecture1.pdf|Lecture1.pdf]]
  
Riadok 55: Riadok 56:
 
* Pixel Buffer Objects [http://www.songho.ca/opengl/gl_pbo.html]
 
* Pixel Buffer Objects [http://www.songho.ca/opengl/gl_pbo.html]
 
* Rendering to texture
 
* Rendering to texture
* Deferred lighting [https://en.wikipedia.org/wiki/Deferred_shading]
+
* Deferred lighting [https://en.wikipedia.org/wiki/Deferred_shading][https://learnopengl.com/Advanced-Lighting/Deferred-Shading]
 
* Lecture notes: [[media:Lecture2.pdf|Lecture2.pdf]]
 
* Lecture notes: [[media:Lecture2.pdf|Lecture2.pdf]]
  
Riadok 63: Riadok 64:
 
* Oren-Nayar model
 
* Oren-Nayar model
 
* Cook-Torrance model
 
* Cook-Torrance model
* Texture filtering [https://open.gl/textures] [http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/]
+
* Texture filtering [https://open.gl/textures] [http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/] [https://www.youtube.com/watch?v=-HAvejfMMoo]
* Bump mapping
+
* Bump mapping [https://learnopengl.com/Advanced-Lighting/Parallax-Mapping]
 
* Lecture notes: [[media:Lecture3.pdf|Lecture3.pdf]]
 
* Lecture notes: [[media:Lecture3.pdf|Lecture3.pdf]]
  
Riadok 79: Riadok 80:
 
* Planar shadows
 
* Planar shadows
 
* Projective shadows
 
* Projective shadows
* Shadow mapping
+
* Shadow mapping [http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/] [https://learnopengl.com/Advanced-Lighting/Shadows/Shadow-Mapping]
 
* Shadow volumes
 
* Shadow volumes
 
* Lecture notes: [[media:Lecture5.pdf|Lecture5.pdf]]
 
* Lecture notes: [[media:Lecture5.pdf|Lecture5.pdf]]
Riadok 87: Riadok 88:
 
* Fresnel reflectance
 
* Fresnel reflectance
 
* Environment mapping
 
* Environment mapping
* Water rendering
+
* Water rendering [https://www.gamasutra.com/blogs/FrankKane/20140122/209052/3D_Water_Effects_Heres_Whats_Involved.php?print=1] [https://www.keithlantz.net/2011/10/ocean-simulation-part-one-using-the-discrete-fourier-transform/] [http://david.li/waves/][https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html]
 
* Caustics [https://medium.com/@evanwallace/rendering-realtime-caustics-in-webgl-2a99a29a0b2c]
 
* Caustics [https://medium.com/@evanwallace/rendering-realtime-caustics-in-webgl-2a99a29a0b2c]
 
* Subsurface scattering
 
* Subsurface scattering
Riadok 93: Riadok 94:
  
 
=== Lesson07 "Post-Processing" ===
 
=== Lesson07 "Post-Processing" ===
* Depth of Field
+
* Depth of Field [https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-28-practical-post-process-depth-field]
 
* Gaussian blur
 
* Gaussian blur
 
* Motion blur
 
* Motion blur
* Glow
+
* Glow [https://learnopengl.com/Advanced-Lighting/Bloom]
* High Dynamic Range
+
* High Dynamic Range [https://learnopengl.com/Advanced-Lighting/HDR] [https://www.cl.cam.ac.uk/~rkm38/pdfs/tone_mapping.pdf]
 
* Tone mapping
 
* Tone mapping
 
* Lecture notes: [[media:Lecture7.pdf|Lecture7.pdf]]
 
* Lecture notes: [[media:Lecture7.pdf|Lecture7.pdf]]
  
 
=== Lesson08 "Geometry Optimalization" ===
 
=== Lesson08 "Geometry Optimalization" ===
* Reducing geometry
+
* Frustum culling [http://www.lighthouse3d.com/tutorials/view-frustum-culling/view-frustums-shape/] [http://www.lighthouse3d.com/tutorials/view-frustum-culling/radar-approach-testing-spheres/] [http://www.lighthouse3d.com/tutorials/view-frustum-culling/geometric-approach-testing-boxes-ii/]
* Back-face culling
+
* Back-face culling [https://learnopengl.com/Advanced-OpenGL/Face-culling]
* Occlusion culling
+
* Occlusion culling [http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch29.html]
* Levels of Detail
+
* Tessellation [http://ogldev.atspace.co.uk/www/tutorial30/tutorial30.html]
 
* Texture atlas
 
* Texture atlas
 
* Lecture notes: [[media:Lecture8.pdf|Lecture8.pdf]]
 
* Lecture notes: [[media:Lecture8.pdf|Lecture8.pdf]]
Riadok 114: Riadok 115:
 
* Shared memory
 
* Shared memory
 
* OpenCL
 
* OpenCL
* Compute shaders
+
* Compute shaders [https://www.khronos.org/assets/uploads/developers/library/2014-siggraph-bof/KITE-BOF_Aug14.pdf]
 +
 
 
* Lecture notes: [[media:Lecture9.pdf|Lecture9.pdf]]
 
* Lecture notes: [[media:Lecture9.pdf|Lecture9.pdf]]
  
Riadok 132: Riadok 134:
 
**http://www.lighthouse3d.com
 
**http://www.lighthouse3d.com
 
**http://antongerdelan.net/opengl/
 
**http://antongerdelan.net/opengl/
 +
**https://www.tutorialspoint.com/webgl/index.htm
 
*Libraries:
 
*Libraries:
 
**https://www.opengl.org/resources/libraries/glut/
 
**https://www.opengl.org/resources/libraries/glut/
Riadok 137: Riadok 140:
 
**http://glew.sourceforge.net/
 
**http://glew.sourceforge.net/
 
**http://gnuwin32.sourceforge.net/packages/freetype.htm
 
**http://gnuwin32.sourceforge.net/packages/freetype.htm
**http://assimp.sourceforge.net/
+
**https://github.com/assimp/assimp
 
**Example:
 
**Example:
 
***[[media:example.zip|example.zip]]
 
***[[media:example.zip|example.zip]]
  
=== Excercise00 "Základný projekt” ===
+
=== Excercise00 "Basic project” ===
* Základný projekt: [[media:cv0.rar|cv0.rar]]
+
* Basic project: [[media:cv0.rar|cv0.rar]]
* Práca s knižnicami GLUT a GLEW
+
* Work with libraries GLUT and GLEW.
Témy: pridajte svetlo do scény a shader programu
+
** To disable the compilator errors use #pragma warning(disable:4996) and cast the char constants to pointers
 +
Assignment: Add a light to the program.
  
 
=== Excercise01 "Texturing and Lighting” ===
 
=== Excercise01 "Texturing and Lighting” ===
Riadok 152: Riadok 156:
  
 
=== Excercise02 "GLSL 4.00.9” ===
 
=== Excercise02 "GLSL 4.00.9” ===
* Transformation matrices
+
* Transformation matrices [http://www.songho.ca/opengl/gl_projectionmatrix.html]
 
* Animation
 
* Animation
 
* VBO [https://open.gl/drawing]
 
* VBO [https://open.gl/drawing]
Riadok 159: Riadok 163:
 
=== Excercise03 "OBJECT LOADING” ===
 
=== Excercise03 "OBJECT LOADING” ===
 
* Projection and Model-view Matrices
 
* Projection and Model-view Matrices
* Assimp Library
+
* Assimp Library [https://learnopengl.com/Model-Loading/Assimp]
 
* Specular Lighting  
 
* Specular Lighting  
Assignment: Load object and textue. Create VBO and implement specular light shader programs using  GLSL: [[media:cv03.zip|cv03.zip]]
+
Assignment: Load object and textue. Create VAO and implement specular light shader programs using  GLSL: [[media:cv03.zip|cv03.zip]]
  
HOMEWORK (28.3.):
+
HOMEWORK (7.4.):
 
* load 3 objects
 
* load 3 objects
 
* create point light source
 
* create point light source
 
* add a texture
 
* add a texture
 +
** structure draft http://yuml.me/diagram/scruffy/class/edit/%2F%2F%20Cool%20Class%20Diagram,%20%2F%2F%20------------------,%20,%20%5BScene%5D%3C%3E-*%3E%5BModel%7CVBO;Texture;Model%20Matrix%5D,%20%5BScene%5D%3C%3E-1%3E%5BCamera%7CProjection%20Matrix;%20View%20Matrix%5D,%20%5BScene%5D%3C%3E-3%3E%5BLights%7CPosition;Color%5D
 +
 +
=== Excercise04 "Geometry Shader” ===
 +
* Z buffer
 +
* Geometry Shader [http://www.lighthouse3d.com/tutorials/glsl-tutorial/geometry-shader/][https://open.gl/?content=geometry][https://learnopengl.com/Advanced-OpenGL/Geometry-Shader]
 +
Assignment : Implement shader program that creates a tetrahedron: [[media:cv04.zip|cv04.zip]]
 +
 +
=== Excercise05 "Tessellation” ===
 +
* Tessellation control shader [https://prideout.net/blog/old/blog/index.html@p=48.html]
 +
* Tessellation evaluation shader
 +
Assignment: napíšte control a evaluation  shader ktorý prerozdelí trojuholník: [[media:cv05.zip|cv05.zip]]
 +
 +
=== Excercise06 "Shadow Mapping” ===
 +
* Render To Texture [http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/]
 +
* FBO [http://www.songho.ca/opengl/gl_fbo.html]
 +
Assignment: nastavte kameru z pohľadu svetla a zobrazte tieň: [[media:cv7.zip|cv7.zip]]
 +
 +
=== Excercise07 "Ambient Occlusion” ===
 +
* Render to Depth Texture [https://learnopengl.com/Advanced-OpenGL/Depth-testing]
 +
* Ambient Occlusion
 +
Assignment: nastavte shader program na zobrazenie efektu ambient occlusion: [[media:Cv07.zip|Cv07.zip]]
 +
 +
HOMEWORK (28.4.):
 +
*add camera movements
 +
*animate at least one object
 +
 +
=== Excercise08 "Post-processing” ===
 +
* Post-processing
 +
* Glow
 +
Assignment: nastavte shader program na zobrazenie glow efektu: [[media:cv9.zip|cv9.zip]]
 +
 +
=== Excercise09 "Compute Shaders” ===
 +
* Compute Shader [https://www.khronos.org/assets/uploads/developers/library/2014-siggraph-bof/KITE-BOF_Aug14.pdf] [http://antongerdelan.net/opengl/compute.html] [https://github.com/LWJGL/lwjgl3-wiki/wiki/2.6.1.-Ray-tracing-with-OpenGL-Compute-Shaders-%28Part-I%29]
 +
* Julia set [https://en.wikipedia.org/wiki/Julia_set]
 +
Assignment: implement Julia set image using compute shader [[media:cv09.zip|cv09.zip]]
  
 +
<!--
 
OUTDATED:
 
OUTDATED:
  
Riadok 215: Riadok 255:
 
* Glow
 
* Glow
 
Témy: nastavte shader program na zobrazenie glow efektu: [[media:cv9.zip|cv9.zip]]
 
Témy: nastavte shader program na zobrazenie glow efektu: [[media:cv9.zip|cv9.zip]]
 +
-->

Aktuálna revízia z 13:41, 9. máj 2022

Real-time computer graphics

This course ...

  • Will focus on visualization of 3D scenes [1]
  • Will show you what are the current topics
  • Will improve your skills in
    • OpenGL
    • Computational geometry
    • Algorithms and data structures

What you Need to Pass


  • Grades
    • A = 91-100
    • B = 81-90
    • C = 71-80
    • D = 61-70
    • E = 51-60
    • Fx = 0-50

LESSONS

Lesson00 "Introduction to Computer Graphics"

  • Introduction to Computer Graphics
  • Common techniques
  • Cutting edge tools and packages
  • State of the Art
    • Volumetric particle shadows [2]
    • Evolution of Amd and Ati graphics cards [3] [4]
    • Evolution of graphics from NVIDIA [5] [6]
    • PhysX [7]
  • Course schedule
  • "Terms and conditions" of this course
  • Lecture notes: Lecture0.pdf

Lesson01 "Graphics Pipeline, Shaders"

  • OpenGL Graphics Pipeline [8]
  • Shader languages
  • GLSL – vertex, fragment
  • Passing variables
  • Unified architecture [9]
  • Lecture notes: Lecture1.pdf

Lesson02 "Buffer Objects, FBO"

  • Vertex arrays [10]
  • Buffer object data
  • Vertex Buffer Objects [11]
  • Pixel Buffer Objects [12]
  • Rendering to texture
  • Deferred lighting [13][14]
  • Lecture notes: Lecture2.pdf

Lesson03 "Lighting, Texturing"

  • Rendering equation
  • Phong local illumination
  • Oren-Nayar model
  • Cook-Torrance model
  • Texture filtering [15] [16] [17]
  • Bump mapping [18]
  • Lecture notes: Lecture3.pdf

Lesson04 "Global Illumination"

  • Ambient occlusion [19]
  • Distance attenuation
  • Ray tracing [20]
  • Depth buffer masking
  • Lecture notes: Lecture4.pdf

Lesson05 "Shadows"

  • Shadows generation
  • Light maps
  • Planar shadows
  • Projective shadows
  • Shadow mapping [21] [22]
  • Shadow volumes
  • Lecture notes: Lecture5.pdf

Lesson06 "Reflections, Refractions"

Lesson07 "Post-Processing"

Lesson08 "Geometry Optimalization"

Lesson09 "GPGPU"

  • SIMD
  • CUDA [38] [39]
  • Shared memory
  • OpenCL
  • Compute shaders [40]

Lesson10 "GPU Volume Graphics"

  • Volume Data
  • Transfer Function
  • Marching Cubes
  • 3D Textures
  • Multi-textures
  • Ray-casting
  • Lecture notes: Lecture10.pdf


EXCERCISES

Excercise00 "Basic project”

  • Basic project: cv0.rar
  • Work with libraries GLUT and GLEW.
    • To disable the compilator errors use #pragma warning(disable:4996) and cast the char constants to pointers

Assignment: Add a light to the program.

Excercise01 "Texturing and Lighting”

  • Texture in OpenGL [41]
  • Diffuse Lighting [42]

Assignment: create a textured cube and implement the diffuse lighting in the shader program: cv01.zip

Excercise02 "GLSL 4.00.9”

  • Transformation matrices [43]
  • Animation
  • VBO [44]

Assignment: Create VBO and implement shader programs using GLSL 4.00.9: cv2.zip

Excercise03 "OBJECT LOADING”

  • Projection and Model-view Matrices
  • Assimp Library [45]
  • Specular Lighting

Assignment: Load object and textue. Create VAO and implement specular light shader programs using GLSL: cv03.zip

HOMEWORK (7.4.):

Excercise04 "Geometry Shader”

Assignment : Implement shader program that creates a tetrahedron: cv04.zip

Excercise05 "Tessellation”

  • Tessellation control shader [49]
  • Tessellation evaluation shader

Assignment: napíšte control a evaluation shader ktorý prerozdelí trojuholník: cv05.zip

Excercise06 "Shadow Mapping”

Assignment: nastavte kameru z pohľadu svetla a zobrazte tieň: cv7.zip

Excercise07 "Ambient Occlusion”

  • Render to Depth Texture [52]
  • Ambient Occlusion

Assignment: nastavte shader program na zobrazenie efektu ambient occlusion: Cv07.zip

HOMEWORK (28.4.):

  • add camera movements
  • animate at least one object

Excercise08 "Post-processing”

  • Post-processing
  • Glow

Assignment: nastavte shader program na zobrazenie glow efektu: cv9.zip

Excercise09 "Compute Shaders”

Assignment: implement Julia set image using compute shader cv09.zip