d (Labs - CG)
d (Labs - CG)
Riadok 34: Riadok 34:
 
Guide: Adam Riečický
 
Guide: Adam Riečický
  
Mondays at 16:30 on [https://teams.microsoft.com/l/channel/19%3ace3d78223961490ba23f5952782225f0%40thread.tacv2/Online%2520cvi%25C4%258Denia?groupId=45ecd851-8cf2-4812-ba82-45e7fa93eba8&tenantId=ce31478d-6e7a-4ce7-8670-a5b9d51884f9 Teams]
+
Mondays at 16:30 on [https://teams.microsoft.com/l/channel/19%3ac7d4a4b8193e42a7ba7bd4c9fbb24599%40thread.tacv2/General?groupId=06d7acf3-8480-4c8f-aa56-6e71fd0ebbb1&tenantId=ce31478d-6e7a-4ce7-8670-a5b9d51884f9 Teams]
 
<!----
 
<!----
 
== Slides ==
 
== Slides ==

Verzia zo dňa a času 14:34, 9. november 2020

Fundamentals of Computer Graphics and Image Processing 1-AIN-301

Course information sheet >

Lecture
Wednesday 9:50, M-I
Excercises
Monday 18:10, F1-248

Grading

You can get 100 points (p) during semester, where 1pt = 1% of final grade

  • Final writen exam: 50p
  • Excercises: 50p (with minimum of 30p)
    • 4 home assignments: 4x10p (2 from CG part and 2 from IP)
    • Attendance: 10x1p

Materials




Labs - CG

Guide: Adam Riečický

Mondays at 16:30 on Teams

Project

Choose programming language of your liking (suggested Python/Java/Javascript)

Finished project send to adam.riecicky@fmph.uniba.sk

Stage 1 (3p)

Deadline 22.11.2020 23:59

Create a simple loader and visualizer of meshes, stored in obj. file format.

Structures
implement IndexedFace which contains array of Vec4 vertex positions and array of Int indices
Mesh import and display
load mesh from Wavefront file (.obj). [Download test models here]. Assume that all imported models are scaled to box (2x2).
display wireframe model in the center of a screen so that the Y-axis of model directs upwards and X-axis directs right. (Z is ignored)
Examples of the functional program (ignore gui)
screen 1
screen 2

Stage 2 (10p)

Deadline 13.12.2020 23:59

Add transformation controls to your tool.

Structures
implement math types Mat4 and Vec4.
Add functions Multiply(Mat4, Mat4), Multiply(Mat4, Vec4) OR override the multiplication operator.
Transformations - must be implemented using matrix multiplication!
Add buttons that can control the transformations of the model. When a user requests transformation by clicking a button, a model matrix should be constructed. (Optionally added to the previous transformation)
Motel matrix can be reset to identity using a Reset button
Construct a projection matrix which performs primitive orthogonal projection and transforms the object into the viewport (scale and translate as in the previous stage)
Always store the original model. Model transformation and projection is done for each point just before rendering
Examples of the functional program
screen 1 = Import only
screen 2 = Import only
screen 3 = Imported, translated by -0.6 in X-axis, rotated by 0.6 rad around Y-axis, rotated by 0.4 rad around Z-axis and scaled by factor 1.1, in order

Stage 3 (7p)

Deadline 13.1.2021 23:59

Enhance existing visualization tool by implementing Blinn-Phong Lightning Model

Mesh display
Implement back-face culling. Faces on the far side of the mesh should not be rendered
Display solid model - each face is drawn as a polygon filled with color (no edges)
Final face color should be calculated as multiples of base color and intensity calculated by Blinn-Phong
Controls
Add an interface to control the direction or position of the incoming light
Examples of the functional program
screen 1
screen 2