This project requires work to be done on a previous project. I'll provide these project files.
You are required to make the village created in the previous project more
realistic by adding lighting and material properties.
Firstly, in order for your lighting to work, you need to add vertex normals, for each component in
your farm. You should also define material properties for each component rather than the
simple colour used in the previous project. You are required to create two different scenes. The
first is a day scene in which you define the sun as a directional light whose colour is white in all
its components and that has constant attenuation.
The second is a night scene for which you have to add three “fire” lights in open spaces. Define
each “fire” light as a positional light whose colour is on the red side of pure yellow, and not as
bright as the sun. Experiment with both linear and quadratic attenuation to see which makes the
more effective scene. The night scene should also include a moon and some stars. Do not use
lights for any of these. Manipulate the emissivity of the respective materials to obtain the
desired lighting effect. Your program should retain all the functionality of the previous project,
i.e. toggling rotation, zooming in or out, changing the viewing angle, and terminating the
program. Add a keyboard callback that will allow the user to switch between scenes. Use <D>
to switch to day and <N> to switch to night. This should work whether "Caps Lock" is enabled or