Thursday, February 8, 2018

OpenGL: National Parliament of Bangladesh 3D Model

In my final year Graphics Lab, I implemented a 3D model of National Parliament of Bangladesh using OpenGL.

If you don't have glut installed in your codeblocks, then see this link :OpenGL installation


Features:

  • Day-night mode ( press 'n' OR 'N' )
  • Intensity changing ( press 'i' )
  • Fog mode ( press mouse right and left key )
  • Sun-moon show ( press 's' OR 'S' OR 'm' OR 'M' )
  • Light mode ( press 'l' )
  • Zoom mode ( press 'z' to zoom, 'x' to unzoom )
  • Text show ( press 't' to show text: "National Parliament of Bangladesh" )
  • Rotation mode ( press 'e' OR 'E' , 'r' OR 'R' to rotate camera )
  • Up-down mode ( press 'd' OR 'D' to down the camera, 'u' OR 'U' to uplift it )
  • Arrow keys to roam freely
Special Features:

  • Water flowing done by addinng 10 different images of a sample water flow. I used timer funtion to update the images (texture) and show them in output. Then it seems like the water is really moving
  • Same thing goes for flag moving
  • Also I used same technique to move trees [ though it doesn't look so good :( ]
Snapshots:





It's just a sample 3D model I implemented. Though it's really tough using OpenGL to draw as realistic as you want, but it is still fun to code :)
Here is the github link to the project. You can take a peek if you like.

link: https://github.com/sifatshishir/National-Parliament-3D-using-OpenGL

If you have problems running the project, you can follow these steps:
  • 1) create a project on codeblocks. 
  • 2) add all the header files and corresponding .cpp files, and non coding files such as .bmp, .bin, .txt and so on.
  • 3) Copy the texture code from main and bring to your project main.
  • 4) Run.
  • 5) If it works, good. else, go to 6
  • 6) left click on the project folder name which will on the left side under the project tab. click add files and select all of the files in 2.
  • 7) select in both debug and release and save.
  • 8) If it runs, good, else, go to 9.
  • 9) go to the project, then properties. from there, go to build target.
  • 10) change the execution working dir to your folder/bin/debug
  • 11) run
  • 12) if it works, fantastic, or else to go 13
  • 13) copy the .bmp .txt. bin files (non coding files) and place in your folder/bin/debug. delete all the .o from your folder/obj/debug and copy the .bmp .txt. bin files (non coding files).
  • 14) run



No comments:

Post a Comment