Programming III Week 4
|
This week we have textured out first cube, illuminated it and we have created a simple icon to place on our UI. To create the shading on out cube we used a technique called Phong shading. To create a reflection that looks realistic enough we have to illuminate out box in three different ways, first off we need to apply the ambient lighting, this light doesn’t have a source and it will illuminate the model the exact same way from all sides. After that we want to know where the light comes from, and that is where we calculate the diffuse, to calculate this we need a light source, and the most simple light source is a point light and that is what we used for this, there is also spotlights and more complicated versions of light-sources. Finally we need to calculate the the highlights that, and for this we need to calculate the Specular reflection and here we need the position of the camera as well as the light-source. Other than that is has been a fairly uneventful week for me. Filed under: Uncategorized |
