2D Scene reconstruction in computer graphics using only primitives
As a part of my computer graphics course work, I reconstructed a given 2D image using computer graphics with primitive geometric structures like rectangle, cones, discs etc.
Task - Reproduce a given image to the best of your ability using the OpenGL/GLSL.The requirement also covers:
- Non-default camera positioning, using a frustum/perspective projection.
- At least one point light source -tried to mimic sun in the image.
- Use of at least one texture image - Textures are used for ground, the body, roof, gate, upper part of roof and windows of the main house at the center, both silos and their spherical roof. 4. Shading on all objects which aren't texture-mapped, with at least two visually different sets of material properties - all other objects (other than ones mentioned in point 3 + clouds + bulb on electric pole) have phong shading with different values for cyllinder, cone, quad, cube like objects.
The code also has animation that includes translating clouds from left to right. One cloud passes through the silo shows it is a lower cloud and adds to 3D effect. It also includes the effect of a setting sun and how the scene (including the iambient surrounding, background and clouds and excluding the lamp) gets dark.
Restrictions met:
- I used Blender to build a model for the tree and used the same for bushes.
- There are two shader programs (phong.vert, phong.frag, texture.vert, texture.frag) for phong shading and texture mapping.
This project is very close to me as it was my first graphics application.
Here is a screenshot of what my instructor had to say: