CG – Assignment 2 – Lighting Detail Instruction (Solution)

$ 29.99
Category:

Description

by Ruen-RoneLee
ICL/ITRI
Goal
◆Implement 3 types of light sources:
◆ Directional light
◆ Position light (Point light)
◆ Spot light
◆Interact and modify the light source in runtime.
◆Finish the code in main.cpp, vertex shader and fragment shader
Assignment 2
◆Late work will be penalized by20/week.
◆Copy& paste others’code willget 0.
◆Hand in your homework to ILMS in the following format(-10 for penalty)
◆studentID_HW2.zip
◆studentID_HW2_Report.pdf
In studentID_HW2.zip
◆ Depend on your device
◆ -10 for those upload “Normal Models”

For Mac
In studentID_HW2.zip
◆ Depend on your device
◆ -10 for those upload “x64” or “Normal Models”

For Windows Make Sure exe canrun
Lighting Attribute Reference
◆ Directional light:
◆Position: (1, 1,1)
◆Direction: always pointing at (0,0,0)
◆ Position(point) light
◆Position: (0, 2,1)
◆ Spot light
◆Position: (0, 0, 2)
◆Direction: (0, 0, -1)
◆Exponent: 50
◆Cutoff: 30 degree
Lighting Attribute Reference
◆ Diffuse intensity: (1, 1, 1)
◆ Ambient intensity: (0.15, 0.15, 0.15) ◆Shininess: 64 ◆Attenuation:
◆Point light:
◆ Constant: 0.01
◆ Linear: 0.8 ◆Quadratic: 0.1 ◆Spot light:
◆ Constant: 0.05
◆ Linear: 0.3
◆ Quadratic: 0.6

◆ Please follow the spec bellow, or you would notget the score of item.
◆ You must make sure your key mapping is exactly same to ours.
◆ Z/X: switch the model
◆ T: switch to translation mode
◆ S: switch to scale mode
◆ R: switch to rotation mode
◆ L: switch between directional/point/spot light
◆ K: switch to light editing mode
◆ J: switch to shininess editing mode
◆If you switch mode by T, S, R
◆Apply change on Z axis when scroll the wheel
◆Apply change on X axis when mouse drag horizontally
◆Apply change on Y axis when mouse drag vertically
◆Only rotation should apply X axis when mouse drag vertically, and Y axis when mouse drag horizontally
◆If you switch mode by K
◆Apply change on X axis of light’s position when mouse drag horizontally
◆Apply change on Y axis of light’s position when mouse drag vertically
◆Apply change on diffuse intensity for directional or point light, cutoff angle for spot light when scroll the wheel
◆If you switch mode by J
◆Apply change on shininess when scroll the wheel
◆The shininess is applied to all models.

Report
◆Some screen shot
◆Description of your program control instructions
◆Other special things you have done
Grading Policy
Item Score
Directional light 20%
Point light 20%
Spot light 20%
Per-pixel lighting / Per-vertex lighting 15%
Side-by-side viewport 5%
Switch lights & models 5%
Dynamic light position, cutoff, shininess 10%
Report 5%
Total 100%

Reviews

There are no reviews yet.

Be the first to review “CG – Assignment 2 – Lighting Detail Instruction (Solution)”

Your email address will not be published. Required fields are marked *