top of page

OpenGL Scene

Graphics Programming University Project

As part of my Graphics Programming module at university, I created a scene featuring a 'Museum of Graphics' using OpenGL building up from a basic framework we were given.

The scene is illuminated using a directional light, a blue point light and a white spotlight, all of which can be turned on and off and the position of both the spotlight and point light can be changed by the user. The scene also includes 4 sculptures featuring different techniques that we were taught that I wanted to expand on:

The first sculpture is of a loaded model of a Moai statue where I created a shadow which changes size and position based on the movement of the spotlight in the scene. 

The second sculpture showcases procedurally generated spheres with slight transparency to showcase the use of the Z-buffer and transformations of objects by having the spheres move towards each other and back on the keypress.

The third sculpture consists of a rotating cube with different coloured faces to show the interaction of colour with them and the blue point light in the scene. The cube has a procedurally generated sphere inside it. User input turns the depth test on and off on some faces of the cube allowing the sphere to be rendered in front of the cube’s faces depending on if the test is enabled or disabled.

The last sculpture is of a portal that you can see through and inside it is a representation of the solar system through procedurally generated spheres being transformed. The solar system can be seen through the door due to the stencil buffer.

The project includes many user interactions such as changing camera views, being able to remove the roof of the room to see the skybox and the ability to change the texture of said skybox. The user can also display the wireframe mode and different forms of shading on keypress. The benches in the scene were created through quads and the plants are models that were loaded into the scene.

Screenshot showing one side of the 'Museum of Graphics' scene created in OpenGL, with various sculptures and lighting
Screenshot of the rotating cube sculpture in OpenGL with coloured faces, a sphere inside, and user-controlled depth testing
Screenshot of the portal sculpture in OpenGL, showing the solar system through the portal with transformed spheres
Screenshot of wireframe rendering of the Moai statue sculpture in the 'Museum of Graphics' scene in OpenGL
Screenshot of wireframes for the second sculpture, showing Z-buffer and transformations in OpenGL
Screenshot showing the solar system viewable through the portal in OpenGL, rendered with procedurally generated spheres

Initial plan for the scene:

Screenshot of the initial diagram plan for the 'Museum of Graphics' scene layout in OpenGL
bottom of page