$29
• Overview
This assignment is designed for you to understand Texture mapping and advanced tech-niques using texture. In this homework, you can create a scene with any theme. Starting with our skeleton code, you are asked to create a scene containing shadow of the objects and some objects rendered with normal map.
First requirement of this homework is to load at least two external texture images other than the given resources of lab 4. You have to import external texture images and new skybox images. And also you have to get a tangent-space normal map(it looks like bluish), it could be included in external 3d model or could be generated from 2d image NORMALMAP ONLINE. If the engine can not load the "jpg" file, try again by converting it to a "png" file.
Second requirement of this homework is to implement the shader which supports Normal mapping. Normal mapping can makes a bumpy object by changing fragment’s normal vector without geometry modification. We provide you with some template code to work with. You need to fill the functions on NormalMaterial.cpp(.hpp) and you should create .glsl files and implement both vertex and fragment shaders for normal mapping.
Next is to add a shadow of the objects in the scene. There are many approaches to make a shadow such as Shadow mapping or Shadow volume. You can choose either method, but we recommend you to use a shadow mapping, since it is simpler to implement. We provide you with some template code to work with. You need to fill the functions on ShadowMap.hpp and ShadowMaterial.cpp(.hpp). Then, you should create .glsl files and implement both vertex and fragment shaders for handling "Render to texture". As a next step, modify the existing Material files and .glsl files for making a shadow (include files for normal mapping). Only the shadow form the directional light(included in your skeleton code) is mandatory. But I encourage you to create a shadow from a point light(or spot light) to make your scene rich and interesting. And this could be for your creativity points.
Now, you are ready to design your own scene. You are free to choose any theme for Homework 4 such as nature, the cosmos, or something. You may extend your Homework 3. This is your last homework to show what you have learned about graphics programming. Be creative! There are two parts in creativity points. 5 pts goes to specifically to extra implementation regarding utilizing textures, and 15 pts goes to other parts for making your scene more interesting (for example, shadow from a moving point light source, anti-aliasing or post-processing). In your document report, please identify all aspect on what you have tried to show in your homework.
CS380 KAIST
Homework Assignment #4
You need to write a comment in your code and also write up 2-4 pages (10pt, 1.5 space) re-port explaining what and how you have done to meet the specifications given below. Do not just copy your code to your report. Please explain ’how’ your implementation satisfies the specification. Please keep the due date! Since the due is after your final exam, we can receive the late submission only for two days (by Sunday).
• Specification & Grading
Specification
Grades
1.
Texture mapping with external texture images other than given textures
10
1.1
Texture mapping applied to an object in your scene (5)
1.2
Skybox with cube mapping (5)
2.
Normal mapping (Bump mapping)
30
3.
Create shadow effect from the directional light
30
4.
Creativity
20
4.1
Implement some other technique using texture (5)
4.2
Make your own scene interesting and attractive (15)
5.
Document
10
Total
100
Table 1: Specification and Grading
References
https://cpetry.github.io/NormalMap-Online
https://en.wikipedia.org/wiki/Normal_mapping
https://en.wikipedia.org/wiki/Shadow_mapping
https://en.wikipedia.org/wiki/Shadow_volume
CS380 KAIST