/OpenGL_Graphics_Assessment

3D application written in C++ using OpenGL

Primary LanguageHTMLMIT LicenseMIT

Graphics Assessment

Website

This repository is for the Graphics assessment for Year 2. It contains multiple compiled programs for each required part of the assessment. Check the releases tab for an easy way to find a compiled and zipped version of each program.

Each is implemented as an application class derived from BaseApplication. To run a certain example simply change the application being created within main.cpp.

Current working examples are:

This is the final product. After putting all of the pieces together using a component based archetecture, we get this as the result. It contains a basic scene editor modeled after Unity complete with a transform hierachy and inspector. The first .exe provides a basic solar system of a sun, earth and moon to show transform parenting. The second one provides an example of texturing.

GUI Based Interaction

As you can see from the following animation, all objects in the OpenGL world space can be interacted with via the hierarchy and inspector. The Hierarchy show the relationship of objects in the scene. Parents have a drop down, and children are indented to show this relationship. To be a child of an object means that your world space orientation is dictated by the parent. When the parent moves or rotates, you also rotate. The inspector shows the local space orientation of objects. You can see that the sun is the root object, and the earth and moon have a local space orientation that defines where they are relative to their parent. Alt text

Different Material Ambient Color

This Scene shows three spheres of decreasing sizes which are parented from largest to smallest. This scene is representing a sort of Sun, Earth, and Moon. When the Sun rotates, the Earth rotates. When the Earth rotates, the Moon rotates. This is represented in the Hierarchy window on the left. The Sun is the root, the Earth is a child of the sun, the Earth is a parent of the Moon, and the Moon is a child of the Earth. On the right, the inspector window show the current values for the selected object(highlighted in a light purple color). The green, blue, and red lines are the Sun's up, forward, and right directions based on it's transform's orientation respectivly. Alt text

Different Color Directional Light Diffuse Color + Material Ambient Color

This time the directional light is selected. In the inspector, the diffuse color was changed to a bright purple color. This is represented by the directional light's gizmo at the top center of the scene. The line starts out bright purple and fades into the specular color which is green. Alt text

Texture Shader Options

This Scene shows off the multiple different options for shaders which can be chagned at runtime. Each shader has it's own paramerters which are defined in the shader itself using a comment and read in by my custom parser for it. The options for a texture shader are shown in the screenshot. Clicking on the '...' button will open up a standard windows file open dialogue and the new image file can be selected from there. The object will then update it's texture immediatly upon selection. Alt text