Lab 1a
3D Transformations and Interaction
Due: Wednesday, Oct 29th 2014, midnight
Start Early!!!
- Individual Effort:
- No team participation is really encouraged in the case of the
homework or the labs.
You're are not allowed to use any libraries or extra code except
gl-matrix, webgl-utils.js and some helper functions
in order to initialize WebGL / load shaders. Especially Three.js is not allowed! If you're not sure or want to use some library, ask the teaching assistants before.
- Late Submission:
- In general late submission is not encouraged/accepted unless
there is a very good reason.
You are encouraged to submit on time. We are on a tight schedule. Being late
for one lab could affect the time left for you to complete subsequent labs.
All labs are due at the midnight of the specified due date.
Late Submissions are possible, yet they will be penalized.
- One day late: 15% penalty
- Two days late: 30% penalty
- Three days late: 50% penalty
- Four or more days late: 100% penalty.
Objectives:
- To understand the development of graphics programs.
- To understand transformations.
- To investigate basic interactive programming.
- To create a simple user interface.
- To become closely familiar with the WebGL rendering pipeline.
- To become experts in debugging graphics code.
- To have fun.
Do the following before you proceed:
- Make sure you have read and understood the background and
became familiar with the working environment that you should
have gotten to know in
Lab 0.
- You have a fridge full of nutritious food.
Goal:
The goal of this lab is to create a simple, interactive 3D application. The focus
is on the development of a graphics program and how to handle geometry,
rotation, translation, and user interaction. Most of the concepts
are laid out in the book as well as in class with example programs.
Tasks:
Follow this guideline step-by-step. Make sure that you thoroughly test
your program after each step so that you can find bugs easier and quicker.
-
(25%) Set up a drawing window and draw a simple box
Set up a basic WebGL program, which initializes the drawing
window. Draw a simple triangle.
-
(25%) Adding 3D shapes
Create a scene with 9 3D shapes which can be seen from the camera.
The shapes should be 3D and not flat. For example: cubes, spheres, cones, or a combination of them. Since shading is not required for this assignment, each face should be a different colour so that transformations can more easily be seen.
-
(50%) Add simple user interaction with the shapes
Respond to user interaction from the keyboard. Implement the
following:
Extra Credit (max 10%)
-
(5%) Camera movement
Move the camera around the scene. Use the 'c' key to select camera movement. Press it again to go back to shape transformations.
-
(5%) Use 3D models
Import and use 3D models instead of basic 3D shapes. For example, these models .
Hints
- Do not worry about intersection tests among the shapes.
- Do not write all your code in one big file. Be as modular as you can.
Submission
- Be sure to double check your final submission by unzipping it
in another directory on a computer in the PC LAB and testing it. (Especially for
last minute submissions.) A project that doesn't run will lose
more points than one that is one day late.
- Be sure to submit any comments or remarks in a 'readme.txt' file.
- Submit your files at cewebs.cs.univie.ac.at.
- Include everything required by your program in your submission including: objects, textures, etc...
Grading Criteria
Grading the labs will be based on the following:
- 80%: Correctness and adherence to assignment specification.
- 10%: Readability and structure of code, use of comments, indentation, etc.
- 5%: Efficiency and speed (only an issue if its very inefficient)
- 5%: Adherence to lab procedures (submitting, naming conventions, etc)
Last modified: October 2, 2014
Michael Phillips /
michael dot phillips at univie DOT ac DOT at