代写INFOGR: Graphics Practical RETAKE 2023/2024, 4th period代写R语言
- 首页 >> Matlab编程INFOGR: Graphics
Practical RETAKE
2023/2024, 4th period
The assignment:
This is the retake practical assignment for Graphics. It comes in two flavors, which are both detailed below:
Section A describes the retake assignment for students who should repair their grade with a new “Ray Tracer” (P1) grade.
Section B describes the retake assignment for students who should repair their grade with a new “Rasterizer” (P2) grade.
The grade you get on this retake replaces the old grade for the corresponding practical assignment. That means that you keep your grade for the other practical assignment, as well as your exam grade.
Important: Theretake is an individual assignment. You cannot work in a team for this. You may re-use (parts of) your old code but you may need to improve it and adapt it to fit the new requirements.
Section A: “Ray Tracer” Retake
For a passing grade (6) create a new 3D ray tracer that can render triangles with shadows and diffuse shading, using the light from at least one point light. Your demonstration scene must have at least one triangle that casts a shadow on part of another triangle. The shadow should look correct without any bugs or artifacts.
The application must be implemented using C#. You may use the Practical #1 template to display the ray traced image on the screen. You shouldn’t need to add or modify any OpenGL code (i.e., any code involving GL. functions).
For extra points you can implement additional features such as:
The full Phong shading model instead of just diffuse. Carefully tweak your scene so a Phong highlight is clearly visible somewhere in the image.
Textures.
Mirror reflections.
Multiple lights.
Other light sources such as spotlights or directional lights.
Of course, many other extensions are possible.
The following features are NOT required and will NOT earn extra points:
Keyboard or mouse controls for the camera. The camera may be hard-coded and not moving.
Any other primitives besides triangles.
Debug visualization. It can still be useful to help you diagnose and fix bugs though.
Section B: “Rasterizer” Retake
For a passing grade (6) create a new OpenGL 3D rasterizer that can render triangle meshes with diffuse shading using textures and the light from at least one point light. The vertex shader must accept input vertex positions and normals in Object Space. Provide the correct transformation matrices to the vertex shader so all shading calculations in the fragment shader happen in Camera Space. Consistently name all the point/vector/normal and matrix variables in C# and GLSL so it’s clear in which space each point/vector/normal is specified (e.g., lightPositionWorld, lightPositionCamera) and from which space to which other space each matrix transforms (e.g., worldToCamera).
The application must be implemented using C# and OpenTK, and shaders using GLSL. You may use the Practical #2 template as a starting point.
For extra points you can implement additional features such as:
The full Phong shading model instead of just diffuse. Carefully tweak your scene so a Phong highlight is clearly visible somewhere in the image.
Multiple lights.
Other light sources such as spotlights or directional lights.
A procedural texture,e.g., a checkerboard. This must be implemented as a GLSL function that doesn’t call the texture(...) function (or similar) to read from a variable of type sampler2D (or similar).
Post-processing: vignetting or color grading.
Of course, many other extensions are possible.
The following features are NOT required and will NOT earn extra points:
Keyboard or mouse controls for the camera. The camera maybe hard-coded and not moving.
A scene graph. However, you do need to be able to render multiple meshes, each with their own texture and objectToWorld transformation matrix.
General Guidelines
As with the original assignments, the following rules for submission apply:
Your code has to compile and run on other machines than just your own. If this requirement isn’t met, we may not be able to grade your work, in which case your grade will default to 0. Common reasons for this to fail are hardcoded paths to files on your machine.
Please clean your solution before submitting (i.e., remove all the compiled files and intermediate output). This can easily be achieved by running clean.bat (included with the template). After this you can zip the solution directories and send them over. If your zip-file is multiple megabytes in size something went wrong (not cleaned properly).
When grading, we want to get the impression that you really understand what is happening in your code, so your source files should also contain comments to explain what you think is happening.
Finally, we also want to see a consistent and readable coding style. Use consistent descriptive names for variables, functions, and classes.
Deliverables:
A ZIP-file containing:
1. The contents of your (cleaned) solution directory
2. The readme.txt file (modify the template file to list the correct requirements!)
The contents of the solution directory should contain:
(a) Your solution file (.sln)
(b) All your source code
(c) All your project (.csproj) and content files (including shaders, models and textures).
The readme.txt file should contain:
(a) Your name and student ID. Remember: work alone!
(b) A statement about what features you have implemented.
[If we can’t find features you implemented (and understand them easily),
they will not be graded, so make sure your description and/or comments are clear.]
(c) A list of materials you used for the assignment. If you borrowed
code or ideas, make sure you provide a full and accurate overview of this.
Put the solution directories and the readme.txt file directly in the root of the zip file.