SCIT
School of Computing & Information Technology
CSCI336 Interactive Computer Graphics
SIM Session 3 2024
Assignment 2
Orthographic projection:
Top-down view
Line to separate the views
Orthographic projection: Front view
Perspective projection
Figure 1: Multiple viewports display.
Write an OpenGL program that displays a 3D scene viewed from different camera views as shown in Figure 1 above (a working program will be shown in one of the lectures).
-
Multiple viewports (5 marks)
-
Each viewport is to have a different view and projection:
-
A top-down view of the scene (using orthographic projection).
-
A front view of the scene (using orthographic projection).
-
A perspective view (using perspective projection).
-
Draw two lines to separate the views.
-
-
-
3D scene (10 marks)
-
The scene should be that of a room with 4 walls and a floor (a ceiling is not required). The room should be lit with a single point light source.
-
The floor should be textured.
-
The walls are to be rendered using normal mapping.
-
-
The room should contain a painting on the wall and a rotating ornament.
-
Use textured polygons for the painting.
-
The ornament is to be rendered using cube environment mapping. It should rotate by updating its transformation matrix.
-
-
-
User interaction (5 marks)
-
Allow to user to control certain aspects of the scene using a control panel.
-
Display the frame statistics: frames per second and frame time.
-
Allow the user to toggle the animation (i.e. pause and unpause).
-
The user should be able to move the position of the light.
-
Allow the user to change the yaw and pitch of the camera for the perspective view.
-
-
Figure 2 below illustrates this. The images show the light at different positions and the perspective camera looking in different directions.
Figure 2: Images that show differences in the display based on different settings.
Screenshots
In your submission, include screenshots demonstrating your working program and the features that were implemented. Save the screenshots using one of the common image formats, i.e. bmp/jpg/png.
Instructions and Assessment
Please follow all your tutors instructions.
The assignment must be your own work. If asked, you must be able to explain what you did and how you did it. Marks will be deducted if you cannot correctly explain your code. The mark allocations shown above are merely a guide. Marks will be awarded based on the overall quality of
your work. Marks may be deducted for other reasons, e.g., if your code is too messy or inefficient, if you cannot correctly explain your code, etc. For code that does not compile, does not work or for programs that crash, the most you can get is half the marks (i.e. 10 marks or less). It is better to comment out sections of your code that do not work and include a note for the marker.
Reviews
There are no reviews yet.