Difference between revisions of "Project4F20"
(→Moving the Astronauts) |
(→Rendering the Astronauts) |
||
Line 29: | Line 29: | ||
==Rendering the Astronauts== | ==Rendering the Astronauts== | ||
− | + | We provide [[Media:Cse167f20-project4-astronauts.zip|three versions of the astronaut model]]: one is the astronaut standing still, the other two are animation frames for the walking animation. Load each OBJ file into a separate data structure so that you can switch between the three animation stages as needed. | |
− | + | The astronaut files don't come with color. The only difference between the 10 astronauts in the scene is their colors. Here is a table of the astronaut colors. They are given as hex values for red, green and blue. Example: 132ED1 means: red is 13 hex = 19 decimal, green is 2E hex = 46 decimal, blue is D1 hex = 209 decimal. These are all in a range from 0 to 255, so to get them into the range of 0 to 1 you need to divide by 255. | |
{| border="1" cellspacing="0" | {| border="1" cellspacing="0" | ||
Line 75: | Line 75: | ||
|} | |} | ||
− | + | Apply Toon shading: render the astronauts in their respective color, using the toon shading effect discussed in class (silhouette edges and discretized shading). | |
+ | |||
+ | Below is a picture of what the astronauts should approximately look like: | ||
+ | |||
+ | [[Image:astronauts.png]] | ||
==Setting up Collision Detection== | ==Setting up Collision Detection== |
Revision as of 16:44, 24 November 2020
Contents |
Project 4: Among Us in 167
UNDER CONSTRUCTION - DO NOT START YET
In this project you will need to build a 3D scene that resembles the activity in the lobby of the popular game Among Us. The lobby, a.k.a. waiting room, is where all players (astronauts) gather before the game starts.
If you are not familiar with Among Us, we recommend that you watch this video clip, which shows a typical game play. Importantly, the first minute of it shows the action in the lobby where the astronauts gather before the game begins.
This video has more active astronauts who keep walking around, which is similar to what you need to simulate for this homework project.
This project implements the following skills from the lectures:
- toon shading
- collisions with bounding spheres (when walking around)
- particle system (when astronauts arrive or leave)
The total score for this project is 100 points. Additionally, you can obtain up to 10 points of extra credit.
This project will be discussed on Wednesday, November 25th.
Ideally, you re-use your scenegraph structure from project 3. But if you are not happy with it you can implement your project without a scenegraph structure.
Rendering the Lobby
- Load OBJ model
- set camera parameters
- create directional light source
Rendering the Astronauts
We provide three versions of the astronaut model: one is the astronaut standing still, the other two are animation frames for the walking animation. Load each OBJ file into a separate data structure so that you can switch between the three animation stages as needed.
The astronaut files don't come with color. The only difference between the 10 astronauts in the scene is their colors. Here is a table of the astronaut colors. They are given as hex values for red, green and blue. Example: 132ED1 means: red is 13 hex = 19 decimal, green is 2E hex = 46 decimal, blue is D1 hex = 209 decimal. These are all in a range from 0 to 255, so to get them into the range of 0 to 1 you need to divide by 255.
Color | RGB |
---|---|
Black | 3E474E |
Blue | 132ED1 |
Brown | 71491D |
Cyan | 39FEDD |
Dark Green | 13802C |
Lime | 4EEF38 |
Orange | F17D0C |
Pink | EC54BB |
Purple | 6C2FBC |
Red | C51211 |
White | D6DFF1 |
Yellow | F6F657 |
Apply Toon shading: render the astronauts in their respective color, using the toon shading effect discussed in class (silhouette edges and discretized shading).
Below is a picture of what the astronauts should approximately look like:
Setting up Collision Detection
- Create bounding spheres for all astronauts
- Create bounding spheres for the obstacles in the room (3 boxes)
- Create bounding planes for the walls: 4 axis aligned walls are sufficient, no need to implement diagonal walls.
Moving the Astronauts
1. Non-player astronauts: start in random orientation walk straight, bounce off objects and other players (angle of incidence=angle of reflection) randomize stop/start walking
2. Player astronaut: Control with keyboard (cursor keys or WASD) Use collision detection to keep from walking into objects or other astronauts
All astronauts have to always face the direction they walk in.
The astronauts have to be animated (i.e., moving their legs when walking, by switching between the two animation steps provided).
Player Appearance/Disappearance Effect
In the game, the astronauts materialize with an effect that creates a white halo around them, before they show up. We are NOT going to imitate this effect, but instead use a particle effect whenever an astronaut shows up or disappears. We also won't need the astronauts to appear in their respective seats like in the game, but they can show up anywere in the lobby as long as they don't collide with another astronaut or an obstacle.
Choose particle effects for the astronauts' appearance and disappearance. The effects must be different, but the difference can be minor. For instance, when they appear there might be points starting in the center point of the newly created astronaut's bounding sphere, moving away from that point. When disappearing, similar points might be traveling in the opposite direction. But your imagination is the limit, as long as you have a particle system with at least 100 particles. The particle animations should last about 3 seconds.
Extra Credit (10 Points)
You can get up to 10 points of extra credit by adding some or all of the features below:
1. Sound effects: Add the following sound effects to your application:
- A sound effect for when players join, and a different one for when they leave the lobby.
- A sound effect for whenever the player character moves (e.g., footsteps)
The sound effects should not cut each other, in other words, they should be able to play at the same time without forcing one another to pause or restart.
2. Shadows: use shadow mapping to render the astronauts' shadows on the ground. No other shadows need to be rendered.
Submission Instructions
Once you are done with this project, record a video demonstrating all the functionality you have implemented.
The video should be no longer than 5 minutes, and can be substantially shorter.
Ideally, you will talk over the video to explain what you are showing. Alternatively, you can display text for this purpose.
To create the video you don't need to use video editing software, but you should use software to capture your screen to a video file.
- For Windows users we recommend the free OBS Studio.
- On Macs you can use Quicktime to record off the screen.
If this does not work for you, you can hold your phone in front of the screen and record with a steady hand.
Upload this video at the Assignment link on Canvas, and comment which functionality you have or have not implemented and what extra credit you have implemented. If you couldn't implement something in its entirety, please state which parts you did implement and hope to get points for.
- Example 1: I've done the base project with no issues. No extra credit.
- Example 2: Everything works except an issue with x, I couldn't get y to work properly.
- Example 3: Sections 1-2 and 4 work.
- Example 4: The base project is complete and I did z for extra credit.
Finally, zip up your source code (.cpp, .h, executable and shader files, as well as any .obj files which were not provided to you) and submit the zip file at the Assignment link on Canvas as well.