CSCI 441 - Computer Graphics

Fall 2023 - Midterm Project - The Fellowship

This assignment is due by Thursday, October 12, 2023 11:59pm.

After your journey, you arrive at the cabin. A large group is milling about outside the cabin.

As you push through the crowd and get near the entrance, the cloaked figure is trying to calm everyone down and clear a path. Luckily, you are being pulled by the arm and make your way through to the door. You hear the cloaked figure say:

Quick! We must head inside.

Perfect. Maybe now I'll find out what's going on.

As you move inside the cabin, you can no longer hear the sound of the crowd outside. You don't remember making any turns, but you feel that you've been walking too long compared to the size of the building. Are you going underground?

The cloaked figure stops abruptly and you nearly walk into their back. The figure points to a sign on a narrow wooden door.


Lasciate ogni speranza,
voi ch'entrate.

Nodding at you and swinging the door open, you to enter.


Part I - Combine Your Ingredients


Quickly scanning the room, there are nearly fifty other people gathered - and you saw them outside the cabin as you ran through. Do they have the rest of the spell components? You find the last remaining open seat and wait for someone to speak, as they have already made their way to the podium.

"I have asked all of you here as you all have the same quest - to save Maui from the taniwha. If you act quick enough, we can counter the spell being summoned. Successfully cast the Protector of Maui spell and together we can delay her spell to force the volcano to erupt by a fortnight. Use your realm spirits to guide you. Alone, none of you possess the complete set of ingredients for the spell. But together, perhaps you can find a way to properly combine what you have. Here, take this spell book and begin at once. Resources are limited so you must hurry."

You quickly take one of the spell books as they go by and begin reading:

The Protector of Maui spell needs four specific ingredients. There are four in all, each built upon a different skill you have learned in your travels. You must choose some of your fellow Heroes to join you. Maui has fifteen days until the volcano erupts - eight under the protection of the Papa realm and seven under the protection of the Rangi realm. Each day requires three Heroes.

The first part of your midterm project is to assemble into teams. Protection days are granted by a single realm, so you may only partner with other characters who follow the same realm as you (Papa or Rangi). Our class will have thirteen teams of three and two teams of four that follow the Rangi realm. Once you have formed your team, one member of your team must email the following to the instructor by FRIDAY, SEPTEMBER 29 11:59PM:

  1. The Members of Your Team
  2. Your Guild Name
  3. Your Realm

For the midterm project, you will create a world for all of your Heroes to move around in. Read on to understand how everything fits together.

The actual midterm project is comprised of several smaller parts, each focusing on one of the topics covered to this point. The requirements for each section are described below.


Section A - 3D Drawing & Animation

As before, your Heroes must be made of solid 3D Objects. Beyond the ground plane and Heroes, you must also have two different types of objects scattered around your world.

Your Heroes must be animated. The other two objects may be stationary or could be animated (think a tree swaying in the wind for instance).


Section B - Cameras & Viewports

Users will be able to experience your program from one of many view points:

  1. From an arcball camera that can rotate around and follows a single Hero
  2. From a free cam that can move about the scene
  3. From a first person camera attached to one of your Heroes

The user needs to be able to toggle between camera modes through different key presses. When the first person point-of-view camera is turned on, it must appear as a picture-in-picture viewport within the window. Feel free to add additional cameras beyond the three listed (Sky cam, Side-scrolling cam, Third Person cam, etc.)

In addition to being able to select which camera view to use, the user must be able to select which Hero to move. The arcball cam will follow this hero and the first person cam will display their point of view.


Section C - Shaders & VAOs

You must be using VAOs for all of your objects. Additionally, you will need to create custom shaders to implement Part D. The shaders and VAOs will need to work seamlessly together and should run without error.


Section D - Illumination

You will need to implement the full Phong Reflectance Model using Gouraud Shading. This will be implemented through a directional light, a point light, and a spot light. You must have at least one of each type of light. All of your lights will be additive and exhibit attenuation (except the directional light). Be sure to choose nice looking colors for each of your lights and your materials.

Scanning the room, you instantly know who should join you in your guild. You pull them aside, speak for a few minutes, and it's agreed. You all shall begin preparations immediately.


Part II - Website


Update the webpage that you submitted with A3 to include an entry for this assignment. As usual, include a screenshot (or two) and a brief description of the program, intended to showcase what your program does to people who are not familiar with the assignment.


<34>Part III - Presentation

To demonstrate the features and world you have created, each team will have their project running during lab. It needs to clearly demonstrate each of the three different light types, the different camera types, and your three heroes.

At the end of lab, each hero will vote for their favorite guild that should be crowned the Protector of Maui.

!!EXTRA CREDIT!! For extra credit, have a video generated by using an external file. We will model our file after the md5camera file format which implements a free cam model. At the start of your program, the user needs to be prompted which camera file they wish to open. The file is then formatted as follows:

n
eyePos1.x eyePos1.y eyePos1.z camDir1.x camDir1.y camDir1.z upVec1.x upVec1.y upVec1.z fov1
eyePos2.x eyePos2.y eyePos2.z camDir2.x camDir2.y camDir2.z upVec2.x upVec2.y upVec2.z fov2
...
eyePosn.x eyePosn.y eyePosn.z camDirn.x camDirn.y camDirn.z upVecn.x upVecn.y upVecn.z fovn

The first line states the number of frames that make up the camera animation. There then follow n lines. Each line is made up of the following information:

We'll need to load the file into an array that holds all of our camera parameters. When ready to run the camera animation, every time through our render loop we'll use the next set of camera parameters from the array. This will result in an automated fly through your world. You can then determine if once at the end it should loop back to the beginning.


Documentation


With this and all future assignments, you are expected to appropriately document your code. This includes writing comments in your source code - remember that your comments should explain what a piece of code is supposed to do and why; don't just re-write what the code says in plain English. Comments serve the dual purpose of explaining your code to someone unfamiliar with it and assisting in debugging. If you know what a piece of code is supposed to be doing, you can figure out where it's going awry more easily.

Proper documentation also means including a README.txt file with your submission. In your submission folder, always include a file called README.txt that lists:


Grading Rubric


Your submission will be graded according to the following rubric.

Topic Percentage Requirement Description
3D Drawing & Animation 10% Heroes are animated & comprised of solid 3D Objects. Scene is comprised of ground and other scenic objects.
Cameras & Viewports 35% Arcball camera follows Hero and rotates correctly; user can control rotation. Free camera is correctly implemented, can move around the scene, and is user-controllable. Camera from Hero's point of view works correctly; it is attached to the Hero and looks along the Hero's direction of movement.

First-person camera view is placed in a separate viewport. User can toggle between cameras through use of a keypress. User can toggle between Heroes to follow through keypresses as well.
Shader & VAOs 10% Vertex and Fragment Shaders compile and link without errors. Objects in world created using VAOs. Shaders and VAOs interact correctly.
Illumination 35% Phong Reflectance Model implemented with Gourad Shading. All three light types implemented (directional, point, spot) and are additive. Attenuation applied as appropriate. Appropriate light colors and material colors used.
Submission, Presentation, & Team Reflection 10% Submission includes source code and README.txt. Source code is well documented. Webpage named <HeroName>.html submitted and updated with screenshot from latest assignment. Submission compiles and executes without error. Equal division of work is reported by team members. Project is presented and other projects are reviewed.


Experience Gained & Available Achievements


Assignment Attribute
Assignments +200 XP
Web Attribute
Web +200 XP
Camera Crew
Camera Crew
???
???
???
???
???
???
???
???

Submission


When you are completed with the project, zip together your source code and README.txt. Name the zip file, Guild_MP.zip where Guild is your Guild name. Upload this file to Canvas under MP Source Code. Only one team member needs to submit the project source code.

Every team member needs to submit their individual website under MP Website. Name the zip file HeroName_MP.zip.

This assignment is due by Thursday, October 12, 2023 11:59pm.